author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Aug 2010 23:42:59 +0000 (16:42 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Aug 2010 23:42:59 +0000 (16:42 -0700) |
* maint:
for-each-ref: fix objectname:short bug
tree-walk: Correct bitrotted comment about tree_entry()
Fix 'git log' early pager startup error case
for-each-ref: fix objectname:short bug
tree-walk: Correct bitrotted comment about tree_entry()
Fix 'git log' early pager startup error case
builtin/for-each-ref.c | patch | blob | history | |
builtin/log.c | patch | blob | history | |
git.c | patch | blob | history | |
tree-walk.h | patch | blob | history |
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index a2b28c6962be8ea6f8882bae3d4fde9d972e78d2..89e75c6894e6fdb2abbe464d825f5c7186a14141 100644 (file)
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
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 08b872263cd646ec9d7dc8ad91273c71b1af2b69..eaa1ee0fa71a344af747dec038c6a5907c8273a5 100644 (file)
--- a/builtin/log.c
+++ b/builtin/log.c
rev->show_decorations = 1;
load_ref_decorations(decoration_style);
}
+ setup_pager();
}
/*
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);
}
index 6fc07a568d34d50745cca26fcaf46bc99bbfceba..12d2952e079103c87b1f176f6928de4f342de9b5 100644 (file)
--- a/git.c
+++ b/git.c
{ "index-pack", cmd_index_pack },
{ "init", cmd_init_db },
{ "init-db", cmd_init_db },
- { "log", cmd_log, RUN_SETUP | USE_PAGER },
+ { "log", cmd_log, RUN_SETUP },
{ "ls-files", cmd_ls_files, RUN_SETUP },
{ "ls-tree", cmd_ls_tree, RUN_SETUP },
{ "ls-remote", cmd_ls_remote },
{ "send-pack", cmd_send_pack, RUN_SETUP },
{ "shortlog", cmd_shortlog, USE_PAGER },
{ "show-branch", cmd_show_branch, RUN_SETUP },
- { "show", cmd_show, RUN_SETUP | USE_PAGER },
+ { "show", cmd_show, RUN_SETUP },
{ "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
{ "stripspace", cmd_stripspace },
{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
{ "var", cmd_var },
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
{ "version", cmd_version },
- { "whatchanged", cmd_whatchanged, RUN_SETUP | USE_PAGER },
+ { "whatchanged", cmd_whatchanged, RUN_SETUP },
{ "write-tree", cmd_write_tree, RUN_SETUP },
{ "verify-pack", cmd_verify_pack },
{ "show-ref", cmd_show_ref, RUN_SETUP },
diff --git a/tree-walk.h b/tree-walk.h
index 88ea7e92981375ff0313e7cd46971b4680b3eb79..7e3e0b5ad16710c06464726ac04d2b1c48af3708 100644 (file)
--- a/tree-walk.h
+++ b/tree-walk.h
void update_tree_entry(struct tree_desc *);
void init_tree_desc(struct tree_desc *desc, const void *buf, unsigned long size);
-/* Helper function that does both of the above and returns true for success */
+/*
+ * Helper function that does both tree_entry_extract() and update_tree_entry()
+ * and returns true for success
+ */
int tree_entry(struct tree_desc *, struct name_entry *);
void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1);