Reduce value duplication in t9300-fast-import.
[gitweb.git] / git-fetch.sh
index 466fe59e35e03a6f9955f78e4238d9e0a60b8dc0..c58704d7946d47d238f1dd25bad00d7d29533b48 100755 (executable)
@@ -231,11 +231,12 @@ update_local_ref () {
     esac
 }
 
-case "$update_head_ok" in
-'')
+# updating the current HEAD with git-fetch in a bare
+# repository is always fine.
+if test -z "$update_head_ok" && test $(is_bare_repository) = false
+then
        orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
-       ;;
-esac
+fi
 
 # If --tags (and later --heads or --all) is specified, then we are
 # not talking about defaults stored in Pull: line of remotes or