From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: git@vger.kernel.org
Cc: normalperson@yhbt.net, "Jörg Sommer" <joerg@alea.gnuu.de>
Subject: [PATCH] git add --interactive: Autoselect single patch file
Date: Sat, 22 Mar 2008 02:22:40 +0100 [thread overview]
Message-ID: <1206148960-29563-1-git-send-email-joerg@alea.gnuu.de> (raw)
If there's only one file to patch, select it automaticly and don't bother
the user. In the case he didn't want do patching, he can say 'd' at the
patch prompt.
Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
---
git-add--interactive.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index a0a81f1..77ad6fb 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -778,7 +778,7 @@ sub patch_update_cmd {
print STDERR "No changes.\n";
return 0;
}
- if ($patch_mode) {
+ if ($patch_mode or @mods == 1) {
@them = @mods;
}
else {
--
1.5.4.4
next reply other threads:[~2008-03-22 9:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-22 1:22 Jörg Sommer [this message]
2008-03-22 14:51 ` [PATCH] git add --interactive: Autoselect single patch file Johannes Schindelin
2008-03-22 15:41 ` Wincent Colaiuta
2008-03-22 16:00 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2008-02-28 11:15 Jörg Sommer
2008-02-29 2:00 ` Xavier Maillard
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=1206148960-29563-1-git-send-email-joerg@alea.gnuu.de \
--to=joerg@alea.gnuu.de \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/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).