Skip to content

Commit

Permalink
Merge branch 'tr/maint-git-repack-tmpfile' into maint
Browse files Browse the repository at this point in the history
* tr/maint-git-repack-tmpfile:
  repack: place temporary packs under .git/objects/pack/
  • Loading branch information
gitster committed Nov 24, 2010
2 parents 9bdef78 + e32dfec commit 0f024af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git-repack.sh
Expand Up @@ -52,7 +52,7 @@ true)
esac

PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack"
PACKTMP="$PACKDIR/.tmp-$$-pack"
rm -f "$PACKTMP"-*
trap 'rm -f "$PACKTMP"-*' 0 1 2 3 15

Expand Down Expand Up @@ -82,6 +82,8 @@ case ",$all_into_one," in
;;
esac

mkdir -p "$PACKDIR" || exit

args="$args $local ${GIT_QUIET:+-q} $no_reuse$extra"
names=$(git pack-objects --keep-true-parents --honor-pack-keep --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
exit 1
Expand All @@ -90,7 +92,6 @@ if [ -z "$names" ]; then
fi

# Ok we have prepared all new packfiles.
mkdir -p "$PACKDIR" || exit

# First see if there are packs of the same name and if so
# if we can move them out of the way (this can happen if we
Expand Down

0 comments on commit 0f024af

Please sign in to comment.