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

[PATCH] git-repack: clear out tmp packfiles from $PACKDIR instead of cwd

From
MLMartin Langhoff <martin@catalyst.net.nz>
Date
Sep 4, 2006, 05:42 UTC
Message-ID
<11573485362686-git-send-email-martin@catalyst.net.nz>
Temp packfiles should never be created in cwd anyway ;-)
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
---
 git-repack.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-repack.sh b/git-repack.sh
index ccc8e43..eee0d72 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -24,8 +24,9 @@ do
 	shift
 done
 
-rm -f .tmp-pack-*
 PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
+mkdir -p "$PACKDIR" || exit
+rm -f "$PACKDIR/.tmp-pack-*"
 
 # There will be more repacking strategies to come...
 case ",$all_into_one," in
@@ -43,7 +44,6 @@ case ",$all_into_one," in
 	;;
 esac
 
-mkdir -p "$PACKDIR" || exit
 pack_objects="$pack_objects $local $quiet $no_reuse_delta$extra"
 name=$( { git-rev-list --objects --all $rev_list ||
 	  echo "git-rev-list died with exit code $?"
-- 
1.4.2.gdfe7


-- 
VGER BF report: U 0.983488
Next: Martin Langhoff
Message 1 of 4 in “git-repack: clear out tmp packfiles from $PACKDIR instead of cwd”
  1. git-repack: clear out tmp packfiles from $PACKDIR instead of cwdMartin Langhoff, Sep 4, 2006
  2. Martin LanghoffSep 4, 2006
  3. Jakub NarebskiSep 4, 2006
  4. Martin LanghoffSep 4, 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.