Skip to contentSkip to conversation

stg pop/push -a nitpick: not handling deleted files

DISCUSSION Auke Kok 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Auke Kok

author
#0 lore raw

Hi,

minor nitpick when working with a patch that deletes a file: stg does not handle the 'abandoned' file when popping all patches off - essentially it would have to put the file back over an abandoned file.

I'm not sure what the resolution of this would be, but this problem could very well be anticipated (after all I just pushed/imported a patch removing the file to the stack).

Cheers,

Auke

$ stg pop -a
Popping "all_git_versions.patch" - "all_copyright_update.patch" patches...fatal: Untracked working tree file 'drivers/net/e1000/LICENSE' would be overwritten by merge.
stg pop: git-read-tree failed (local changes maybe?)
#1 lore raw
Quoted 3 lines · Auke Kok

minor nitpick when working with a patch that deletes a file: stg does not handle the 'abandoned' file when popping all patches off - essentially it would have to put the file back over an abandoned file.

[...]

Quoted 5 lines
$ stg pop -a
Popping "all_git_versions.patch" - "all_copyright_update.patch"
patches...fatal: Untracked working tree file
'drivers/net/e1000/LICENSE' would be overwritten by merge.
stg pop: git-read-tree failed (local changes maybe?)

I don't think it's an StGIT-specific issue, git-read-tree failed to switch the working tree from one commit to another because a file would be overwritten. It is probably safer to fail in this situation.

Signature · 1 line
Catalin