Re: 2.43+ git checkout --theirs on stash error - no alternative?
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 27, 2024, 23:38 UTC
- Message-ID
- <Zx7O3VsZX2B9d9qN@nand.local>
- In-Reply-To
- <CANM0SV0Muk8KT6Mv=14ui07c6OzaNDDQwg2bUVRb8JyJWTyHnQ@mail.gmail.com>
On Sun, Oct 27, 2024 at 11:31:05PM +0100, Devste Devste wrote:
> Turns out the previous behavior can be achieved with
> git restore --source='stash@{0}' -- "some-file.txt"Hmm. What you wrote above here makes sense, but I agree with the original change from Junio (CC'd) that using `--theirs` does not make sense when the source is a tree-ish and not the index directly.
This is different, though, since here you are just trying to check out the contents of some-file.txt at stash@{0}, without `--theirs`. What did you mean in the previous example, and why was `--theirs` necessary in the call there?
Thanks, Taylor