stg rebase seems to mishandle files that exist in the current branch,
but have been deleted in the branch you're trying to rebase onto.
The files don't get deleted from the working tree, which means that
(a) "git status" lists them as untracked files
(b) subsequently trying to checkout a branch where the files still
existed will fail with
"error: The following untracked working tree files would be overwritten
by checkout:".
Demonstration:
$ git init testing
$ cd testing
$ touch foo bar baz
$ git add foo bar baz
$ git commit -a -m "initial commit"
[master (root-commit) c498938] initial commit
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
create mode 100644 baz
create mode 100644 foo
$ git checkout -b with-files
Switched to a new branch 'with-files'
$ git checkout master
Switched to branch 'master'
$ git checkout -b del-files
$ git rm bar
rm 'bar'
$ git commit -m "delete bar"
[del-files 1a014ec] delete bar
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 bar
$ git checkout with-files
$ stg init
$ git status
On branch with-files
nothing to commit, working directory clean
$ stg rebase del-files
Checking for changes in the working directory ... done
Rebasing to "del-files" ... done
No patches applied
$ git status
On branch with-files
Untracked files:
(use "git add <file>..." to include in what will be committed)
bar
nothing added to commit but untracked files present (use "git add" to track)
$ ls
bar baz foo
$ git checkout master
error: The following untracked working tree files would be overwritten
by checkout:
bar
Please move or remove them before you can switch branches.
Aborting
In particular, if I do an "stg rebase foo" when the stg patchstack
is completely empty, I ought surely to end up with the same working
tree as if I'd just done a "git checkout foo" ?
thanks
-- PMM
_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users