summaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-27 22:01:30 (GMT)
commit043478308feec3cda9b3473bc0b79396cb9d4db6 (patch)
tree59e92b4034e40876a6abfaccdef9a121679d51e8 /builtin/blame.c
parenta06f23c7393d187be3ded662102ec2b7b1b28bd0 (diff)
parent4f1c0b21e9045ff12e1880b5724a032031716a24 (diff)
downloadgit-043478308feec3cda9b3473bc0b79396cb9d4db6.zip
git-043478308feec3cda9b3473bc0b79396cb9d4db6.tar.gz
git-043478308feec3cda9b3473bc0b79396cb9d4db6.tar.bz2
Merge branch 'ep/varscope'
Shrink lifetime of variables by moving their definitions to an inner scope where appropriate. * ep/varscope: builtin/gc.c: reduce scope of variables builtin/fetch.c: reduce scope of variable builtin/commit.c: reduce scope of variables builtin/clean.c: reduce scope of variable builtin/blame.c: reduce scope of variables builtin/apply.c: reduce scope of variables bisect.c: reduce scope of variable
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index e44a6bb..967a7c6 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1580,14 +1580,14 @@ static const char *format_time(unsigned long time, const char *tz_str,
int show_raw_time)
{
static char time_buf[128];
- const char *time_str;
- int time_len;
- int tz;
if (show_raw_time) {
snprintf(time_buf, sizeof(time_buf), "%lu %s", time, tz_str);
}
else {
+ const char *time_str;
+ int time_len;
+ int tz;
tz = atoi(tz_str);
time_str = show_date(time, tz, blame_date_mode);
time_len = strlen(time_str);