From: Pete Harlan <pgit@pcharlan.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Ron Garret <ron1@flownet.com>, git@vger.kernel.org
Subject: Re: git-mv redux: there must be something else going on
Date: Wed, 03 Feb 2010 12:12:07 -0800 [thread overview]
Message-ID: <4B69D897.2060908@pcharlan.com> (raw)
In-Reply-To: <32541b131002031048i26d166d9w3567a60515235c34@mail.gmail.com>
On 02/03/2010 10:48 AM, Avery Pennarun wrote:
>> [ron@mickey:~/devel/gittest]$ git mv file2 file3
>> [ron@mickey:~/devel/gittest]$ git commit -m 'letters->numbers'
>> [master ae3f6d4] letters->numbers
>> 1 files changed, 0 insertions(+), 0 deletions(-)
>> rename file2 => file3 (100%)
>
> Whoops. You didn't 'git add file2' (before the mv) or 'git add file3'
> (after the mv), or use commit -a, so what you've committed is the
> *old* content of file2 under the name file3. The *new* content of
> file2 is still uncommitted in your work tree under the name file3.
It may be reasonable for "git mv foo bar" to print a helpful message to
the user if foo has un-checked-in changes, similarly to what "git rm" does.
Unlike "git rm", "git mv" could still perform the operation even without
"-f", but the semantics of "git mv" differ enough from plain "mv" that a
short blurb from Git in that case might help.
--Pete
next prev parent reply other threads:[~2010-02-03 20:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 18:25 git-mv redux: there must be something else going on Ron Garret
2010-02-03 18:48 ` Avery Pennarun
2010-02-03 19:23 ` Ron Garret
2010-02-03 19:47 ` Avery Pennarun
2010-02-03 20:30 ` Ron Garret
2010-02-03 19:53 ` Nicolas Pitre
2010-02-03 20:27 ` Ron Garret
2010-02-03 20:31 ` Ron Garret
2010-02-03 20:40 ` Avery Pennarun
2010-02-03 22:33 ` Ron Garret
2010-02-03 23:18 ` Avery Pennarun
2010-02-03 23:55 ` Jay Soffian
2010-02-04 0:10 ` Ron Garret
2010-02-04 0:10 ` Ron Garret
2010-02-04 0:48 ` Junio C Hamano
2010-02-03 20:44 ` Nicolas Pitre
2010-02-03 20:12 ` Pete Harlan [this message]
2010-02-03 20:34 ` Ron Garret
2010-02-03 21:12 ` [PATCH] Documentation: clarify git-mv behaviour wrt dirty files Thomas Rast
2010-02-03 21:56 ` Junio C Hamano
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=4B69D897.2060908@pcharlan.com \
--to=pgit@pcharlan.com \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=ron1@flownet.com \
/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).