git: handle absolute paths better
we were catting $gitrel onto absolute paths. stop it.
This commit is contained in:
parent
4f3437a3cc
commit
fd9679d97b
3 changed files with 8 additions and 7 deletions
|
@ -16,17 +16,18 @@ if(~ $remove 1){
|
|||
if(~ $#* 0)
|
||||
exec aux/usage
|
||||
|
||||
paths=`$nl{cleanname -d $gitrel $*}
|
||||
if(~ $add tracked)
|
||||
files=`$nl{walk -f $gitrel/$*}
|
||||
files=`$nl{walk -f $paths}
|
||||
if not
|
||||
files=`$nl{cd .git/index9/tracked/ && walk -f $gitrel/$*}
|
||||
files=`$nl{cd .git/index9/tracked/ && walk -f $paths}
|
||||
|
||||
for(f in $files){
|
||||
if(! ~ `{cleanname $f} .git/*){
|
||||
if(! ~ `$nl{cleanname $f} .git/*){
|
||||
addpath=.git/index9/$add/$f
|
||||
delpath=.git/index9/$del/$f
|
||||
mkdir -p `{basename -d $addpath}
|
||||
mkdir -p `{basename -d $delpath}
|
||||
mkdir -p `$nl{basename -d $addpath}
|
||||
mkdir -p `$nl{basename -d $delpath}
|
||||
# We don't want a matching qid, so that
|
||||
# git/walk doesn't think this came from
|
||||
# a checkout.
|
||||
|
|
|
@ -135,7 +135,7 @@ if not if(~ $#revise 1){
|
|||
|
||||
files=()
|
||||
if(! ~ $#* 0)
|
||||
files=`$nl{git/walk -c `$nl{cleanname $gitrel/$*}}
|
||||
files=`$nl{git/walk -c `$nl{cleanname -d $gitrel $*}}
|
||||
if(~ $status '' || ~ $#files 0 && ! test -f .git/index9/merge-parents && ~ $#revise 0)
|
||||
die 'nothing to commit' $status
|
||||
@{
|
||||
|
|
|
@ -12,7 +12,7 @@ if(~ $#commit 0)
|
|||
|
||||
files=()
|
||||
if(! ~ $#* 0)
|
||||
files=`{cleanname $gitrel/$*}
|
||||
files=`{cleanname -d $gitrel $*}
|
||||
|
||||
branch=`{git/query -p $commit}
|
||||
if(~ $summarize 1){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue