Made git_show_affected_files cross platform at the expense of colorized revision (for now)

This commit is contained in:
Nathan Broadbent
2011-10-20 12:11:55 +08:00
parent 8700f41ba8
commit 6c82cc25ed

View File

@@ -82,7 +82,7 @@ git_silent_add_shorcuts() {
git_show_affected_files(){ git_show_affected_files(){
f=0 # File count f=0 # File count
# Show colored revision and commit message # Show colored revision and commit message
echo -n "# "; script -q -c "git show --oneline --name-only $@" /dev/null | sed "s/\r//g" | head -n 1; echo "# " echo -n "# "; git show --oneline --name-only $@ | sed "s/\r//g" | head -n 1; echo "# "
for file in $(git show --pretty="format:" --name-only $@ | grep -v '^$'); do for file in $(git show --pretty="format:" --name-only $@ | grep -v '^$'); do
let f++ let f++
export $git_env_char$f=$file # Export numbered variable. export $git_env_char$f=$file # Export numbered variable.