summaryrefslogtreecommitdiff
path: root/t/t3010-ls-files-killed-modified.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-17 22:40:05 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-12 18:45:45 -0700
commit531220ba500168bc5a2080df24dfd61705cafa3c (patch)
treeec9c2f1bb9a4effe48a794ac04eec695080b830a /t/t3010-ls-files-killed-modified.sh
parent937978e0f3e750d917768c77665d5f8cfbd802b6 (diff)
downloadgit-jc/send-email-skip-backup.tar.gz
send-email: detect and offer to skip backup filesjc/send-email-skip-backup
Diligent people save output from format-patch to files, proofread and edit them and then finally send the result out. If the resulting files are sent out with "git send-email 0*", this ends up sending backup files (e.g. 0001-X.patch.backup or 0001-X.patch~) left by their editors next to the final version. Sending them with "git send-email 0*.patch" (if format-patch was run with the standard suffix) would avoid such an embarrassment, but not everybody is careful. After collecting files to be sent (and sorting them if read from a directory), notice when the file being sent out has the same name as the previous file, plus some suffix (e.g. 0001-X.patch was sent, and we are looking at 0001-X.patch.backup or 0001-X.patch~), and the suffix begins with a non-alnum (e.g. ".backup" or "~") and ask if the user really wants to send it out. Once the user skips sending such a "backup" file, remember the suffix and stop asking the same question (e.g. after skipping 0001-X.patch~, skip 0002-Y.patch~ without asking). Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3010-ls-files-killed-modified.sh')
0 files changed, 0 insertions, 0 deletions