Merge branch 'dl/branch-from-3dot-merge-base'

"git branch new A...B" and "git checkout -b new A...B" have been
taught that in their contexts, the notation A...B means "the merge
base between these two commits", just like "git checkout A...B"
detaches HEAD at that commit.

* dl/branch-from-3dot-merge-base:
  branch: make create_branch accept a merge base rev
  t2018: cleanup in current test
This commit is contained in:
Junio C Hamano
2019-05-19 16:45:28 +09:00
5 changed files with 50 additions and 32 deletions

View File

@ -269,7 +269,7 @@ void create_branch(struct repository *r,
}
real_ref = NULL;
if (get_oid(start_name, &oid)) {
if (get_oid_mb(start_name, &oid)) {
if (explicit_tracking) {
if (advice_set_upstream_failure) {
error(_(upstream_missing), start_name);