about summary refs log tree commit diff
path: root/third_party/git/builtin/merge-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/builtin/merge-base.c')
-rw-r--r--third_party/git/builtin/merge-base.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/third_party/git/builtin/merge-base.c b/third_party/git/builtin/merge-base.c
index e3f8da13b69b..6719ac198dc2 100644
--- a/third_party/git/builtin/merge-base.c
+++ b/third_party/git/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;