Re: cg-mv

From: Petr Baudis <pasky@suse.cz>
Date: 2005-10-12 20:07:57
Dear diary, on Fri, Oct 07, 2005 at 04:33:33PM CEST, I got a letter
where Zack Brown <zbrown@tumblerings.org> told me that...
> Hi,

Hello,

> IIRC, file renaming is something we only care about at read time, we don't
> actually need to track it while making the change, because git allows us to
> track data from file to file without having to tell it that the data is moving.
> 
> So, just to keep certain people happy, why not have the cg-mv command defined to
> something like this:
> 
> #!/bin/bash
> cp $1 $2
> cg-rm $1
> cg-add $2

so it should keep the file under the original name as well, but
untraced? That's weird. What about

	#!/usr/bin/env bash

	if [ -e $2 ]; then
		! got_parameter -f && die "dest exists"
		[ -e $1 ] || die "no source nor destination"
	fi
	( [ -e $1 ] && mv $1 $2 ) && cg-add $2 && cg-rm $1

plus quoting and stuff?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
-
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 Oct 12 20:10:41 2005

This archive was generated by hypermail 2.1.8 : 2005-10-12 20:10:46 EST