[StGit PATCH 2/5] Add the --reject option to fold

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxxxx>
---
 stgit/commands/fold.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/stgit/commands/fold.py b/stgit/commands/fold.py
index 66a2dd9..28e824c 100644
--- a/stgit/commands/fold.py
+++ b/stgit/commands/fold.py
@@ -38,7 +38,9 @@ options = [
     opt('-t', '--threeway', action = 'store_true',
         short = 'Perform a three-way merge with the current patch'),
     opt('-b', '--base', args = [argparse.commit],
-        short = 'Use BASE instead of HEAD applying the patch')]
+        short = 'Use BASE instead of HEAD when applying the patch'),
+    opt('--reject', action = 'store_true',
+        short = 'Leave the rejected hunks in corresponding *.rej files')]
 
 directory = DirectoryHasRepository(log = True)
 
@@ -72,11 +74,12 @@ def func(parser, options, args):
     if options.threeway:
         crt_patch = crt_series.get_patch(current)
         bottom = crt_patch.get_bottom()
-        git.apply_patch(filename = filename, base = bottom)
+        git.apply_patch(filename = filename, base = bottom,
+                        reject = options.reject)
     elif options.base:
-        git.apply_patch(filename = filename,
+        git.apply_patch(filename = filename, reject = options.reject,
                         base = git_id(crt_series, options.base))
     else:
-        git.apply_patch(filename = filename)
+        git.apply_patch(filename = filename, reject = options.reject)
 
     out.done()

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]