Commit Diff


commit - ea5b64ecd82198863fe8ebcaf53f93572963c2db
commit + 5d67f40db0411f97e1a18bb5d5d4c45458ee8c58
blob - 4567602ea1455a0dac06f28c4e523e9507896435
blob + 84fbdf46212019d1180049f41ff6f024f3848b6d
--- got/got.1
+++ got/got.1
@@ -109,9 +109,9 @@ are as follows:
 Create the specified
 .Ar branch
 instead of creating the default branch
-.Dq master .
+.Dq main .
 Use of this option is required if the
-.Dq master
+.Dq main
 branch already exists.
 .It Fl m Ar message
 Use the specified log message when creating the new commit.
blob - a6420b5e5c54a7824b5cd5c7c2c0f0fa4ee841a2
blob + 9d1c786a38fb23f2e9e4185514ba62946a85d401
--- got/got.c
+++ got/got.c
@@ -574,7 +574,7 @@ cmd_import(int argc, char *argv[])
 	const struct got_error *error = NULL;
 	char *path_dir = NULL, *repo_path = NULL, *logmsg = NULL;
 	char *gitconfig_path = NULL, *editor = NULL, *author = NULL;
-	const char *branch_name = "master";
+	const char *branch_name = "main";
 	char *refname = NULL, *id_str = NULL, *logmsg_path = NULL;
 	struct got_repository *repo = NULL;
 	struct got_reference *branch_ref = NULL, *head_ref = NULL;
blob - 22355c100383c081b6562883efbb2d33574c7265
blob + 23d2de6e5badeeea7cfc1c110b9fb25e74400b95
--- lib/repository.c
+++ lib/repository.c
@@ -1015,7 +1015,7 @@ got_repo_init(const char *repo_path)
 	};
 	const char *description_str = "Unnamed repository; "
 	    "edit this file 'description' to name the repository.";
-	const char *headref_str = "ref: refs/heads/master";
+	const char *headref_str = "ref: refs/heads/main";
 	const char *gitconfig_str = "[core]\n"
 	    "\trepositoryformatversion = 0\n"
 	    "\tfilemode = true\n"
blob - a7b1c1d2ee078473b35a60b0ba9068fdac25b9d7
blob + a5da67ca967c91f73507031c7e592c80f772a371
--- regress/cmdline/import.sh
+++ regress/cmdline/import.sh
@@ -38,7 +38,7 @@ function test_import_basic {
 	echo "A  $testroot/tree/epsilon/zeta" >> $testroot/stdout.expected
 	echo "A  $testroot/tree/alpha" >> $testroot/stdout.expected
 	echo "A  $testroot/tree/beta" >> $testroot/stdout.expected
-	echo "Created branch refs/heads/master with commit $head_commit" \
+	echo "Created branch refs/heads/main with commit $head_commit" \
 		>> $testroot/stdout.expected
 
 	cmp -s $testroot/stdout.expected $testroot/stdout
@@ -60,7 +60,7 @@ function test_import_basic {
 
 	echo "-----------------------------------------------" \
 		> $testroot/stdout.expected
-	echo "commit $head_commit (master)" >> $testroot/stdout.expected
+	echo "commit $head_commit (main)" >> $testroot/stdout.expected
 	echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected
 	echo " " >> $testroot/stdout.expected
 	echo " init" >> $testroot/stdout.expected
@@ -142,7 +142,7 @@ function test_import_requires_new_branch {
 	mkdir $testroot/tree
 	make_test_tree $testroot/tree
 
-	got import -m 'init' -r $testroot/repo $testroot/tree \
+	got import -b master -m 'init' -r $testroot/repo $testroot/tree \
 		> $testroot/stdout 2> $testroot/stderr
 	ret="$?"
 	if [ "$ret" == "0" ]; then
@@ -187,7 +187,7 @@ function test_import_ignores {
 
 	local head_commit=`git_show_head $testroot/repo`
 	echo "A  $testroot/tree/beta" >> $testroot/stdout.expected
-	echo "Created branch refs/heads/master with commit $head_commit" \
+	echo "Created branch refs/heads/main with commit $head_commit" \
 		>> $testroot/stdout.expected
 
 	cmp -s $testroot/stdout.expected $testroot/stdout
@@ -217,7 +217,7 @@ function test_import_empty_dir {
 
 	local head_commit=`git_show_head $testroot/repo`
 	echo "A  $testroot/tree/notempty/alpha" >> $testroot/stdout.expected
-	echo "Created branch refs/heads/master with commit $head_commit" \
+	echo "Created branch refs/heads/main with commit $head_commit" \
 		>> $testroot/stdout.expected
 
 	cmp -s $testroot/stdout.expected $testroot/stdout