diff options
-rw-r--r-- | quilt/edit.in | 2 | ||||
-rw-r--r-- | test/edit.test | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/quilt/edit.in b/quilt/edit.in index 27c34ce..b9a84dd 100644 --- a/quilt/edit.in +++ b/quilt/edit.in @@ -71,7 +71,7 @@ for file in "$@" do if ! [ -e "$SUBDIR$file" ] then - quilt_command revert "$file" + quilt_command remove "$file" status=1 fi done diff --git a/test/edit.test b/test/edit.test index eabe752..daa30be 100644 --- a/test/edit.test +++ b/test/edit.test @@ -37,6 +37,17 @@ $ quilt files $ quilt refresh > Refreshed patch patches/patch +# Test the behavior if the editor is called on a new file but +# does not actually create it +$ cat > editor +< #! /bin/sh +< echo Doing nothing to $1 + +$ quilt edit nofoo +> File nofoo added to patch patches/patch +> Doing nothing to nofoo +> File nofoo removed from patch patches/patch + # Test the behavior if the editor creates a brand new file $ cat > editor < #! /bin/sh |