Closed japhb closed 12 years ago
I am not against this in concept but I think there is a better way of doing this. I am guessing you are running Ruby 1.8.7?
On Tue, 2012-09-25 at 17:42 -0700, Stafford Brunk wrote:
I am not against this in concept but I think there is a better way of doing this. I am guessing you are running Ruby 1.8.7?
Yes. :-)
I considered going the OrderedHash route to maintain the existing repo order in the original file. However, since my gitolite.conf had already been scrambled and I needed to sort it at least once to get back to something sane anyway, I just stayed with the .sort call -- especially since other existing users of this gem will likely be in the same situation, needing to get back to a sane ordering somehow.
Separately, I think the addition of the blank lines is important
whatever the ordering method chosen -- git diff
gets confused easily
by simple permissions changes when all of the repos are together in one
big block.
-'f
Ok, fair enough. I would actually prefer going the OrderedHash route but the sort does give a good human readability factor.
As far as the independent group ordering, I am also looking into that right now since my test breaks on 1.8.7 for that. If you would go ahead and file an issue for that I'd appreciate it.
On Tue, 2012-09-25 at 18:08 -0700, Stafford Brunk wrote:
Ok, fair enough. I would actually prefer going the OrderedHash route but the sort does give a good human readability factor.
:-)
As far as the independent group ordering, I am also looking into that right now since my test breaks on 1.8.7 for that. If you would go ahead and file an issue for that I'd appreciate it.
Done:
https://github.com/wingrunr21/gitolite/issues/32
-'f
The original code changed the order of the entire gitolite.conf file after every commit; this meant that diffs (for e.g. security audits) were essentially useless. This fix includes two small changes that improve this situation greatly:
git diff
will not be confused and make a single-line change to a repo's permissions appear to be a cascading reordering of lines across several consecutive repos with similar permissionsThe latter change also has the side benefit of making the conf file (and thus the diffs) more readable to humans.
Still remaining to fix is the constant reordering of group definitions when there exists no unique dependency ordering between them.