From: Sergio Callegari <scallegari@arces.unibo.it>
To: git@vger.kernel.org
Subject: git fsck and new repos / backup repos
Date: Tue, 10 Apr 2007 18:27:05 +0000 (UTC) [thread overview]
Message-ID: <loom.20070410T200901-466@post.gmane.org> (raw)
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?
next reply other threads:[~2007-04-10 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 18:27 Sergio Callegari [this message]
2007-04-11 8:25 ` git fsck and new repos / backup repos Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20070410T200901-466@post.gmane.org \
--to=scallegari@arces.unibo.it \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).