diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-04-27 05:02:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-07 13:23:13 +0900 |
commit | e3d6539d58238f046ff955330f6e10c447150164 (patch) | |
tree | a80e3a6d2e4814bf8b750edc027a05ed90d1e15e /t/t9801-git-p4-branch.sh | |
parent | t2018: cleanup in current test (diff) | |
download | tgif-e3d6539d58238f046ff955330f6e10c447150164.tar.xz |
branch: make create_branch accept a merge base rev
When we ran something like
$ git checkout -b test master...
it would fail with the message
fatal: Not a valid object name: 'master...'.
This was caused by the call to `create_branch` where `start_name` is
expected to be a valid rev. However, git-checkout allows the branch to
be a valid _merge base_ rev (i.e. with a "...") so it was possible for
an invalid rev to be passed in.
Make `create_branch` accept a merge base rev so that this case does not
error out.
As a side-effect, teach git-branch how to handle merge base revs as
well.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9801-git-p4-branch.sh')
0 files changed, 0 insertions, 0 deletions