git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Vasily Titskiy <qehgt0@gmail.com>
Cc: Stefan Beller <sbeller@google.com>, git@vger.kernel.org
Subject: Re: [PATCH] Ignore dirty submodule states during stash
Date: Mon, 16 May 2016 18:29:03 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1605161817590.3303@virtualbox> (raw)
In-Reply-To: <20160516154606.GA8797@gmail.com>

Hi Vasily,

On Mon, 16 May 2016, Vasily Titskiy wrote:

> On Sun, May 15, 2016 at 11:37:20PM -0700, Stefan Beller wrote:
> > On Sun, May 15, 2016 at 7:07 PM, Vasily Titskiy <qehgt0@gmail.com> wrote:
> > > Do not save states of submodules as stash should ignore it.
> > 
> > Can you explain why this is a good idea?
> > (It is not obvious to me either way.)
> Actually, submodules are already ignored by stash, but not fully (it was
> introduced in commit 6848d58).
> Current behavior is counter-intuitive, for example (if one has a project
> with a submodule):
>  [...]
> 
> 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.

Please make it a habit to put such information into the commit message. I
have to admit that I was as puzzled as Stefan by the proposed patch. Such
problems, and tedious back-and-forth discussion, can be easily avoided by
providing additional background in the commit message. We even ask in our
Documentation/SubmittingPatches explicitly to do that:

> The body should provide a meaningful commit message, which:
>
>   . explains the problem the change tries to solve, iow, what is wrong
>     with the current code without the change.
>
>   . justifies the way the change solves the problem, iow, why the
>     result with the change is better.
>
>   . alternate solutions considered but discarded, if any.

BTW this is not something we ask to make contributors' lives harder. In
fact it helps everybody, including the contributors themselves. Just
imagine what kind of kick-ass commit message you would want to read in six
months when you stumble over your very own commit and want to know what
the heck it was about.

Ciao,
Johannes

      parent reply	other threads:[~2016-05-16 16:29 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
2016-05-16 16:29     ` Johannes Schindelin [this message]

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=alpine.DEB.2.20.1605161817590.3303@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=qehgt0@gmail.com \
    --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).