Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-04-01 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: A fix (or is it an enhancement) would probably look like this. ... And this time with a pair of tests. It probably should be extended to make sure it fails when the pushed HEAD records paths that are floating in the working tree (as that would mean

Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-04-01 Thread Johannes Schindelin
Hi Samuel Junio, On 2015-04-01 03:36, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Samuel Williams space.ship.travel...@gmail.com writes: I would expect if you push to an empty repo, it would update it (because denyCurrentBranch = updateInstead). Good finding. I

Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-04-01 Thread Johannes Schindelin
Hi Junio, On 2015-04-01 20:00, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Yeah, and we could refactor that into a global function, too. But for the moment, I think your proposed patch is good enough. OK, so can I forge your Acked-by? You read my mind.

Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-04-01 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Yeah, and we could refactor that into a global function, too. But for the moment, I think your proposed patch is good enough. OK, so can I forge your Acked-by? Thanks for double checking. -- To unsubscribe from this list: send the line

Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-03-31 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Samuel Williams space.ship.travel...@gmail.com writes: I would expect if you push to an empty repo, it would update it (because denyCurrentBranch = updateInstead). Good finding. I think the current implementation of updateInstead is set up to

Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-03-31 Thread Samuel Williams
I have set up a remote repository like so: remote $ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true sharedrepository = 1 worktree = /srv/http/www.site.com [receive] denyNonFastforwards = true denyCurrentBranch = updateInstead This repo is

Re: Trying to push into empty repo, get fatal: bad revision 'HEAD'

2015-03-31 Thread Junio C Hamano
Samuel Williams space.ship.travel...@gmail.com writes: I would expect if you push to an empty repo, it would update it (because denyCurrentBranch = updateInstead). Good finding. I think the current implementation of updateInstead is set up to bootstrap from an empty repository but only