author | Christian Couder <chriscool@tuxfamily.org> | |
Tue, 29 Jul 2008 05:42:53 +0000 (07:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Jul 2008 06:02:12 +0000 (23:02 -0700) | ||
commit | df57accb46695b50e2db94424e9d4ebfed0694c8 | |
tree | 4dc6b1d875ed0d7f6f81bd84446b164cfc4bac47 | tree | snapshot |
parent | 65c35b2256ecbfaebcf04559fe6070807646afff | commit | diff |
merge-base: die with an error message if not passed a commit ref
Before this patch "git merge-base" just exited with error code 1
and without an error message in case it was passed a ref to an
object that is not a commit (for example a tree).
This patch makes it "die" in this case with an error message.
While at it, this patch also refactors the code to get the
commit reference from an argument into a new
"get_commit_reference" function.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Before this patch "git merge-base" just exited with error code 1
and without an error message in case it was passed a ref to an
object that is not a commit (for example a tree).
This patch makes it "die" in this case with an error message.
While at it, this patch also refactors the code to get the
commit reference from an argument into a new
"get_commit_reference" function.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-merge-base.c | diff | blob | history |