diff options
| author | Junio C Hamano <junkio@cox.net> | 2005-09-01 01:02:39 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2005-09-01 01:02:39 -0700 |
| commit | 80b52b0f9d04fa0b8863fef2beef937ee1a486ae (patch) | |
| tree | c7c43792796b1936d975694c10b278ce1e161339 /git-status-script | |
| parent | Merge refs/heads/master from . (diff) | |
| parent | Use 'git status' now it can handle initial commit. (diff) | |
| download | git-80b52b0f9d04fa0b8863fef2beef937ee1a486ae.tar.gz git-80b52b0f9d04fa0b8863fef2beef937ee1a486ae.zip | |
Merge refs/heads/master from .
Diffstat (limited to 'git-status-script')
| -rwxr-xr-x | git-status-script | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/git-status-script b/git-status-script index 1696f23e04..2b029545de 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/^://' | |
