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

[PATCH] repack: honor -d even when no new pack was created

From
Martin Waitz <tali@admingilde.org>
Date
May 7, 2006, 18:18 UTC
Message-ID
<20060507181853.GA23738@admingilde.org>

If all objects are reachable via an alternate object store then we still have to remove all obsolete local packs.

Signed-off-by: Martin Waitz <tali@admingilde.org>
---
 git-repack.sh |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
c37df94d2b1633ce329bbe079805073b40a48548
diff --git a/git-repack.sh b/git-repack.sh
index e0c9f32..4fb3f26 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -48,15 +48,15 @@ name=$(git-rev-list --objects --all $rev
 	exit 1
 if [ -z "$name" ]; then
 	echo Nothing new to pack.
-	exit 0
-fi
-echo "Pack pack-$name created."
+else
+	echo "Pack pack-$name created."
 
-mkdir -p "$PACKDIR" || exit
+	mkdir -p "$PACKDIR" || exit
 
-mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
-mv .tmp-pack-$name.idx  "$PACKDIR/pack-$name.idx" ||
-exit
+	mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
+	mv .tmp-pack-$name.idx  "$PACKDIR/pack-$name.idx" ||
+	exit
+fi
 
 if test "$remove_redundant" = t
 then
-- 
1.3.1.g6ef7
Message 1 of 1 in “repack: honor -d even when no new pack was created”
  1. repack: honor -d even when no new pack was createdMartin Waitz, May 7, 2006

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.