Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@twinsun.com>
To: git@vger.kernel.org
Subject: Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)
Date: Tue, 12 Jul 2005 21:37:00 +0000 (UTC)	[thread overview]
Message-ID: <loom.20050712T233332-364@post.gmane.org> (raw)
In-Reply-To: 20050712190552.GA7178@taniwha.stupidest.org

Chris Wedgwood <cw <at> f00f.org> writes:

>  if [ "$newhead" ]; then
>  	echo "Committed as $newhead."
> -	echo $newhead >$_git/HEAD
> +	echo_to_file $newhead $_git/HEAD
>  	[ "$merging" ] && rm $_git/merging $_git/merging-sym $_git/merge-base

Good intentions, but wouldn't the above clobber symlinked HEAD?

Not a fundamental flaw, though.  You need to see if it is a symlink,
readlink it (repeatedly until you get a regular file or dangling symlink
target that does not exist --- immediately after git-init-db has such a
HEAD) and run your echo_to_file on the link target.

  reply	other threads:[~2005-07-12 21:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-12 19:05 [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use) Chris Wedgwood
2005-07-12 21:37 ` Junio C Hamano [this message]
2005-07-13  4:53   ` Chris Wedgwood
2005-07-13  7:03     ` Matthias Urlichs
2005-07-13 18:53       ` Chris Wedgwood
2005-07-13 20:05         ` Linus Torvalds
2005-07-13 20:44           ` Chris Wedgwood
2005-07-13 21:05             ` Linus Torvalds
2005-07-13 21:11               ` Chris Wedgwood
2005-07-13 21:33                 ` Linus Torvalds
2005-07-13 21:50                   ` Chris Wedgwood
2005-07-13 20:07         ` Matthias Urlichs
2005-07-13 20:36           ` Chris Wedgwood
2005-07-13 21:23         ` Linus Torvalds
2005-07-13 21:54           ` Chris Wedgwood

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.20050712T233332-364@post.gmane.org \
    --to=junkio@twinsun.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox