diff options
author | Junio C Hamano <junkio@cox.net> | 2005-05-30 13:53:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-30 18:10:46 -0700 |
commit | 2036d841020b7500eca7d568bd0c353b4fe73408 (patch) | |
tree | bb1208cb084fcbe33ab225db7dec133a5eb19d30 | |
parent | git-resolve-script: use "git-apply --stat" instead of diffstat (diff) | |
download | tgif-2036d841020b7500eca7d568bd0c353b4fe73408.tar.xz |
[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>
-rwxr-xr-x | git-commit-script | 4 | ||||
-rwxr-xr-x | git-status-script | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/git-commit-script b/git-commit-script index f8d568ce88..42ee399bc1 100755 --- a/git-commit-script +++ b/git-commit-script @@ -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 diff --git a/git-status-script b/git-status-script index 72a93f74e8..f91bb55894 100755 --- a/git-status-script +++ b/git-status-script @@ -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" |