diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-02-14 15:52:57 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2014-02-14 15:52:57 +0100 |
commit | 4d8358ae52ce574920c7f3aba7453f305fabf1ba (patch) | |
tree | af7a0817511b152500712622d0812207c596047a | |
parent | 1b9b6c60abb2537c114828ea597fad65c26ea51a (diff) | |
download | quilt-4d8358ae52ce574920c7f3aba7453f305fabf1ba.tar.gz |
files: Return nothing if there are no files
"quilt files" returns a blank line if no files are included in the
patch. This could easily break constructs such as "quilt files | wc
-l". Let "quilt files" return nothing at all if there are no files in
the patch.
-rw-r--r-- | quilt.changes | 5 | ||||
-rw-r--r-- | quilt/files.in | 2 | ||||
-rw-r--r-- | test/example1.test | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/quilt.changes b/quilt.changes index def8929..d1b8819 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Feb 14 15:49:11 CET 2014 - jdelvare@suse.de + +- files: Return nothing if there are no files. + +------------------------------------------------------------------- Wed Feb 12 20:57:35 CET 2014 - jdelvare@suse.de - test/run: Delay command line splitting. diff --git a/quilt/files.in b/quilt/files.in index 6e107ee..355fa21 100644 --- a/quilt/files.in +++ b/quilt/files.in @@ -128,7 +128,7 @@ list_files_in_patch() fi # Note: If opt_labels is set, then use_status is not set. IFS= - echo $(files_in_patch "$patch") | + files_in_patch "$patch" | sort | while read file do diff --git a/test/example1.test b/test/example1.test index ec73b81..7eaa228 100644 --- a/test/example1.test +++ b/test/example1.test @@ -12,6 +12,7 @@ http://the-tech.mit.edu/Shakespeare/midsummer/full.html $ quilt new flower.diff > Patch %{P}flower.diff is now on top + $ quilt files $ quilt add Oberon.txt > File Oberon.txt added to patch %{P}flower.diff |