Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
On 5/1/2018 10:10 AM, Ævar Arnfjörð Bjarmason wrote: Actually I'm having second thoughts about that and thinking I might keep my original approach (with a better explanation). A few more lines of code seems worthwhile in order to not break the assumptions a documented API is making, no matter

Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > On 5/1/2018 9:39 AM, Ævar Arnfjörð Bjarmason wrote: >> On Tue, May 01 2018, Derrick Stolee wrote: >> >>> From: Ævar Arnfjörð Bjarmason >>> >>> Here is what I mean by sorting during for_each_abbrev(). This seems to work >>> for >>>

Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
On 5/1/2018 9:39 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, May 01 2018, Derrick Stolee wrote: From: Ævar Arnfjörð Bjarmason Here is what I mean by sorting during for_each_abbrev(). This seems to work for me, so I don't know what the issue is with this one-pass approach.

Re: [PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Ævar Arnfjörð Bjarmason
On Tue, May 01 2018, Derrick Stolee wrote: > From: Ævar Arnfjörð Bjarmason > > Here is what I mean by sorting during for_each_abbrev(). This seems to work > for > me, so I don't know what the issue is with this one-pass approach. > [...] > +static int sort_ambiguous(const

[PATCH v2 06/11] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
From: Ævar Arnfjörð Bjarmason Here is what I mean by sorting during for_each_abbrev(). This seems to work for me, so I don't know what the issue is with this one-pass approach. Thanks, -Stolee -- >8 -- Change the output emitted when an ambiguous object is encountered so that