aboutsummaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-07-22 10:59:36 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-22 10:59:37 -0700
commit12621cb22224d1c2f507a643a578e386ee891c5c (patch)
treed0ab888b37baa09db9c7ef74840b739ff3cafb09 /builtin/blame.c
parent4328190a81ea5aef679774322c7f9faf06b453af (diff)
parent1cefa143250ad8c60e2a3db6c18278f7bed508f5 (diff)
downloadgit-12621cb22224d1c2f507a643a578e386ee891c5c.tar.gz
git-12621cb22224d1c2f507a643a578e386ee891c5c.tar.xz
Merge branch 'rs/code-cleaning'
* rs/code-cleaning: remote-testsvn: use internal argv_array of struct child_process in cmd_import() bundle: use internal argv_array of struct child_process in create_bundle() fast-import: use hashcmp() for SHA1 hash comparison transport: simplify fetch_objs_via_rsync() using argv_array run-command: use internal argv_array of struct child_process in run_hook_ve() use commit_list_count() to count the members of commit_lists strbuf: use strbuf_addstr() for adding C strings
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 23212cbe8..17d30d00a 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1371,11 +1371,8 @@ static struct commit_list *first_scapegoat(struct rev_info *revs, struct commit
static int num_scapegoats(struct rev_info *revs, struct commit *commit)
{
- int cnt;
struct commit_list *l = first_scapegoat(revs, commit);
- for (cnt = 0; l; l = l->next)
- cnt++;
- return cnt;
+ return commit_list_count(l);
}
/* Distribute collected unsorted blames to the respected sorted lists