summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 866b973)
raw | patch | inline | side by side (parent: 866b973)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 30 May 2005 20:53:45 +0000 (13:53 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 31 May 2005 01:10:46 +0000 (18:10 -0700) |
Should be obvious...
- Use $VISUAL, $EDITOR, in this order if set, and fall back on
vi.
- Status R, C, D, N usually are followed by number, so adjust
case arms to that pattern.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Use $VISUAL, $EDITOR, in this order if set, and fall back on
vi.
- Status R, C, D, N usually are followed by number, so adjust
case arms to that pattern.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
git-commit-script | patch | blob | history | |
git-status-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index f8d568ce88ff1e372b94c6dbfaeded149dcf103f..42ee399bc1028ab483aa4678ad376c065d7e7a5d 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
cat .editmsg
exit 1
fi
-ED=${VISUAL:$EDITOR}
-ED=${ED:vi}
-$ED .editmsg
+${VISUAL:-${EDITOR:-vi}} .editmsg
grep -v '^#' < .editmsg | git-stripspace > .cmitmsg
[ -s .cmitmsg ] || exit 1
tree=$(git-write-tree) || exit 1
diff --git a/git-status-script b/git-status-script
index 72a93f74e8152417578f4c250852450a61bd8440..f91bb55894a07f3ebca9031f2fa2ba2ef8789ffd 100755 (executable)
--- a/git-status-script
+++ b/git-status-script
trailer="#
"
case "$status" in
- M) echo "# modified: $name";;
- D) echo "# deleted: $name";;
- T) echo "# typechange: $name";;
- C) echo "# copied: $name -> $newname";;
- R) echo "# renamed: $name -> $newname";;
- N) echo "# new file: $name";;
- U) echo "# unmerged: $name";;
+ M ) echo "# modified: $name";;
+ D*) echo "# deleted: $name";;
+ T ) echo "# typechange: $name";;
+ C*) echo "# copied: $name -> $newname";;
+ R*) echo "# renamed: $name -> $newname";;
+ N*) echo "# new file: $name";;
+ U ) echo "# unmerged: $name";;
esac
done
echo -n "$trailer"