git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "martin f. krafft" <madduck@madduck.net>
To: git@vger.kernel.org
Cc: "martin f. krafft" <madduck@madduck.net>,
	penny leach <penny@mjollnir.org>
Subject: [PATCH] git-am: implement --reject option passed to git-apply
Date: Fri, 23 Jan 2009 11:31:21 +1100	[thread overview]
Message-ID: <1232670681-25781-1-git-send-email-madduck@madduck.net> (raw)

With --reject, git-am simply passes the --reject option to git-apply and thus
allows people to work with reject files if they so prefer.

The patch does not touch t/t4252-am-options.sh (yet) because I do not really
understand how the testing system works.

Signed-off-by: martin f. krafft <madduck@madduck.net>

---
 Documentation/git-am.txt |    2 ++
 git-am.sh                |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 5cbbe76..efd311b 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -12,6 +12,7 @@ SYNOPSIS
 'git am' [--signoff] [--keep] [--utf8 | --no-utf8]
 	 [--3way] [--interactive]
 	 [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
+	 [--reject]
 	 [<mbox> | <Maildir>...]
 'git am' (--skip | --resolved | --abort)
 
@@ -63,6 +64,7 @@ default.   You could use `--no-utf8` to override this.
 -C<n>::
 -p<n>::
 --directory=<dir>::
+--reject::
 	These flags are passed to the 'git-apply' (see linkgit:git-apply[1])
 	program that applies
 	the patch.
diff --git a/git-am.sh b/git-am.sh
index e20dd88..b1c05c9 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -19,6 +19,7 @@ whitespace=     pass it through git-apply
 directory=      pass it through git-apply
 C=              pass it through git-apply
 p=              pass it through git-apply
+reject          pass it through git-apply
 resolvemsg=     override error message when patch failure occurs
 r,resolved      to be used after a patch failure
 skip            skip the current patch
@@ -168,6 +169,8 @@ do
 		git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
 	-C|-p)
 		git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;
+	--reject)
+		git_apply_opt="$git_apply_opt $1" ;;
 	--)
 		shift; break ;;
 	*)
-- 
tg: (9a01387..) git-am--reject (depends on: master)

             reply	other threads:[~2009-01-23  0:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23  0:31 martin f. krafft [this message]
2009-01-24  0:59 ` [PATCH] git-am: implement --reject option passed to git-apply Junio C Hamano

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=1232670681-25781-1-git-send-email-madduck@madduck.net \
    --to=madduck@madduck.net \
    --cc=git@vger.kernel.org \
    --cc=penny@mjollnir.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).