create command: remove race condition...
commit4ed15ad8e5d82995b3d55cd17446fc90a3c2b7ec
authorSitaram Chamarty <sitaram@atc.tcs.com>
Sat, 23 May 2015 03:29:20 +0000 (23 08:59 +0530)
committerSitaram Chamarty <sitaram@atc.tcs.com>
Wed, 27 May 2015 00:18:43 +0000 (27 05:48 +0530)
tree03c6f1595a64c808b05260a39e85b51b17035736
parentfc8cdf0ad13d4bcdf8a885c2ecb8ebf99a1daf45
create command: remove race condition...

Because of the pipe in the create command, 'gitolite git-config' and 'perms
-c' would run simultaneously.  The problem was, if git-config ran between
these two statements in new_wild_repo() in Store.pm:

    new_repo($repo);
        # 'gitolite git-config' runs here
    _print( "$repo.git/gl-creator", $user );

*and* the repo pattern had CREATOR in it, it would not return the correct
values for the default.roles options, since the repo pattern would not be
deemed to match the actual repo (between creator() and generic_name()).

Thanks to Ronald Wirth for catching this; see [1] for details.

[1]: https://groups.google.com/forum/#!topic/gitolite/5Dv6ViDmfF4

----

...and while we're about it, I changed it to use /bin/sh and smoke tested it
using "dash", which I believe is close enough.
src/commands/create