Surprise at git stash pop

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

 



Hello,

'git stash pop' erased my local modifications, but not all of them.
Here is the dump of my terminal window with comments:

1) 1 item in the stash:

petschy@stormbringer:~/...$ git stash list
stash@{0}: WIP on 20110207-oracle: 089709b Merge branch
'20110207-oracle' of ssh:.... into 20110207-oracle

2) the status of the working tree

petschy@stormbringer:~/...$ git status
# On branch 20110207-oracle
# Your branch is ahead of 'origin/20110207-oracle' by 2 commits.
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    modified:   SQLQueryCache.cpp
#    modified:   SQLQueryCache.hpp
#    modified:   ../../server/plugins-src/ads/AdsPlugin.cpp
#    modified:   ../../server/plugins-src/ads/AdsPlugin.hpp

3) querying the details of the stashed item

petschy@stormbringer:~/...$ git stash show stash@{0}
 build-configs.def |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

4) popping it, naively

petschy@stormbringer:~/...$ git stash pop
Auto-merging build-configs.def
CONFLICT (content): Merge conflict in build-configs.def

5) surprise, surprise!

petschy@stormbringer:~/...$ git status
# On branch 20110207-oracle
# Your branch is ahead of 'origin/20110207-oracle' by 2 commits.
#
# Unmerged paths:
#   (use "git reset HEAD <file>..." to unstage)
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#    both modified:      ../../build-configs.def
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    modified:  SQLQueryCache.cpp

ALL of the local modifications to SQLQueryCache.hpp, AdsPlugin.cpp/hpp
simply disappeared! Is this the expected behaviour? I don't think so.
Since the stash contained only one file, which had nothing to do with
the pending modifications, I thought it's safe to pop. And even if the
local modifications and the stashed files overlap, I'd expect a
warning, at least. Half day's work gone. And if this is business as
usual, why not all my local modifications were wiped?

Regards, Peter
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]