Merge branch 'jc/maint-co-track'
* jc/maint-co-track:
Enhance hold_lock_file_for_{update,append}() API
demonstrate breakage of detached checkout with symbolic link HEAD
Fix "checkout --track -b newbranch" on detached HEAD
Conflicts:
builtin-commit.c
This commit is contained in:
4
branch.c
4
branch.c
@ -129,7 +129,9 @@ void create_branch(const char *head,
|
||||
die("Cannot setup tracking information; starting point is not a branch.");
|
||||
break;
|
||||
case 1:
|
||||
/* Unique completion -- good */
|
||||
/* Unique completion -- good, only if it is a real ref */
|
||||
if (track == BRANCH_TRACK_EXPLICIT && !strcmp(real_ref, "HEAD"))
|
||||
die("Cannot setup tracking information; starting point is not a branch.");
|
||||
break;
|
||||
default:
|
||||
die("Ambiguous object name: '%s'.", start_name);
|
||||
|
||||
Reference in New Issue
Block a user