3 # Copyright (c) 2005 Linus Torvalds
5 . git-sh-setup-script || die
"Not a git archive"
14 while read oldmode mode oldsha sha status name newname
21 M
) echo "# modified: $name";;
22 D
*) echo "# deleted: $name";;
23 T
) echo "# typechange: $name";;
24 C
*) echo "# copied: $name -> $newname";;
25 R
*) echo "# renamed: $name -> $newname";;
26 A
*) echo "# new file: $name";;
27 U
) echo "# unmerged: $name";;
34 branch
=`readlink "$GIT_DIR/HEAD"`
37 *) echo "# On branch $branch" ;;
40 git-update-cache
--refresh >/dev
/null
2>&1
42 git-diff-cache
-M --cached HEAD |
44 report
"Updated but not checked in" "will commit"
50 report
"Changed but not updated" "use git-update-cache to mark for commit"
52 if grep -v '^#' "$GIT_DIR/info/exclude" >/dev
/null
2>&1
54 git-ls-files
--others \
55 --exclude-from="$GIT_DIR/info/exclude" \
56 --exclude-per-directory=.gitignore |
61 # (use "git add" to add to commit)\
68 if [ "$committable" == "0" ]
70 echo "nothing to commit"