{"thread":{"id":"4637","subject":"[PATCH] git-commit: allow -e option anywhere on command line","startedAt":"2006-06-23T13:43:38Z","lastAt":"2006-06-23T23:56:22Z","messageCount":2,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"22356","messageId":"20060623134338.GA12630@coredump.intra.peff.net","threadId":"4637","inReplyTo":null,"subject":"[PATCH] git-commit: allow -e option anywhere on command line","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-06-23T13:43:38Z","receivedAt":"2006-06-23T13:43:38Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Previously, the command 'git-commit -e -m foo' would ignore the '-e' option\nbecause the '-m' option overwrites the no_edit flag during sequential\noption parsing. Now we cause -e to reset the no_edit flag after all\noptions are parsed.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n git-commit.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 6dd04fd..4bb16db 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -199,6 +199,7 @@ only=\n logfile=\n use_commit=\n amend=\n+edit_flag=\n no_edit=\n log_given=\n log_message=\n@@ -246,7 +247,7 @@ do\n       shift\n       ;;\n   -e|--e|--ed|--edi|--edit)\n-      no_edit=\n+      edit_flag=t\n       shift\n       ;;\n   -i|--i|--in|--inc|--incl|--inclu|--includ|--include)\n@@ -384,6 +385,7 @@ do\n       ;;\n   esac\n done\n+case \"$edit_flag\" in t) no_edit= ;; esac \n \n ################################################################\n # Sanity check options\n-- \n1.4.1.rc1.gf603-dirty\n"},{"id":"22391","messageId":"7vk6778lzt.fsf@assigned-by-dhcp.cox.net","threadId":"4637","inReplyTo":"20060623134338.GA12630@coredump.intra.peff.net","subject":"Re: [PATCH] git-commit: allow -e option anywhere on command line","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-23T23:56:22Z","receivedAt":"2006-06-23T23:56:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Makes sense.  Thanks.\n"}]}