[PATCH] Buglets fix in the new two scripts
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>
This commit is contained in:
parent
866b973b5d
commit
2036d84102
@ -5,9 +5,7 @@ then
|
||||
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
|
||||
|
@ -13,13 +13,13 @@ report () {
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user