3 # Copyright (c) 2005 Linus Torvalds
5 . git-sh-setup || die "Not a git archive"
14 while read 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=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD)
37 *) echo "# On branch $branch" ;;
40 git-update-index -q --unmerged --refresh || exit
42 if GIT_DIR="$GIT_DIR" git-rev-parse --verify HEAD >/dev/null 2>&1
44 git-diff-index -M --cached --name-status HEAD |
49 report "Updated but not checked in" "will commit"
62 report "Updated but not checked in" "will commit"
67 git-diff-files --name-status |
72 report "Changed but not updated" "use git-update-index to mark for commit"
75 if test -f "$GIT_DIR/info/exclude"
77 git-ls-files -z --others \
78 --exclude-from="$GIT_DIR/info/exclude" \
79 --exclude-per-directory=.gitignore
81 git-ls-files -z --others \
82 --exclude-per-directory=.gitignore
93 print "#\n# Untracked files:\n";
94 print "# (use \"git add\" to add to commit)\n#\n";
101 case "$committable" in
103 echo "nothing to commit"