Made git_show_affected_files cross platform at the expense of colorized revision (for now)
This commit is contained in:
@@ -82,7 +82,7 @@ git_silent_add_shorcuts() {
|
||||
git_show_affected_files(){
|
||||
f=0 # File count
|
||||
# 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
|
||||
let f++
|
||||
export $git_env_char$f=$file # Export numbered variable.
|
||||
|
||||
Reference in New Issue
Block a user