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

[PATCH v3 1/4] rebase -i: execute hook only after argument checking

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 2, 2009, 22:28 UTC
Message-ID
<6a754e4198413c4051a6085c5e5baab163835463.1230935095.git.trast@student.ethz.ch>
In-Reply-To
<200901022320.14055.trast@student.ethz.ch>

Previously, the pre-rebase-hook would be launched before we knew if the <upstream> [<branch>] arguments were supplied.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

This is a quick fix and not really part of the series. 2/4 textually depends on it, however, so I'm sending it along.

 git-rebase--interactive.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c8b0861..2c668cd 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -554,7 +554,6 @@ first and then run 'git rebase --continue' again."
 		;;
 	--)
 		shift
-		run_pre_rebase_hook ${1+"$@"}
 		test $# -eq 1 -o $# -eq 2 || usage
 		test -d "$DOTEST" &&
 			die "Interactive rebase already started"
@@ -562,11 +561,13 @@ first and then run 'git rebase --continue' again."
 		git var GIT_COMMITTER_IDENT >/dev/null ||
 			die "You need to set your committer info first"
 
+		UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
+		run_pre_rebase_hook ${1+"$@"}
+
 		comment_for_reflog start
 
 		require_clean_work_tree
 
-		UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
 		test -z "$ONTO" && ONTO=$UPSTREAM
 
 		if test ! -z "$2"
-- 
1.6.1.71.gaaa47.dirty
Previous: Thomas RastNext: Thomas Rast
Message 14 of 27 in “rebase --root”
  1. 0/3 rebase --rootThomas Rast, Dec 29, 2008
  2. rebase: learn to rebase root commitThomas Rast, Dec 29, 2008
  3. rebase -i: learn to rebase root commitThomas Rast, Dec 29, 2008
  4. rebase: update documentation for --rootThomas Rast, Dec 29, 2008
  5. Thomas RastDec 29, 2008
  6. Boyd Stephen Smith Jr.Dec 29, 2008
  7. Thomas RastDec 30, 2008
  8. 1/3 rebase: learn to rebase root commitThomas Rast, Dec 30, 2008
  9. 2/3 rebase -i: learn to rebase root commitThomas Rast, Dec 30, 2008
  10. 3/3 rebase: update documentation for --rootThomas Rast, Dec 30, 2008
  11. Junio C HamanoJan 1, 2009
  12. Johannes SchindelinJan 2, 2009
  13. Thomas RastJan 2, 2009
  14. 1/4 rebase -i: execute hook only after argument checkingThomas Rast, Jan 2, 2009
  15. 2/4 rebase: learn to rebase root commitThomas Rast, Jan 2, 2009
  16. 3/4 rebase -i: learn to rebase root commitThomas Rast, Jan 2, 2009
  17. 4/4 rebase: update documentation for --rootThomas Rast, Jan 2, 2009
  18. 3/4 rebase -i: learn to rebase root commitThomas Rast, Jan 2, 2009
  19. 2/4 rebase: learn to rebase root commitThomas Rast, Jan 2, 2009
  20. Junio C HamanoJan 2, 2009
  21. rebase: learn to rebase root commitThomas Rast, Jan 2, 2009
  22. rebase: learn to rebase root commitThomas Rast, Jan 5, 2009
  23. Junio C HamanoJan 6, 2009
  24. Junio C HamanoJan 2, 2009
  25. Thomas RastJan 2, 2009
  26. Junio C HamanoJan 2, 2009
  27. Junio C HamanoDec 30, 2008

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.