[PATCH v5 4/9] patch-id: make it stable against hunk reordering

2014-04-24 Thread Michael S. Tsirkin
Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered to make patch valid). As the result is functionally equivalent, a different patch id is surprising to many users. In

Re: [PATCH v5 4/9] patch-id: make it stable against hunk reordering

2014-04-24 Thread Jonathan Nieder
Hi, Michael S. Tsirkin wrote: Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered to make patch valid). As the result is functionally equivalent, a different

Re: [PATCH v5 4/9] patch-id: make it stable against hunk reordering

2014-04-24 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Should the internal patch-id computation used by commands like 'git cherry' (see diff.c::diff_get_patch_id) get the same change? (Not a rhetorical question --- I don't know what the right choice would be there.) I thought about it but I did not

Re: [PATCH v5 4/9] patch-id: make it stable against hunk reordering

2014-04-24 Thread Michael S. Tsirkin
On Thu, Apr 24, 2014 at 10:30:44AM -0700, Jonathan Nieder wrote: Hi, Michael S. Tsirkin wrote: Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered to make