On May 21, 2013, at 8:23 AM, Derek Atkins <[email protected]> wrote: > John Ralls <[email protected]> writes: > >> On May 21, 2013, at 5:58 AM, Geert Janssens <[email protected]> >> wrote: >> >> On Monday 20 May 2013 19:53:02 John Ralls wrote: >>> On May 20, 2013, at 6:15 PM, Derek Atkins <[email protected]> wrote: >>>> I was working on setting up a git checkout to build the docs and >> noticed >>>> that the 'default branch' is broken in gitolite. I just tried to run: >>>> >>>> git clone ssh://[email protected]/gnucash.git and it downloaded >>>> everything until it got to the end, where it gave me: >>>> >>>> warning: remote HEAD refers to nonexistent ref, unable to checkout. >>>> >>>> Is this something I need to fix on the server? If I clone with "-b >>>> trunk" then it works. >>>> >>>> -derek >>>> >>>> PS: gnucash-docs has the same issue.. >>> >>> Probably your local git is looking for refs:origin:master, which doesn't >>> exist. If it bugs you you can make it with git branch master >>> git push origin master >>> in each repo, which should fix it for future use, though it's a bit of a >>> trap because master won't get updated. >> Couldn't this be solved by adapting the svn-git sync script ? >> >> Instead of just pulling in the new changes from svn, also run a >> git rebase trunk master ? >> >> Could, but probably shouldn't. It's an invitation to work in -- and to try to >> commit from -- the wrong branch. > > I don't understand why this is the case. In gitolite can't we just say > that "trunk" == "master"? Or does git not have the concept of aliases? > I didn't think "master" was anything special. >
I dug a little more [1][2], and did a git clone --bare ssh://[email protected]/gnucash-docs.git to see what the default branch is: > cat gnucash-htdocs.git/HEAD ref: refs/heads/master So the client is in fact following the default. As noted in [2], Github makes changing the default easy, and we've already done that, and it seems to work. [1] provides the way to set it in gitolite. Yes, git allows an alias. You can create (in the bare repository) a refs/heads/master: git symbolic-ref refs/heads/master refs/heads/trunk I'm being cautious here: The git-svn part of the loop is pretty brittle, and I'm worried about breaking it. Making that alias (or maybe reversing it and having HEAD point to master) is fine -- maybe even a good idea -- once we've switched to git-only, but I'm worried about messed-up sha1s like we had with the svn url when you set up gitolite while we're still using git-svn. Regards, John Ralls [1] http://stackoverflow.com/questions/13949093/git-change-default-branch-gitolite [2] http://stackoverflow.com/a/1485590 _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
