Thread (1 message) 1 message, 1 author, 2016-06-15

Re: rev-list --cherry-pick and context lines

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:58

lists@haller-berlin.de (Stefan Haller) writes:
Is there a reason why the hard-coded default is 3 in the current code?
It seems to me that 1 would be a better choice; it would mean "patches
are equal if their added/removed lines are the same, and they could be
cherry-picked without conflicts."
Even if two patches have the same added/deleted lines, depending on where
in the preimage they are applied (which is given by the context lines),
the meaning of the patches can be and are very different. So if the
default for showing uses 3-line contect (hence applying, as e-mailed
patches are usually generated with 3-line context), it makes sense for the
default to generate patch id to match it.

As Michael hinted, I think it would make sense to reduce the number of
context lines to generate patch-id the same way if/when you reduce the
context to smaller number of lines for the purpose of patch application,
but it does not make sense to use zero-line context as default.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help