aboutsummaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-31 12:19:11 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-31 12:19:11 -0700
commitf67d2e82d6d2fd385d3d20e8d348eaf69dc95041 (patch)
treee1c16bbf610d405e77443f51f121d857d44eba0b /builtin/checkout.c
parent1c9d71944a7a35cdfeb09200b20e261737cdc0b9 (diff)
parent9553d2b26395d9a19bf60875784661090f607f4a (diff)
downloadgit-f67d2e82d6d2fd385d3d20e8d348eaf69dc95041.tar.gz
git-f67d2e82d6d2fd385d3d20e8d348eaf69dc95041.tar.xz
Merge branch 'jk/format-patch-am'
* jk/format-patch-am: format-patch: preserve subject newlines with -k clean up calling conventions for pretty.c functions pretty: add pp_commit_easy function for simple callers mailinfo: always clean up rfc822 header folding t: test subject handling in format-patch / am pipeline Conflicts: builtin/branch.c builtin/log.c commit.h
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 476176951..28cdc51b8 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -306,9 +306,8 @@ static void show_local_changes(struct object *head, struct diff_options *opts)
static void describe_detached_head(const char *msg, struct commit *commit)
{
struct strbuf sb = STRBUF_INIT;
- struct pretty_print_context ctx = {0};
parse_commit(commit);
- pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);
+ pp_commit_easy(CMIT_FMT_ONELINE, commit, &sb);
fprintf(stderr, "%s %s... %s\n", msg,
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
strbuf_release(&sb);
@@ -623,14 +622,12 @@ static int clear_commit_marks_from_one_ref(const char *refname,
static void describe_one_orphan(struct strbuf *sb, struct commit *commit)
{
- struct pretty_print_context ctx = { 0 };
-
parse_commit(commit);
strbuf_addstr(sb, " ");
strbuf_addstr(sb,
find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
strbuf_addch(sb, ' ');
- pretty_print_commit(CMIT_FMT_ONELINE, commit, sb, &ctx);
+ pp_commit_easy(CMIT_FMT_ONELINE, commit, sb);
strbuf_addch(sb, '\n');
}