From: Vasily Titskiy <qehgt0@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH v1 2/2] Ignore dirty submodule states during stash
Date: Tue, 17 May 2016 03:40:50 +0000 [thread overview]
Message-ID: <20160517034050.GC2782@gmail.com> (raw)
In-Reply-To: <20160517033632.GA2782@gmail.com>
It checks if 'stash pop' does not trigger merge conflics
in submodules.
---
t/t3903-stash.sh | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 2142c1f..e48a5b5 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -731,4 +731,39 @@ test_expect_success 'stash list --cc shows combined diff' '
test_cmp expect actual
'
+test_expect_success 'stash ignores changes in submodules' '
+ git submodule init &&
+ git init sub1 &&
+ (
+ cd sub1 &&
+ echo "x" > file1 &&
+ git add file1 &&
+ git commit -a -m "initial sub1"
+ ) &&
+ git submodule add ./. sub1 &&
+ echo "main" > file1 &&
+ git add file1 &&
+ git commit -a -m "initial main" &&
+ # make changes in submodule
+ (
+ cd sub1 &&
+ echo "y" >> file1 &&
+ git commit -a -m "change y"
+ ) &&
+ git commit sub1 -m "update reference" &&
+ # switch submodule to another revision
+ (
+ cd sub1 &&
+ echo "z" >> file1 &&
+ git commit -a -m "change z"
+ ) &&
+ # everything is prepared, check if changes in submodules are ignored
+ echo "local change" >> file1 &&
+ git stash save &&
+ git checkout HEAD~1 &&
+ git submodule update &&
+ git stash pop
+'
+
+
test_done
--
2.1.4
next prev parent reply other threads:[~2016-05-17 3:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 3:36 [PATCH v1 0/2] Ignore dirty submodule states during stash Vasily Titskiy
2016-05-17 3:40 ` [PATCH v1 1/2] " Vasily Titskiy
2016-05-17 3:40 ` Vasily Titskiy [this message]
2016-05-17 3:49 ` [PATCH v1 2/2] " Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160517034050.GC2782@gmail.com \
--to=qehgt0@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).