git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git fsck and new repos / backup repos
@ 2007-04-10 18:27 Sergio Callegari
  2007-04-11  8:25 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Sergio Callegari @ 2007-04-10 18:27 UTC (permalink / raw)
  To: git

Hi, 
just posting a very very minor thing, that anyway might be easy to improve...

consider the following cases:

1) Empty repo

mkdir Foo
cd Foo
git --bare init
git --bare fsck

error: HEAD is not a symbolic ref
error: No default references

Should this be an error...?  Of course fsck is not happy: HEAD points to master,
but master does not exist.  However, the newbie might find it weird that git
complains over a brand new repo it has just made.

BTW also gitk dies badly in this case.

2) Backup repo

mkdir Foo-Backup
cd Foo-Backup
git --bare init

cd <path>/Foo-Workingtree
git config --add remote.foobackup.url <url pointing to Foo Backup>
git config --add remote.foobackup.push +refs/heads/*:refs/remotes/workplace1/*
git push foobackup

cd <path>/Foo-Backup
git --bare fsck
error: HEAD is not a symbolic ref

Of course... again head points to master, but master does not exist.



Should maybe git init not just set up HEAD pointing to master, but also master
pointing to 000000000000000000000000000 and then fsck recognize that
000000000000000000000000000 is a valid pointer to nothing, namely the starting
point of a new branch?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-11  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10 18:27 git fsck and new repos / backup repos Sergio Callegari
2007-04-11  8:25 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).