Skip to content

Commit 3bc5180

Browse files
pcloudsgitster
authored andcommitted
git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects
If $GIT_COMMON_DIR is set, $GIT_OBJECT_DIRECTORY should be $GIT_COMMON_DIR/objects, not $GIT_DIR/objects. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c7b3a3d commit 3bc5180

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-sh-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ git_dir_init () {
344344
echo >&2 "Unable to determine absolute path of git directory"
345345
exit 1
346346
}
347-
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
347+
: ${GIT_OBJECT_DIRECTORY="$(git rev-parse --git-path objects)"}
348348
}
349349
350350
if test -z "$NONGIT_OK"

0 commit comments

Comments
 (0)