From: brian m. carlson Date: Wed, 2 May 2018 00:26:10 +0000 (+0000) Subject: merge-one-file: compute empty blob object ID X-Git-Tag: v2.18.0-rc0~17^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7882fa220c1f86e3f9707270e2e94d54149394ed?ds=inline;hp=--cc merge-one-file: compute empty blob object ID This script hard-codes the object ID of the empty blob. To avoid any problems when changing hashes, compute this value by calling git hash-object. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- 7882fa220c1f86e3f9707270e2e94d54149394ed diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 9879c59395..f6d9852d2f 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -120,7 +120,7 @@ case "${1:-.}${2:-.}${3:-.}" in case "$1" in '') echo "Added $4 in both, but differently." - orig=$(git unpack-file e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) + orig=$(git unpack-file $(git hash-object /dev/null)) ;; *) echo "Auto-merging $4"