git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasily Titskiy <qehgt0@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Ignore dirty submodule states during stash
Date: Tue, 17 May 2016 03:17:05 +0000	[thread overview]
Message-ID: <20160517031705.GA2617@gmail.com> (raw)
In-Reply-To: <CAGZ79kZESuKiEt2RJJdWJPBySgbDA6abGkZMiTFgzaNCUP1_mA@mail.gmail.com>

Hi Stefan,

> > So, this is the issue. Instead of getting my local changes, I got a conflict (and stash is not
> > poped out). The root cause is the 'stash' command does not know how to deal with submodules,
> > but currently it tries to save the state of submodules, and even tries to re-apply the state
> > (and it fails of course). The proposed solution fixes this behaviour.
> >
> > All internal tests work fine with the change.
> 
> I think you could take the example as above and make it into a test?
> Showing that this change actually fixes a bug.
> 
> Looking for a good place, I would have expected t/t3906-stash-submodule.sh
> would be a good place to put your code, but I am not sure how to
> properly integrate that test there.
> 
> Maybe we can put the test in t3903 instead?
t3903 is better, as t3906 creates its submodule with forced 'ignore' option.
It's not a default parameter and it actually hides the issue. I'll send the
patches soon.


> >> Do we need a test/documentation updates for this?
> > I don't think so, 'stash' have never claimed submodule support.
> 
> But it also never explicitly claimed it doesn't support it.
> 
> Maybe we want to squash in something like
> (with better wording):
> 
> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
> index 92df596..b2649eb 100644
> --- a/Documentation/git-stash.txt
> +++ b/Documentation/git-stash.txt
> @@ -41,6 +41,8 @@ the usual reflog syntax (e.g. `stash@{0}` is the most recently
>  created stash, `stash@{1}` is the one before it, `stash@{2.hours.ago}`
>  is also possible).
> 
> +Stashing ignores submodule operations completely.
> +
>  OPTIONS
>  -------
Looks perfect to me.

--
  Vasily

  reply	other threads:[~2016-05-17  3:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16  2:07 [PATCH] Ignore dirty submodule states during stash Vasily Titskiy
2016-05-16  6:37 ` Stefan Beller
2016-05-16 15:46   ` Vasily Titskiy
2016-05-16 16:09     ` Stefan Beller
2016-05-17  3:17       ` Vasily Titskiy [this message]
2016-05-16 16:29     ` Johannes Schindelin

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=20160517031705.GA2617@gmail.com \
    --to=qehgt0@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    /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).