diff options
author | Jeff King <peff@peff.net> | 2013-10-24 04:53:19 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-24 15:43:50 -0700 |
commit | 5e7d4d3e932432131d0f8f4195e0061ecf644865 (patch) | |
tree | 69826f91be44e4096551bc75e884f0f1db7d8db5 /sha1_name.c | |
parent | 0064053bd76ba385e1b5d51b6175bc17bc507804 (diff) | |
download | git-5e7d4d3e932432131d0f8f4195e0061ecf644865.tar.gz |
assume parse_commit checks for NULL commit
The parse_commit function will check whether it was passed a
NULL commit pointer, and if so, return an error. There is no
need for callers to check this separately.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sha1_name.c b/sha1_name.c index 65ad066d9b..729ab14a87 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -582,8 +582,6 @@ static int get_parent(const char *name, int len, if (ret) return ret; commit = lookup_commit_reference(sha1); - if (!commit) - return -1; if (parse_commit(commit)) return -1; if (!idx) { |