Re: [PATCH] Ignore dirty submodule states during stash

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

 



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@xxxxxxxxx> 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
--
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]