summaryrefslogtreecommitdiff
path: root/git-applymbox.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-06 14:25:52 -0700
committerJunio C Hamano <junkio@cox.net>2005-10-06 14:25:52 -0700
commit4ebe63dfe6f2a8c652ecd8dfe6ab8a77b6c82b2f (patch)
tree251105b4524cb53515ae49551db7d6f40e3c7966 /git-applymbox.sh
parent47f0b6d5d49247b85898083d1ccf4f899ef7294a (diff)
downloadgit-4ebe63dfe6f2a8c652ecd8dfe6ab8a77b6c82b2f.tar.gz
Clean mail files after dealing with them.
When you are applying 200 mails in sequence, .dotest/ directory will be littered with many messsages, and when the patch in one of them fails to apply, it is not obvious which message was being processed. Remove the one that has been already dealt with, so that the last failed one is found typically as the lowest numbered split message. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-applymbox.sh')
-rwxr-xr-xgit-applymbox.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-applymbox.sh b/git-applymbox.sh
index a83246cad8..79abce2a25 100755
--- a/git-applymbox.sh
+++ b/git-applymbox.sh
@@ -82,7 +82,11 @@ do
do
git-applypatch .dotest/msg-clean .dotest/patch .dotest/info "$signoff"
case "$?" in
- 0 | 2 )
+ 0)
+ # Remove the cleanly applied one to reduce clutter.
+ rm -f .dotest/$i
+ ;;
+ 2)
# 2 is a special exit code from applypatch to indicate that
# the patch wasn't applied, but continue anyway
;;