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

[PATCH 2/2] git-filter-branch.sh: don't use --default when calling rev-list

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jan 31, 2008, 00:15 UTC
Message-ID
<47A11317.2010409@nrlssc.navy.mil>
In-Reply-To
<1201738186-28132-1-git-send-email-casey@nrlssc.navy.mil>

This command requires a revision to be specified on the command line, so remove '--default HEAD' from the arguments to git rev-list. They are unnecessary.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 git-filter-branch.sh |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 5e3fe70..25f18f8 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -228,11 +228,10 @@ mkdir ../map || die "Could not create map/ directory"
 
 case "$filter_subdir" in
 "")
-	git rev-list --reverse --topo-order --default HEAD \
-		--parents "$@"
+	git rev-list --reverse --topo-order --parents "$@"
 	;;
 *)
-	git rev-list --reverse --topo-order --default HEAD \
+	git rev-list --reverse --topo-order \
 		--parents --full-history "$@" -- "$filter_subdir"
 esac > ../revs || die "Could not get the commits"
 commits=$(wc -l <../revs | tr -d " ")
-- 
1.5.4.rc5.14.gaa8fc
Previous: Junio C HamanoNext: Johannes Schindelin
Message 16 of 21 in “filter-branch: assume HEAD if no revision supplied”
  1. filter-branch: assume HEAD if no revision suppliedBrandon Casey, Jan 30, 2008
  2. Johannes SchindelinJan 30, 2008
  3. Junio C HamanoJan 30, 2008
  4. Brandon CaseyJan 30, 2008
  5. 1/2 filter-branch: only print usage information when no arguments suppliedBrandon Casey, Jan 31, 2008
  6. Junio C HamanoJan 31, 2008
  7. Brandon CaseyJan 31, 2008
  8. Junio C HamanoJan 31, 2008
  9. Johannes SchindelinJan 31, 2008
  10. Brandon CaseyJan 31, 2008
  11. filter-branch docs: remove brackets so not to imply revision arg is optionalBrandon Casey, Jan 31, 2008
  12. Junio C HamanoJan 31, 2008
  13. Johannes SchindelinJan 31, 2008
  14. Brandon CaseyJan 31, 2008
  15. Junio C HamanoJan 31, 2008
  16. 2/2 git-filter-branch.sh: don't use --default when calling rev-listBrandon Casey, Jan 31, 2008
  17. Johannes SchindelinJan 31, 2008
  18. Brandon CaseyJan 31, 2008
  19. Andreas EricssonJan 31, 2008
  20. Junio C HamanoJan 31, 2008
  21. Johannes SchindelinJan 31, 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.