git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: FMorschel <git@fmorschel.dev>
Cc: git@vger.kernel.org,  j6t@kdbg.org,
	 Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
	 kostix@bswap.ru
Subject: Re: Feature Request: git mv --after (new flag)
Date: Tue, 05 Aug 2025 22:17:52 -0700	[thread overview]
Message-ID: <xmqq34a5xc3j.fsf@gitster.g> (raw)
In-Reply-To: <09e2fb55-2f04-44db-a062-fa6c2c01c8eb@fmorschel.dev> (FMorschel's message of "Tue, 05 Aug 2025 11:47:31 +0000")

FMorschel <git@fmorschel.dev> writes:

>> But since the decision (of what is related to what) is that this 
>> should mainly be handled by the threshold (so git can figure it out 
>> for you) it's fine then.

The main idea behind the design is that Git can _afford_ to spend
more work at the time of investigating (e.g. when the user asks to
find where this single function came from and the tool answers that
it is the result of consolidating five duplicated functions) than
the time of recording commits (i.e. when it is not yet known what
questions the users will ask about the commit in the future), and
that Git can _improve_ over time how it figures out which removed
ones correspond to which added ones when it is asked to find out
moves and copies, exactly because we do not force people to record
moves at the time of the commit.

It does not preclude a new feature to allow you to tell, say, "git
blame", an extra piece of information to help the command you run,
like, "hey, Git, you may not realize it with the current heuristics
you have, but at commit X, lines N to M of path G was copied to
lines L to K of path F.  You can take that into account when you
figure out where the lines of the current file at path F came from".

You may even store that piece of information alongside commits in a
form that can be transferred across repositories, like notes.  The
important point is to keep such auxiliary pieces of information
outside the commit object, yet allow us to look it up for each
commit.

  reply	other threads:[~2025-08-06  5:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1fa7a8d8-3ae5-4913-b3b5-21d8f67e567d@fmorschel.dev>
     [not found] ` <0afc01b2-11a2-4f77-a858-7a444e8bb1d4@fmorschel.dev>
2025-08-04 14:05   ` Feature Request: git mv --after (new flag) FMorschel
2025-08-04 15:02     ` Konstantin Khomoutov
2025-08-04 15:53       ` FMorschel
2025-08-04 16:04         ` Kristoffer Haugsbakk
2025-08-04 16:28           ` Junio C Hamano
2025-08-05  9:36           ` Konstantin Khomoutov
2025-08-05 11:47             ` FMorschel
2025-08-06  5:17               ` Junio C Hamano [this message]
2025-08-05  6:03     ` Johannes Sixt
2025-08-05 15:42       ` 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=xmqq34a5xc3j.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@fmorschel.dev \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=kostix@bswap.ru \
    --cc=kristofferhaugsbakk@fastmail.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).