Permalink
Commits on Apr 16, 2018
  1. Reduce disk writes in post-compile triggers

    mricon authored and sitaramc committed Apr 14, 2018
    We have a system with thousands of repositories located on disks where:
    
    1. write operations are much slower than read operations
    2. IO is burstable but is throttled after a certain limit
    
    In such conditions, writing out 10-15 git config settings per each of the
    15,000 repositories resulted in around 200,000 calls to git-config and
    200,000 disk writes to 15,000 files on every gitolite-admin push, even
    if there were no changes to any git configs.
    
    With this change, we call git-config once to read the entirety of the
    git config for the repo, and issue writes only if there are changes to
    any of the settings.
    
    Similarly, we only touch git-daemon-export-ok if such file doesn't
    already exist to avoid another few thousand unnecessary writes.
    
    As a result, our gitolite-admin push times went from 10-12 minutes to 20
    seconds.
    
    Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Commits on Apr 5, 2018
Commits on Feb 11, 2018
Commits on Dec 15, 2017
  1. clean up previous patch on handling trailing slashes

    sitaramc committed Dec 15, 2017
    Actually this is a revert of the previous patch, combined with putting
    that logic where it belongs (and in the process doing it more cleanly)
Commits on Dec 6, 2017
  1. remove trailing "/" if user supplied one

    sitaramc committed Dec 6, 2017
    Basically, Linus complained that git-daemon is happy with the trailing /
    so why does gitolite choke on it?
    
    Fair enough.
    
    Actual implementation: we choose to kill the "/" at the point of entry,
    rather than weaken the sanity() function.
    
    ref: https://groups.google.com/forum/#!topic/gitolite/zLMoQ7u28gk
Commits on Nov 9, 2017
Commits on Oct 31, 2017
  1. change silent ignore to warning...

    sitaramc committed Oct 31, 2017
    we may also need a linter for this whole thing later, depending on usage
    and any reports coming in.
Commits on Oct 25, 2017
  1. keeping the profs at Cambridge happy...

    sitaramc committed Oct 25, 2017
    What?  That isn't a good enough commit message?  Well then, go look up
    the thread on the mailing list (subject: "gitolite setup vs
    ssh-authkeys-split")
    
    :-)
    
    PS: Thanks to Tony Finch for the discussion!
