diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-21 02:59:51 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-21 02:59:51 -0700 |
commit | f6ef6b852370da51bbd3d033c9d7e1bf62cac345 (patch) | |
tree | 7b70aaaa798e891f56222082234aac336ac5f1c7 /builtin-log.c | |
parent | Merge branch 'jc/dirwalk-n-cache-tree' into next (diff) | |
parent | git-format-patch: now built-in. (diff) | |
download | tgif-f6ef6b852370da51bbd3d033c9d7e1bf62cac345.tar.xz |
Merge branch 'js/fmt-patch' into next
* js/fmt-patch:
git-format-patch: now built-in.
fmt-patch: Support --attach
diff family: add --check option
Document that "git add" only adds non-ignored files.
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/builtin-log.c b/builtin-log.c index 12a6d19203..c8feb0f795 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -183,7 +183,12 @@ int cmd_format_patch(int argc, const char **argv, char **envp) argv[i + 1]); output_directory = strdup(argv[i + 1]); i++; - } else + } + else if (!strcmp(argv[i], "--attach")) + rev.mime_boundary = git_version_string; + else if (!strncmp(argv[i], "--attach=", 9)) + rev.mime_boundary = argv[i] + 9; + else argv[j++] = argv[i]; } argc = j; @@ -224,8 +229,14 @@ int cmd_format_patch(int argc, const char **argv, char **envp) shown = log_tree_commit(&rev, commit); free(commit->buffer); commit->buffer = NULL; - if (shown) - printf("-- \n%s\n\n", git_version_string); + if (shown) { + if (rev.mime_boundary) + printf("\n--%s%s--\n\n\n", + mime_boundary_leader, + rev.mime_boundary); + else + printf("-- \n%s\n\n", git_version_string); + } if (!use_stdout) fclose(stdout); } |