summaryrefslogtreecommitdiff
path: root/builtin/name-rev.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-10-24 08:53:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-10-24 22:43:50 (GMT)
commit0064053bd76ba385e1b5d51b6175bc17bc507804 (patch)
tree50da5cf8b850762e6219618292a14941fd163e2f /builtin/name-rev.c
parent7059dccc6c60a872a314b19ac17702065a71d6bd (diff)
downloadgit-0064053bd76ba385e1b5d51b6175bc17bc507804.zip
git-0064053bd76ba385e1b5d51b6175bc17bc507804.tar.gz
git-0064053bd76ba385e1b5d51b6175bc17bc507804.tar.bz2
assume parse_commit checks commit->object.parsed
The parse_commit function will check the "parsed" flag of the object and do nothing if it is set. There is no need for callers to check the flag themselves, and doing so only clutters the code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r--builtin/name-rev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 0aaa19e..26f4033 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -27,8 +27,7 @@ static void name_rev(struct commit *commit,
struct commit_list *parents;
int parent_number = 1;
- if (!commit->object.parsed)
- parse_commit(commit);
+ parse_commit(commit);
if (commit->date < cutoff)
return;