Re: [PATCH] stash: tighten IS_STASH_LIKE logic

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

 



Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes:

> Currently, 'git stash show' and 'git stash apply' can show/apply any
> merge commit, as the test for setting IS_STASH_LIKE simply asserts if
> the commit is a merge.  Improve the situation by asserting if the
> index_commit and the worktree_commit are based off the same commit, by
> checking that $REV^1 is equal to $REV^2^1.

When was the last time you tried to run "git stash apply next"?

The current code parses the ancestors and trees because the real
work needs them, and the 'does this look like a stash?' is a side
effect, but reading it^2^1 and comparing with it^1 is a pure
overhead for the sake of checking.  It looks like a futile mental
masturbation to solve theoretical non-issue to me.

Is it worth it?
--
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]