Re: [PATCH] stash: tighten IS_STASH_LIKE logic
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 18, 2013, 22:20 UTC
- Message-ID
- <7vk3nz4h20.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1366270717-19929-1-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 5 quoted lines
> 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?