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>

Nguyễn Thái Ngọc Duy committed Nov 30, 2014 at 15:24 UTC 3bc518084acfdbc81a656c9cdff1f1bd50e0615f
1 file changed +1 -1
git-sh-setup.sh
+1 -1
@@ -344,7 +344,7 @@ git_dir_init () {
344 echo >&2 "Unable to determine absolute path of git directory"
345 exit 1
346 }
347 - : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
347 + : ${GIT_OBJECT_DIRECTORY="$(git rev-parse --git-path objects)"}
348 }
349
350 if test -z "$NONGIT_OK"