summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-03-27 00:11:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-27 00:11:21 (GMT)
commitfb4175b0e4bec59b97dae84a0073d8a5334508d6 (patch)
tree737f3835be75b15214fa58b42594f912d36c9c66 /builtin
parent4e4baee3f44da26a5eaab27c76d597b04fef5259 (diff)
parentf08132f889c00a8108f61541e047649ad0e660e4 (diff)
downloadgit-fb4175b0e4bec59b97dae84a0073d8a5334508d6.zip
git-fb4175b0e4bec59b97dae84a0073d8a5334508d6.tar.gz
git-fb4175b0e4bec59b97dae84a0073d8a5334508d6.tar.bz2
Merge branch 'at/rebase-fork-point-regression-fix'
The "--fork-point" mode of "git rebase" regressed when the command was rewritten in C back in 2.20 era, which has been corrected. * at/rebase-fork-point-regression-fix: rebase: --fork-point regression fix
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge-base.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index e3f8da1..6719ac1 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -114,26 +114,16 @@ static int handle_is_ancestor(int argc, const char **argv)
static int handle_fork_point(int argc, const char **argv)
{
struct object_id oid;
- char *refname;
struct commit *derived, *fork_point;
const char *commitname;
- switch (dwim_ref(argv[0], strlen(argv[0]), &oid, &refname)) {
- case 0:
- die("No such ref: '%s'", argv[0]);
- case 1:
- break; /* good */
- default:
- die("Ambiguous refname: '%s'", argv[0]);
- }
-
commitname = (argc == 2) ? argv[1] : "HEAD";
if (get_oid(commitname, &oid))
die("Not a valid object name: '%s'", commitname);
derived = lookup_commit_reference(the_repository, &oid);
- fork_point = get_fork_point(refname, derived);
+ fork_point = get_fork_point(argv[0], derived);
if (!fork_point)
return 1;