Re: [RFC PATCH] cogito --- don't overwrite metadata files in place (breaks CoW use)

From: Junio C Hamano <junkio@twinsun.com>
Date: 2005-07-13 07:37:00
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.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jul 13 07:44:45 2005

This archive was generated by hypermail 2.1.8 : 2005-07-13 07:44:46 EST