summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ecf4831)
raw | patch | inline | side by side (parent: ecf4831)
author | Pascal Obry <pascal.obry@wanadoo.fr> | |
Mon, 26 Nov 2007 22:04:28 +0000 (23:04 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 Nov 2007 04:42:21 +0000 (20:42 -0800) |
When colors are set to "true" on the repository, the git log output
will contain control characters to set/reset the colors, even when
the output is to a pipe. This makes list_stash() fail as the
downstream sed does not see what it is expecting.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
will contain control characters to set/reset the colors, even when
the output is to a pipe. This makes list_stash() fail as the
downstream sed does not see what it is expecting.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | patch | blob | history |
diff --git a/git-stash.sh b/git-stash.sh
index 534eb168abf8b0b8ae5c2195bf85b66d9cb6b21e..dd155568d96771b2dcd62ecae0cc2c050169bf52 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
# state of the base commit
if b_commit=$(git rev-parse --verify HEAD)
then
- head=$(git log --abbrev-commit --pretty=oneline -n 1 HEAD)
+ head=$(git log --no-color --abbrev-commit --pretty=oneline -n 1 HEAD --)
else
die "You do not have the initial commit yet"
fi
list_stash () {
have_stash || return 0
- git log --pretty=oneline -g "$@" $ref_stash |
+ git log --no-color --pretty=oneline -g "$@" $ref_stash -- |
sed -n -e 's/^[.0-9a-f]* refs\///p'
}