From: <rsbecker@nexbridge.com>
To: "'Lucas Seiki Oshiro'" <lucasseikioshiro@gmail.com>,
"'Martin Guy'" <martinwguy@gmail.com>,
"'D. Ben Knoble'" <ben.knoble@gmail.com>,
"'Kristoffer Haugsbakk'" <kristofferhaugsbakk@fastmail.com>
Cc: <git@vger.kernel.org>
Subject: RE: Feature request: git cp
Date: Thu, 20 Nov 2025 19:10:38 -0500 [thread overview]
Message-ID: <010b01dc5a7b$4790ee30$d6b2ca90$@nexbridge.com> (raw)
In-Reply-To: <6F4B3935-7F2F-43C9-8E5E-12E2FB3331BD@gmail.com>
On November 20, 2025 6:08 PM, Lucas Seiki wrote:
>> and would like the history to track the relevant lines in each file,
>> like "git mv" does,
>
>As a consequence of Git being based on snapshots instead of deltas (see
[1]), `git
>mv` actually doesn't keep track of renames. You can think of `git mv` as
`git rm`ing
>the file with the old name + `git add`ing the same file with the the new
name.
>
>As Kristoffer said, the renames are detected by tools like `git log`, `git
diff` or `git
>status` based on similarity between files, which are considered a rename if
they are
>similar enough. That similarity can even be tuned by using the flag
--find-renames,
>available in those three commands.
>
>
>[1] https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
I know this might sound trite or wrong but... does this mean that git log
can actually detect SHA-1 collisions based on similarity checks of file
contents?
next prev parent reply other threads:[~2025-11-21 0:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 14:56 Feature request: git cp Martin Guy
2025-11-20 15:17 ` Kristoffer Haugsbakk
2025-11-20 16:28 ` D. Ben Knoble
2025-11-20 21:24 ` Martin Guy
2025-11-20 22:10 ` D. Ben Knoble
2025-11-20 23:07 ` Lucas Seiki Oshiro
2025-11-20 23:17 ` Martin Guy
2025-11-21 0:10 ` rsbecker [this message]
2025-11-21 14:32 ` Martin Guy
2025-11-21 21:52 ` Lucas Seiki Oshiro
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='010b01dc5a7b$4790ee30$d6b2ca90$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=lucasseikioshiro@gmail.com \
--cc=martinwguy@gmail.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).