diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2007-10-09 09:35:22 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-10-15 20:24:27 -0400 |
commit | 304b5af64f9b5a6b5e9455e2dcab381c568452b6 (patch) | |
tree | 475eab770fc6f36a88593ba7b17f958c0ad9fb4f /t | |
parent | Fix embarrassing "git log --follow" bug (diff) | |
download | tgif-304b5af64f9b5a6b5e9455e2dcab381c568452b6.tar.xz |
Clean up "git log" format with DIFF_FORMAT_NO_OUTPUT
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3900-i18n-commit.sh | 2 | ||||
-rw-r--r-- | t/t4013/diff.log_-SF_master | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh index fcbabe8ec3..94b1c24b0a 100755 --- a/t/t3900-i18n-commit.sh +++ b/t/t3900-i18n-commit.sh @@ -8,7 +8,7 @@ test_description='commit and log output encodings' . ./test-lib.sh compare_with () { - git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current && + git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' >current && git diff current "$2" } diff --git a/t/t4013/diff.log_-SF_master b/t/t4013/diff.log_-SF_master index 6162ed2018..c1599f2f52 100644 --- a/t/t4013/diff.log_-SF_master +++ b/t/t4013/diff.log_-SF_master @@ -4,5 +4,4 @@ Author: A U Thor <author@example.com> Date: Mon Jun 26 00:02:00 2006 +0000 Third - $ |