From: Ben Knoble <ben.knoble@gmail•com>
To: Chris Torek <chris.torek@gmail•com>
Cc: Frieder Hannenheim <mail@fhannenheim•net>, git@vger•kernel.org
Subject: Re: git mv after the fact
Date: Tue, 26 May 2026 17:29:02 -0400 [thread overview]
Message-ID: <85D5E150-BD78-4FC5-83DC-10DEBAC6EA4B@gmail.com> (raw)
In-Reply-To: <CAPx1Gvd9+z0th9whCbcA60_bWproPp+kwp3qDmhQOe4G=0=E6A@mail.gmail.com>
> Le 26 mai 2026 à 12:46, Chris Torek <chris.torek@gmail•com> a écrit :
>
> On Tue, May 26, 2026 at 6:18 AM Frieder Hannenheim <mail@fhannenheim•net> wrote:
>> I'd like to propose a new flag for git mv, that updates the index
>> like git mv normally would but does not move the file. ...
>
> You may already know this, but technically no flag is needed:
> you can just "git add" the new name and "git rm" the old one,
> with the same effect.
Or indeed, « git add old new » should also work, I think.
> A flag for "git mv" would be convenient (and slightly more
> efficient, not in terms of storage but in terms of CPU time
> spent discovering that the contents under the new name
> already exist in the object database). But Git will discover
> the rename on its own in the usual way regardless of how
> you get to that point.
>
> Chris
next prev parent reply other threads:[~2026-05-26 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 12:57 git mv after the fact Frieder Hannenheim
2026-05-26 16:40 ` Chris Torek
2026-05-26 16:50 ` Frieder Hannenheim
2026-05-26 21:29 ` Ben Knoble [this message]
2026-05-27 3:09 ` Junio C Hamano
2026-05-27 3:19 ` Chris Torek
2026-05-27 23:22 ` Junio C Hamano
2026-05-28 14:28 ` Ben Knoble
2026-05-28 20:36 ` Junio C Hamano
2026-05-27 3:27 ` Tim Tassonis
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=85D5E150-BD78-4FC5-83DC-10DEBAC6EA4B@gmail.com \
--to=ben.knoble@gmail$(echo .)com \
--cc=chris.torek@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mail@fhannenheim$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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