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

[PATCH 4/6] Improve error message for git-filter-branch

From
John Tapsell <johnflux@gmail.com>
Date
Feb 19, 2009, 07:36 UTC
Message-ID
<200902190736.35364.johnflux@gmail.com>
Tell the user that a backup (original) already exists, and how to solve
this problem (with -f option)
---
 git-filter-branch.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 27b57b8..1ca45e2 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -226,7 +226,8 @@ while read sha1 type name
 do
 	case "$force,$name" in
 	,$orig_namespace*)
-		die "Namespace $orig_namespace not empty"
+		die "Cannot backup - a previous backup already exists in $orig_namespace\n" \
+		    "Force overwriting the backup with -f"
 	;;
 	t,$orig_namespace*)
 		git update-ref -d "$name" $sha1
-- 
1.6.2.rc1.3.g7d31b.dirty
Next: Sverre Rabbelier
Message 1 of 5 in “Improve error message for git-filter-branch”
  1. 4/6 Improve error message for git-filter-branchJohn Tapsell, Feb 19, 2009
  2. Sverre RabbelierFeb 19, 2009
  3. John TapsellFeb 19, 2009
  4. Johannes SchindelinFeb 19, 2009
  5. Sverre RabbelierFeb 19, 2009

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.