X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-status-script;h=2b029545de3366d4d51b9060bc31cc6dc97260a5;hb=80b52b0f9d04fa0b8863fef2beef937ee1a486ae;hp=1696f23e04a1b96234c60ae07306fdd94d0da314;hpb=ba966b957908248396402acd785d10ba1da07294;p=git.git diff --git a/git-status-script b/git-status-script index 1696f23e..2b029545 100755 --- a/git-status-script +++ b/git-status-script @@ -39,11 +39,23 @@ esac git-update-cache --refresh >/dev/null 2>&1 -git-diff-cache -M --cached HEAD | -sed 's/^://' | -report "Updated but not checked in" "will commit" +if test -f "$GIT_DIR/HEAD" +then + git-diff-cache -M --cached HEAD | + sed 's/^://' | + report "Updated but not checked in" "will commit" -committable="$?" + committable="$?" +else + echo '# +# Initial commit +#' + git-ls-files | + sed 's/^/o o o o A /' | + report "Updated but not checked in" "will commit" + + committable="$?" +fi git-diff-files | sed 's/^://' |