Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  git-name-rev: don't use printf without format
  • Loading branch information
gitster committed Aug 3, 2008
2 parents 6612f87 + 7c5b167 commit 57b0fc4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions builtin-name-rev.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ static void name_rev_line(char *p, struct name_ref_data *data)
unsigned char sha1[40];
const char *name = NULL;
char c = *(p+1);
int p_len = p - p_start + 1;

forty = 0;

Expand All @@ -204,13 +205,10 @@ static void name_rev_line(char *p, struct name_ref_data *data)
if (!name)
continue;

if (data->name_only) {
fwrite(p_start, p - p_start + 1 - 40, 1, stdout);
printf(name);
} else {
fwrite(p_start, p - p_start + 1, 1, stdout);
printf(" (%s)", name);
}
if (data->name_only)
printf("%.*s%s", p_len - 40, p_start, name);
else
printf("%.*s (%s)", p_len, p_start, name);
p_start = p + 1;
}
}
Expand Down

0 comments on commit 57b0fc4

Please sign in to comment.