Julius Plenz <plenz@...> writes: > > This is a saner alternative than hardcoding the default branch to be > "master". The add_repo() function will now check for a symbolic ref in > repo_path/HEAD. If there is a suitable one, overwrite repo->defbranch > with it. Note that you'll need to strip the newline from the file (-> > len-17). > > If HEAD is a symbolic link pointing directly to a branch below > refs/heads/, do a readlink() instead to find the ref name. > > Signed-off-by: Julius Plenz <plenz@...>
I've successfully applied this patch against the current stable branch (commit: 2a8f5531) and deployed the resulting binary without trouble. The functionality appears to work as advertised. So, along with setting the default 'readme' value as: readme=HEAD:README.md each project is able to have a sensible default presentation based off of the project's default branch. Very useful as we use gitolite to manage our repositories, this saves us further manual configuration outside of gitolite. I hope this patch can be integrated into the official release. chris _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
