-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "quote" misconversion for rewrite diff output.
663af34 (Full rework of quote_c_style and write_name_quoted.) mistakenly used puts() when writing out a fixed string when it did not want to add a terminating LF. Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Junio C Hamano
committed
Nov 22, 2007
1 parent
d794d9e
commit f8b6809
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
test_description='rewrite diff' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success setup ' | ||
cat ../../COPYING >test && | ||
git add test && | ||
tr 'a-zA-Z' 'n-za-mN-ZA-M' <../../COPYING >test | ||
' | ||
|
||
test_expect_success 'detect rewrite' ' | ||
actual=$(git diff-files -B --summary test) && | ||
expr "$actual" : " rewrite test ([0-9]*%)$" || { | ||
echo "Eh? <<$actual>>" | ||
false | ||
} | ||
' | ||
|
||
test_done | ||
|