Re: [PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
On 5/1/2018 8:36 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, May 01 2018, Derrick Stolee wrote: How would sorting in our custom order before de-duplicating fail the de-duplication? We will still pair identical OIDs as consecutive elements and oid_array_for_each_unique only cares about

Re: [PATCH 4/9] 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 7:27 AM, Ævar Arnfjörð Bjarmason wrote: >> On Tue, May 01 2018, Derrick Stolee wrote: >> >>> On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: Since we show the commit data in the output that's nicely aligned once we sort by

Re: [PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
On 5/1/2018 7:27 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, May 01 2018, Derrick Stolee wrote: On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: Since we show the commit data in the output that's nicely aligned once we sort by object type. The decision to show tags before commits is pretty

Re: [PATCH 4/9] 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 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: >> Since we show the commit data in the output that's nicely aligned once >> we sort by object type. The decision to show tags before commits is >> pretty arbitrary, but it's much less likely that

Re: [PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-05-01 Thread Derrick Stolee
On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote: Change the output emitted when an ambiguous object is encountered so that we show tags first, then commits, followed by trees, and finally blobs. Within each type we show objects in hashcmp(). Before this change the objects were only ordered

[PATCH 4/9] get_short_oid: sort ambiguous objects by type, then SHA-1

2018-04-30 Thread Ævar Arnfjörð Bjarmason
Change the output emitted when an ambiguous object is encountered so that we show tags first, then commits, followed by trees, and finally blobs. Within each type we show objects in hashcmp(). Before this change the objects were only ordered by hashcmp(). The reason for doing this is that the