Commits on Oct 14, 2017
Commits on Oct 13, 2017
  1. allow orphan gl-conf files (see below for details)

    sitaramc committed Oct 13, 2017
    Background:
    
        For explicitly named repos in gitolite.conf ("repo foo bar" as
        opposed to "repo @group-name" or "repo [a-z].*"), the compiled rules
        are placed in a file called "gl-conf" in the repo's directory.
    
        In addition, an entry is made in a hash called "split_conf" in the
        main compiled conf file (~/.gitolite/conf/gitolite.conf-compiled.pm).
    
        The crucial bit is this: if a repo does not have an entry in the
        split_conf hash, its gl-conf file will not be honored.
    
        Why is this?  Because there are situations where that file may be
        out of date, and the rules within should not be in effect.  For a
        simple example, consider this conf
    
            repo seven
                RW+ =   u1
                RW  =   u2
    
        Now, management decides that "seven" needs to be assimilated into a
        large group called "borg":
    
            # add seven to borg
            @borg = seven
    
            # seven's rules are now deleted
    
        When you make this change and push, users u1 and u2 should not get
        access (unless the rules for @borg happened to allow them).  That
        is, the gl-conf in the repo-dir is considered an orphan, and must
        not be included in rule processing.
    
        Since there is now no "seven" entry in split_conf, this is exactly
        what happens -- gl-conf is ignored.
    
        (Note: one might argue that gitolite compile should go and delete
        these orphaned gl-conf files, but that's yet another "full disk
        scan" overhead.)
    
    What this patch does:
    
        This patch allows an admin to override this safety feature, and say,
        in effect, "include orphaned gl-conf files in the rule processing; I
        know what I am doing".  The admin enables that by adding an rc
        variable called ALLOW_ORPHAN_GL_CONF and setting it to "1".
    
    How does this help:
    
        This wouldn't be useful without some way of updating an individual
        repo's rules directly into its gl-conf file.
    
        contrib/commands/compile-1 does exactly that (see notes within that
        file for information, assumptions, warnings, etc.)
Commits on Oct 5, 2017
  1. vim syntax and indent files...

    sitaramc committed Oct 2, 2017
    with the new "template-data" section, it becomes important to be able to
    visually know if you're entering something in the wrong section
    (template stuff outside the begin/end markers, or normal stuff inside).
    
    (unfortunately I only know vim; maybe others can help with other
    editors' setups?)
Commits on Sep 29, 2017
Commits on Sep 26, 2017
  1. set a repo's group membership(s) in 'gl-repo-groups'...

    sitaramc committed Sep 20, 2017
    ...a la 'gl-perms' for role memberships
Commits on Sep 25, 2017
  1. optimise the single-repo POST_CREATE cases a bit...

    sitaramc committed Sep 25, 2017
    ...I was lazily letting them run over ALL repos.  (And I am still lazy
    because I did not do one of them yet; see comments in that file).
Commits on Sep 24, 2017
  1. some optimisations in compile step...

    sitaramc committed Sep 24, 2017
    ...these were found when the caching code was being developed.  We have
    reverted the caching, but these optimisations are not related to caching
    so we keep them.
Commits on Sep 18, 2017
  1. Revert "reduce stat() and other calls for huge installs"

    sitaramc committed Sep 18, 2017
    This reverts commit 41b7885.
    
    Some parts of this change may come back later, but the caching logic
    will not.
Commits on Aug 23, 2017
Commits on Aug 11, 2017
  1. reduce stat() and other calls for huge installs

    sitaramc committed Aug 11, 2017
    Fedora has 42000 or so repos, and a 'gitolite compile' was taking too
    long.
    
    This set of changes reduces the number of stat() and other calls from 9
    to 2 per unchanged, existing repo.  (The expectation is that only a few
    repos' rules are being changed each time, so this helps somewhat
    optimise the others not to take the same amount of time).
Commits on Aug 7, 2017
Commits on Aug 4, 2017
  1. Use https:// instead of insecure git:// protocol

    tyll authored and sitaramc committed Aug 4, 2017
    Signed-off-by: Till Maas <opensource@till.name>
    
    (with minor whitespace changes by sitaramc@gmail.com)
Commits on Jul 2, 2017
  1. v3.6.7

    sitaramc committed Jul 2, 2017
Commits on Jun 10, 2017
Commits on May 30, 2017
  1. allow repo-specific hooks to be organised into subdirectories

    sitaramc committed May 30, 2017
    (thanks to Mathieu Arnold for catching this, and for an initial patch)
  2. fix inefficiency in repo-specific hooks

    sitaramc committed May 30, 2017
    normally I don't care too much about inefficiencies that show up during
    a push to the gitolite-admin repo, but this one shows up even when a
    normal user creates a single wild-card repo -- it runs the repo-specific
    hooks trigger on ALL existing repos!
    
    no one noticed or complained, so perhaps it *actually* wasn't that
    visible a problem, but it's an easy fix anyway.
    
    (TBH, there's still a slight inefficiency.  When a new (non-wild) repo
    is added to gitolite.conf, that particular one gets processed twice --
    once in POST_CREATE, and once in POST_COMPILE...  but *shrug*.  If no
    one noticed the much bigger O(n) inefficiency we just fixed, this O(1)
    inefficiency hardly matters.)
Commits on May 10, 2017
  1. Fix SHA256 fingerprinting to match the full character set

    alexmv authored and sitaramc committed May 10, 2017
    Because of a one-bit typo, this only matched the fingerprint up until
    the first upper-case letter; this led to false-positive messages about
    hash collisions.
Commits on Apr 15, 2017
Commits on Apr 4, 2017
Commits on Mar 27, 2017
Commits on Jan 16, 2017
Commits on Jan 14, 2017
  1. allow @group names in config values to be expanded...

    sitaramc committed Jan 14, 2017
    The string "@group" is replaced with a space separated list of member
    names if it is a valid group.  Otherwise it is left alone.
Commits on Nov 25, 2016
  1. fix shebang in repo-specific-hooks

    sitaramc committed Nov 25, 2016
    (thanks to Dieter on the mailing list for catching this!)