[StGit PATCH] Discard stderr output from git apply

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

 



It prints error messages when it fails, and we don't need to see them
since we don't care exactly _why_ it failed.

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

With the optimizations that make us start using apply a lot; I noticed
git apply was spamming on stderr.

 stgit/lib/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/stgit/lib/git.py b/stgit/lib/git.py
index 6ccdfa7..9208965 100644
--- a/stgit/lib/git.py
+++ b/stgit/lib/git.py
@@ -556,7 +556,7 @@ class Index(RunWithEnv):
         """In-index patch application, no worktree involved."""
         try:
             self.run(['git', 'apply', '--cached']
-                     ).raw_input(patch_text).no_output()
+                     ).raw_input(patch_text).discard_stderr().no_output()
         except run.RunException:
             raise MergeException('Patch does not apply cleanly')
     def delete(self):

--
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]

  Powered by Linux