Git stash pop with untracked files doesn't unpack untracked if a conflict happens

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear team,

I want to report some weird behaviour regarding git stash pop and untracked files committed with git stash -u. See the git report below:

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

1) Created an empty git repo: `git init`
2) Created 1 commit with a single file: `echo "test" >test.txt && git commit -a -m "init"`
3) Made some changes in the file i committed + created a new file: `echo "test2" >test.txt && echo "test2" >test2.txt`
4) Used stash -u to save my changes: `git stash -u`
5) Created a second commit with a different change on the existing file in order to force a conflict: `echo "test3" >test.txt && git commit -a -m "2"`
6) I git stash pop to create a conflict between the second commit and my stash from my first commit: `git stash pop`

What did you expect to happen? (Expected behavior)

I was expecting to have 1 file in conflict stage and the untracked file to be created in my current working directory.

What happened instead? (Actual behavior)

The untracked file is missing.

What's different between what you expected and what actually happened?

The untracked file is missing.

Anything else you want to add:

N/A

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.34.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
compiler info: clang: 13.0.0 (clang-1300.0.29.3)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]


Kindly,
Anastasios
Andronidis






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux