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

2 messages from 2006-09-15 to 2006-09-15. Participants: Auke Kok, Catalin Marinas.
Thread: https://gitlist.dev/t/5574

## Auke Kok, 2006-09-15 17:19

Subject: stg pop/push -a nitpick: not handling deleted files
Message-ID: <450AE0AC.7060806@intel.com>
URL: https://gitlist.dev/e/450AE0AC.7060806%40intel.com

```

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?)

```

## Catalin Marinas, 2006-09-15 21:41

Subject: Re: stg pop/push -a nitpick: not handling deleted files
Message-ID: <tnxzmd03j0q.fsf@arm.com>
URL: https://gitlist.dev/e/tnxzmd03j0q.fsf%40arm.com
In-Reply-To: <450AE0AC.7060806@intel.com>

```
Auke Kok <auke-jan.h.kok@intel.com> wrote:
> 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.
[...]
> $ 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.

-- 
Catalin

```
