History

git: handle absolute paths better

we were catting $gitrel onto absolute paths. stop it.

Ori Bernstein committed 5 years ago

Commit bd6837e1 parent a76f63d3 files · +8 −7Browse files

Showing the changes to sys/src/cmd/git/commit (1 of 3 files). Show all

Unified · Split

sys/src/cmd/git/commit+1−1
@@ -135,7 +135,7 @@ if not if(~ $#revise 1){ · 134 unmodified lines
135 135
136files=()136files=()
137if(! ~ $#* 0)137if(! ~ $#* 0)
138 files=`$nl{git/walk -c `$nl{cleanname $gitrel/$*}}138 files=`$nl{git/walk -c `$nl{cleanname -d $gitrel $*}}
139if(~ $status '' || ~ $#files 0 && ! test -f .git/index9/merge-parents && ~ $#revise 0)139if(~ $status '' || ~ $#files 0 && ! test -f .git/index9/merge-parents && ~ $#revise 0)
140 die 'nothing to commit' $status140 die 'nothing to commit' $status
141@{141@{