[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed patch for bootstrap
From: |
Eric Blake |
Subject: |
Re: proposed patch for bootstrap |
Date: |
Tue, 05 Apr 2011 14:40:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9 |
On 04/05/2011 02:19 PM, Bruce Korb wrote:
>> What order-dependent sorting rules do you have, that would not already
>> be covered by sinking ! lines to the bottom of the .gitignore file per
>> the patch I just posted there?
>
> The order-that-I-put-them-in rule. In general, I think I understand
> stuff better than a computer, so why am I being over-ruled?
I tend to like sorted files (if nothing else, the human brain is much
better at finding lines in a sorted file than a random one, just as
binary searching is more efficient than linear searching for a computer).
> The hypothetical and still somewhat concrete issue is the sequence:
>
> 1. ignore this file pattern
> 2. but don't ignore this pattern ('!' prefix)
> 3. but do ignore this specific file
>
> sinking to the bottom causes #2 to override #3, but I don't have that
> problem. It is theoretical until someone stubs their toe.
> For me, the difference is that when I want a particular order,
> I don't think that tools should go in and correct me. :)
You have a couple of valid points there - 1) yes, git ignore files
technically can have such complex relations where no amount of sort+sed
will avoid corrupting various line combinations into an incorrect mess;
2) anyone that has a project that relies on ignore rules hairy enough to
require manual layout has probably got other issues, so it's probably
not currently a bug in the wild and therefore not an immediate pressing
concern to completely ditch sorting once ! sinking is in place.
Hmm, this also points back to Gary Vaughan's ideas to modularize
bootstrap into something that can have per-project function overrides
(most projects would be okay with the default function that sorts with !
sinking, but the rare project that needs to ditch sorting could override
that function with an alternate one that just appends).
>
> That said, I'll leave it your call and only make the first patch.
Tell you what - let's compromise :)
I'll commit my patch now (it fixes a real bug for libvirt), and gladly
let you commit yours at any future date, if and when you actually need
it. Besides, while I like the automated sorting, I can maintain sorting
manually if automating it caused actual bugs, nor do I think that there
are that many occasions in the first place where running bootstrap has
actually added a line to my top-level .gitignore to even need re-sorting.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- proposed patch for bootstrap, Bruce Korb, 2011/04/05
- Re: proposed patch for bootstrap, Eric Blake, 2011/04/05
- Re: proposed patch for bootstrap, Bruce Korb, 2011/04/05
- Re: proposed patch for bootstrap,
Eric Blake <=
- Re: proposed patch for bootstrap, Bruce Korb, 2011/04/05
- Re: proposed patch for bootstrap, Gary V. Vaughan, 2011/04/06
- Re: proposed patch for bootstrap, Bruce Korb, 2011/04/06
- Re: proposed patch for bootstrap, Gary V. Vaughan, 2011/04/06
- Re: proposed patch for bootstrap, Bruce Korb, 2011/04/06
- Re: proposed patch for bootstrap, Gary V. Vaughan, 2011/04/07