summaryrefslogtreecommitdiff
path: root/t/t4013
AgeCommit message (Collapse)Author
2008-07-30format-patch: Produce better output with --inline or --attachKevin Ballard
This patch makes two small changes to improve the output of --inline and --attach. The first is to write a newline preceding the boundary. This is needed because MIME defines the encapsulation boundary as including the preceding CRLF (or in this case, just LF), so we should be writing one. Without this, the last newline in the pre-diff content is consumed instead. The second change is to always write the line termination character (default: newline) even when using --inline or --attach. This is simply to improve the aesthetics of the resulting message. When using --inline an email client should render the resulting message identically to the non-inline version. And when using --attach this adds a blank line preceding the attachment in the email, which is visually attractive. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24"git diff": do not ignore index without --no-indexJunio C Hamano
Even if "foo" and/or "bar" does not exist in index, "git diff foo bar" should not change behaviour drastically from "git diff foo bar baz" or "git diff foo". A feature that "sometimes works and is handy" is an unreliable cute hack. "git diff foo bar" outside a git repository continues to work as a more colourful alternative to "diff -u" as before. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02format-patch: wrap cover-letter's shortlog sensiblyJohannes Schindelin
Earlier, overly-long onelines would not be wrapped at all, and indented with 6 spaces. Instead, we now wrap around at 72 characters, with a first-line indent of 2 spaces, and the rest with 4 spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20Add a --cover-letter option to format-patchDaniel Barkalow
If --cover-letter is provided, generate a cover letter message before the patches, numbered 0. Original patch thanks to Johannes Schindelin Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-16Clean up "git log" format with DIFF_FORMAT_NO_OUTPUTLinus Torvalds
This fixes an unnecessary empty line that we add to the log message when we generate diffs, but don't actually end up printing any due to having DIFF_FORMAT_NO_OUTPUT set. This can happen with pickaxe or with rename following. The reason is that we normally add an empty line between the commit and the diff, but we do that even for the case where we've then suppressed the actual printing of the diff. This also updates a couple of tests that assumed the extraneous empty line would exist at the end of output. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-04Merge branch 'maint'Junio C Hamano
* maint: Document -<n> for git-format-patch glossary: add 'reflog' diff --no-index: fix --name-status with added files Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIES is too long
2007-07-03diff --no-index: fix --name-status with added filesJohannes Schindelin
Without this patch, an added file would be reported as /dev/null. Noticed by David Kastrup. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-03format-patch: Add format.subjectprefix config optionAdam Roben
This change lets you use the format.subjectprefix config option to override the default subject prefix. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-04-12Add testcase for format-patch --subject-prefix (take 3)Robin H. Johnson
Add testcase for format-patch --subject-prefix support. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05format-patch --attach: not folding some long headers.Junio C Hamano
Panagiotis Issaris reports that some MUAs seem not to like folded "content-type" and "content-disposition" headers, so this makes format-patch --attach output to avoid them. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-05format-patch: add --inline option and make --attach a true attachmentJohannes Schindelin
The existing --attach option did not create a true "attachment" but multipart/mixed with Content-Disposition: inline. It should have been with Content-Disposition: attachment. Introduce --inline to add multipart/mixed that is inlined, and make --attach to create an attachement. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18Add --summary to git-format-patch by defaultJunio C Hamano
This adds --summary output in addition to the --stat to the output from git-format-patch by default. I think additions, removals and filemode changes are rare but notable events and always showing it makes sense. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-05Turn on recursive with --summaryJohannes Schindelin
This makes "git log/diff --summary" imply recursive behaviour, whose effect is summarized in one test output: --- a/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial +++ b/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial @@ -5,7 +5,7 @@ Date: Mon Jun 26 00:00:00 2006 +0000 Initial - create mode 040000 dir + create mode 100644 dir/sub create mode 100644 file0 create mode 100644 file2 $ When a file is created in a subdirectory, we used to say just the directory name only when that directory also was created, which did not make sense from two reasons. It is not any more significant to create a new file in a new directory than to create a new file in an existing directory, and even if it were, reportinging the new directory name without saying the actual filename is not useful. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-14Adjust t4013 tests to corrected format-patch.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-14t4013 diff format tests updateJunio C Hamano
This changes one test commit in the sequence to have more than one lines of commit log. A few output formats (--pretty=email aka format-patch and --pretty=oneline) need to behave differently on single and multi-line log, and this change will help catching breakages. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-05Merge branch 'jc/diff-test'Junio C Hamano
* jc/diff-test: t4013: add "diff" UI program tests.
2006-07-02t4013: add "diff" UI program tests.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29t4013: note improvements brought by the new output code.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-29Merge branch 'jc/diff-test' into jc/diff-test-updatesJunio C Hamano
* jc/diff-test: t4013: add format-patch tests.
2006-06-29t4013: add format-patch tests.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-27t4013 test updates for new output code.Junio C Hamano
These are updates to the test vector that shows the "incompatibility" of the new output code. The changes are actually the good ones, so instead of keeping the older output we adjust the test to the new code. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-27t4013: add more tests around -c and --ccJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-26t4013: add tests for diff/log family output options.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>