git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 3/9] am: parse options in stuck-long mode

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 14, 2014, 19:51 UTC
Message-ID
<1392407513-37443-4-git-send-email-sandals@crustytoothpaste.net>
In-Reply-To
<1392407513-37443-1-git-send-email-sandals@crustytoothpaste.net>
From: Nicolas Vigier <boklm@mars-attacks.org>

There is no functional change. The reason for this change is to be able to add a new option taking an optional argument.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 git-am.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/git-am.sh b/git-am.sh
index a3b6f98..020abf6 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -4,7 +4,7 @@
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_KEEPDASHDASH=
-OPTIONS_STUCKLONG=
+OPTIONS_STUCKLONG=t
 OPTIONS_SPEC="\
 git am [options] [(<mbox>|<Maildir>)...]
 git am [options] (--continue | --skip | --abort)
@@ -414,14 +414,14 @@ it will be removed. Please do not use it anymore."
 		abort=t ;;
 	--rebasing)
 		rebasing=t threeway=t ;;
-	--resolvemsg)
-		shift; resolvemsg=$1 ;;
-	--whitespace|--directory|--exclude|--include)
-		git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
-	-C|-p)
-		git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;
-	--patch-format)
-		shift ; patch_format="$1" ;;
+	--resolvemsg=*)
+		resolvemsg="${1#--resolvemsg=}" ;;
+	--whitespace=*|--directory=*|--exclude=*|--include=*)
+		git_apply_opt="$git_apply_opt $(sq "$1")" ;;
+	-C*|-p*)
+		git_apply_opt="$git_apply_opt $(sq "$1")" ;;
+	--patch-format=*)
+		patch_format="${1#--patch-format=}" ;;
 	--reject|--ignore-whitespace|--ignore-space-change)
 		git_apply_opt="$git_apply_opt $1" ;;
 	--committer-date-is-author-date)
-- 
1.9.0.rc3.1008.gd08b47c.dirty
Previous: brian m. carlsonNext: brian m. carlson
Message 4 of 10 in “add --gpg-sign to rebase and pull”
  1. 0/9 add --gpg-sign to rebase and pullbrian m. carlson, Feb 14, 2014
  2. 1/9 cherry-pick, revert: add the --gpg-sign optionbrian m. carlson, Feb 14, 2014
  3. 2/9 git-sh-setup.sh: add variable to use the stuck-long modebrian m. carlson, Feb 14, 2014
  4. 3/9 am: parse options in stuck-long modebrian m. carlson, Feb 14, 2014
  5. 4/9 am: add the --gpg-sign optionbrian m. carlson, Feb 14, 2014
  6. 5/9 rebase: remove useless arguments checkbrian m. carlson, Feb 14, 2014
  7. 6/9 rebase: don't try to match -M optionbrian m. carlson, Feb 14, 2014
  8. 7/9 rebase: parse options in stuck-long modebrian m. carlson, Feb 14, 2014
  9. 8/9 rebase: add the --gpg-sign optionbrian m. carlson, Feb 14, 2014
  10. 9/9 pull: add the --gpg-sign option.brian m. carlson, Feb 14, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.