3 # Copyright (c) 2005 Linus Torvalds
23 while read status name newname
30 M
) echo "# modified: $name";;
31 D
*) echo "# deleted: $name";;
32 T
) echo "# typechange: $name";;
33 C
*) echo "# copied: $name -> $newname";;
34 R
*) echo "# renamed: $name -> $newname";;
35 A
*) echo "# new file: $name";;
36 U
) echo "# unmerged: $name";;
39 printf '%s' "$trailer"
43 branch
=$
(GIT_DIR
="$GIT_DIR" git-symbolic-ref HEAD
)
46 *) echo "# On branch $branch" ;;
49 git-update-index
-q --unmerged --refresh ||
exit
51 if GIT_DIR
="$GIT_DIR" git-rev-parse
--verify HEAD
>/dev
/null
2>&1
53 git-diff-index
-M --cached --name-status --diff-filter=MDTCRA HEAD |
58 report
"Updated but not checked in" "will commit"
71 report
"Updated but not checked in" "will commit"
76 git-diff-files
--name-status |
81 report
"Changed but not updated" "use git-update-index to mark for commit"
84 if test -f "$GIT_DIR/info/exclude"
86 git-ls-files
-z --others --directory \
87 --exclude-from="$GIT_DIR/info/exclude" \
88 --exclude-per-directory=.gitignore
90 git-ls-files
-z --others --directory \
91 --exclude-per-directory=.gitignore
102 print "#\n# Untracked files:\n";
103 print "# (use \"git add\" to add to commit)\n#\n";
110 case "$committable" in
112 echo "nothing to commit"