From: Dave Jones <davej@redhat.com>
To: git@vger.kernel.org
Subject: someone changed the contents of my HEAD.
Date: Mon, 27 Feb 2006 22:04:46 -0500 [thread overview]
Message-ID: <20060228030446.GA23490@redhat.com> (raw)
I just tried to check in some changes to some trees
on master.kernel.org, and found after the first checkin
that git claimed..
fatal: Not a git repository
A lot of head-scratching later, I think I've figured out
what's happened. It seems there was a recent upgrade
to the version of git on m.k.o, which is incompatible
with the helper scripts I used before.
When checking in changes previously, I used this..
#!/bin/sh
export GIT_AUTHOR_NAME="$1"
export GIT_AUTHOR_EMAIL="$2"
tree=$(git-write-tree) || exit 1
commit=$(git-commit-tree $tree -p HEAD) || exit 1
echo $commit > .git/HEAD
and called it thus..
commit-as "Dave Jones" "<davej@redhat.com>"
Previously, this updated .git/HEAD to a ptr to the latest committed change.
All was well, as I only ever have one HEAD in my trees.
With the new .git however, when I clone a new tree, .git/HEAD
contains ref: refs/heads/master, so my script destroys the git metadata.
For my newly created repos, this isn't a problem, as I can fudge my
commit-as script to write to .git/refs/heads/master instead, but
my concern now is the unpulled changes in the existing repos
I have on master. Will Linus be able to pull those into his tree
with git 1.2.3, or will I have to recreate those repos with the
new-style .git/HEAD ?
Dave
next reply other threads:[~2006-02-28 3:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 3:04 Dave Jones [this message]
2006-02-28 5:22 ` someone changed the contents of my HEAD Junio C Hamano
2006-02-28 5:58 ` Dave Jones
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=20060228030446.GA23490@redhat.com \
--to=davej@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.