aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-26 16:42:59 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-26 16:42:59 -0700
commit515cc0101943b766fde7aa894827119e332ec033 (patch)
tree29fb328e0ef904cf78c2c06a0fbc49e0e484dbae /builtin
parentb5442ca101c2d2b6eacaf3428505e5006f2218ae (diff)
parentea16a030aaaaebb3d0038e3ec2d9cd837985dee0 (diff)
downloadgit-515cc0101943b766fde7aa894827119e332ec033.tar.gz
git-515cc0101943b766fde7aa894827119e332ec033.tar.xz
Merge branch 'maint'
* maint: for-each-ref: fix objectname:short bug tree-walk: Correct bitrotted comment about tree_entry() Fix 'git log' early pager startup error case
Diffstat (limited to 'builtin')
-rw-r--r--builtin/for-each-ref.c3
-rw-r--r--builtin/log.c7
2 files changed, 3 insertions, 7 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index a2b28c696..89e75c689 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -228,7 +228,8 @@ static void grab_common_values(struct atom_value *val, int deref, struct object
v->s = s;
}
else if (!strcmp(name, "objectname:short")) {
- v->s = find_unique_abbrev(obj->sha1, DEFAULT_ABBREV);
+ v->s = xstrdup(find_unique_abbrev(obj->sha1,
+ DEFAULT_ABBREV));
}
}
}
diff --git a/builtin/log.c b/builtin/log.c
index 08b872263..eaa1ee0fa 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -125,6 +125,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
rev->show_decorations = 1;
load_ref_decorations(decoration_style);
}
+ setup_pager();
}
/*
@@ -491,12 +492,6 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
rev.use_terminator = 1;
rev.always_show_header = 1;
- /*
- * We get called through "git reflog", so unlike the other log
- * routines, we need to set up our pager manually..
- */
- setup_pager();
-
return cmd_log_walk(&rev);
}