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

[PATCH 4/4] git-rebase: don't ignore unexpected command line arguments

From
Brandon Casey <drafnel@gmail.com>
Date
Sep 17, 2017, 22:28 UTC
Message-ID
<1505687297-31183-4-git-send-email-drafnel@gmail.com>
In-Reply-To
<1505687297-31183-1-git-send-email-drafnel@gmail.com>

Currently, git-rebase will silently ignore any unexpected command-line switches and arguments (the command-line produced by git rev-parse). This allowed the rev-parse bug, fixed in the preceding commits, to go unnoticed. Let's make sure that doesn't happen again. We shouldn't be ignoring unexpected arguments. Let's not.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 git-rebase.sh | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/git-rebase.sh b/git-rebase.sh
index ad8415e..6344e8d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -350,6 +350,9 @@ do
 		shift
 		break
 		;;
+	*)
+		usage
+		;;
 	esac
 	shift
 done
-- 
2.2.0.rc3
Previous: Brandon Casey
Message 4 of 4 in “t1502: demonstrate rev-parse --parseopt option mis-parsing”
  1. 1/4 t1502: demonstrate rev-parse --parseopt option mis-parsingBrandon Casey, Sep 17, 2017
  2. 2/4 rev-parse parseopt: do not search help text for flag charsBrandon Casey, Sep 17, 2017
  3. 3/4 rev-parse parseopt: interpret any whitespace as start of help textBrandon Casey, Sep 17, 2017
  4. 4/4 git-rebase: don't ignore unexpected command line argumentsBrandon Casey, Sep 17, 2017

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.