diff options
author | glenda <glenda@9front.local> | 2021-06-05 18:50:20 +0000 |
---|---|---|
committer | glenda <glenda@9front.local> | 2021-06-05 18:50:20 +0000 |
commit | 706aad3d94ee4d9ff93c8c21398f0bb471a438da (patch) | |
tree | 69a8e6864b44ee39a4b282ac0c7b59efe0f6c3d3 /sys/src | |
parent | a5282f9eab1b78bd65e5144c81bf0f19b3f9efaf (diff) |
git/branch: merge correct set of files
we were switching branches before we got the full list
of modified files, which could garble what we were trying
to merge.
Diffstat (limited to 'sys/src')
-rw-r--r--[-rwxr-xr-x] | sys/src/cmd/git/add | 0 | ||||
-rwxr-xr-x | sys/src/cmd/git/branch | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | sys/src/cmd/git/commit | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | sys/src/cmd/git/diff | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | sys/src/cmd/git/rebase | 0 |
5 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/git/add b/sys/src/cmd/git/add index a51e154ee..a51e154ee 100755..100644 --- a/sys/src/cmd/git/add +++ b/sys/src/cmd/git/add diff --git a/sys/src/cmd/git/branch b/sys/src/cmd/git/branch index f2b785a5d..f1b46717f 100755 --- a/sys/src/cmd/git/branch +++ b/sys/src/cmd/git/branch @@ -60,9 +60,10 @@ if(~ $#newbr 0){ commit=`{git/query $base} || die 'branch does not exist:' $base if(~ $new */*) mkdir -p .git/`{basename -d $new} -echo $commit > .git/$new -if(! ~ $#stay 0) +if(! ~ $#stay 0){ + echo $commit > .git/$new exit +} basedir=`{git/query -p $base} dirtypaths=() cleanpaths=($modified $deleted) @@ -79,6 +80,7 @@ if(! ~ $#cleandirs 0){ mkdir -p $cleandirs mkdir -p .git/index9/tracked/$cleandirs } +echo $commit > .git/$new for(m in $cleanpaths){ # Modifications can turn a file into # a directory, or vice versa, so we diff --git a/sys/src/cmd/git/commit b/sys/src/cmd/git/commit index 5b23f7706..5b23f7706 100755..100644 --- a/sys/src/cmd/git/commit +++ b/sys/src/cmd/git/commit diff --git a/sys/src/cmd/git/diff b/sys/src/cmd/git/diff index 075ea3ee9..075ea3ee9 100755..100644 --- a/sys/src/cmd/git/diff +++ b/sys/src/cmd/git/diff diff --git a/sys/src/cmd/git/rebase b/sys/src/cmd/git/rebase index 395f3e693..395f3e693 100755..100644 --- a/sys/src/cmd/git/rebase +++ b/sys/src/cmd/git/rebase |