git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Zack Brown <zbrown@tumblerings.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: cg-mv
Date: Wed, 12 Oct 2005 12:07:57 +0200	[thread overview]
Message-ID: <20051012100757.GM30889@pasky.or.cz> (raw)
In-Reply-To: <20051007143333.GA18843@tumblerings.org>

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.

  reply	other threads:[~2005-10-12 10:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 14:33 cg-mv Zack Brown
2005-10-12 10:07 ` Petr Baudis [this message]
2005-10-12 13:14   ` cg-mv Josef Weidendorfer
2005-10-12 14:28   ` cg-mv] Zack Brown
2005-10-12 22:32   ` cg-mv Horst von Brand

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=20051012100757.GM30889@pasky.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=zbrown@tumblerings.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).