From: Joe Perches <joe@perches.com>
To: git@vger.kernel.org
Subject: [PATCH] git-send-email: Do not send editor backup files in a directory
Date: Fri, 22 Jul 2011 00:29:14 -0700 [thread overview]
Message-ID: <865ddd502d9ba4a19c33c69039ecb70ea12c0692.1311319658.git.joe@perches.com> (raw)
Sift out backup files that are commonly created by editors.
Signed-off-by: Joe Perches <joe@perches.com>
---
git-send-email.perl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 98ab33a..a4558d9 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -521,7 +521,9 @@ while (defined(my $f = shift @ARGV)) {
opendir my $dh, $f
or die "Failed to opendir $f: $!";
- push @files, grep { -f $_ } map { catfile($f, $_) }
+ push @files, grep { !/#.+#$/ && !/~$/ &&
+ !/\.bak$/ && !/\.orig$/ &&
+ -f $_ } map { catfile($f, $_) }
sort readdir $dh;
closedir $dh;
} elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) {
--
1.7.6.131.g99019
next reply other threads:[~2011-07-22 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 7:29 Joe Perches [this message]
2011-07-29 0:41 ` [PATCH] git-send-email: Do not send editor backup files in a directory Joe Perches
2011-07-29 6:47 ` Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=865ddd502d9ba4a19c33c69039ecb70ea12c0692.1311319658.git.joe@perches.com \
--to=joe@perches.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).