3 # Copyright (c) 2005 Linus Torvalds
5 . git-sh-setup || 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-index --refresh >/dev/null 2>&1
42 if test -f "$GIT_DIR/HEAD"
44 git-diff-index -M --cached HEAD |
46 report "Updated but not checked in" "will commit"
54 sed 's/^/o o o o A /' |
55 report "Updated but not checked in" "will commit"
62 report "Changed but not updated" "use git-update-index to mark for commit"
64 if grep -v '^#' "$GIT_DIR/info/exclude" >/dev/null 2>&1
66 git-ls-files --others \
67 --exclude-from="$GIT_DIR/info/exclude" \
68 --exclude-per-directory=.gitignore |
73 # (use "git add" to add to commit)\
80 case "$committable" in
82 echo "nothing to commit"