diff options
author | Jean Delvare <jdelvare@suse.de> | 2016-10-19 10:26:36 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2016-10-19 10:26:36 +0200 |
commit | 11842f0687ac300a6b36e1d5fe8f4118e6590bf0 (patch) | |
tree | 07dc86c08b13328ce9d17949fd36acceae5d416e | |
parent | 20f06212baced666027131555ad4c834d8e4b232 (diff) | |
download | quilt-11842f0687ac300a6b36e1d5fe8f4118e6590bf0.tar.gz |
diff: Report diff failures
"quilt refresh" reports diff failures to the user. "quilt diff"
should do the same.
-rw-r--r-- | quilt/refresh.in | 1 | ||||
-rw-r--r-- | quilt/scripts/patchfns.in | 1 | ||||
-rw-r--r-- | test/faildiff.test | 1 |
3 files changed, 2 insertions, 1 deletions
diff --git a/quilt/refresh.in b/quilt/refresh.in index a10659f..50dabc6 100644 --- a/quilt/refresh.in +++ b/quilt/refresh.in @@ -232,7 +232,6 @@ do fi if ! diff_file "$file" "$old_file" "$new_file" then - printf $"Diff failed on file '%s', aborting\n" "$new_file" >&2 die 1 fi diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in index a496f3b..7da39d1 100644 --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in @@ -759,6 +759,7 @@ diff_file() # Test the return value of diff, and propagate the error retcode if any if [ ${PIPESTATUS[0]} == 2 -o ${PIPESTATUS[1]} == 1 ] then + printf $"Diff failed on file '%s', aborting\n" "$new_file" >&2 return 1 fi } diff --git a/test/faildiff.test b/test/faildiff.test index d601a55..5afb8e3 100644 --- a/test/faildiff.test +++ b/test/faildiff.test @@ -29,6 +29,7 @@ What happens on binary files? $ printf "\\003\\000\\001" > test.bin $ quilt diff -pab --no-index >~ (Files|Binary files) a/test\.bin and b/test\.bin differ + > Diff failed on file 'test.bin', aborting $ echo %{?} > 1 |