From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: sane, stable renames; when a commit should commit twice
Date: Sun, 23 Dec 2007 17:29:09 +0100 [thread overview]
Message-ID: <fkm2ck$o8j$1@ger.gmane.org> (raw)
In-Reply-To: ee77f5c20712221826r5945a6d0x8a84eae98c85b25b@mail.gmail.com
David Symonds wrote:
> On Dec 23, 2007 1:03 PM, Zenaan Harkness <zen@freedbms.net> wrote:
>> When should a commit, commit twice?
>>
>> When one or more git mv file renames/ moves are involved.
>>
>> In such a case the commit ought to be split into two. Perhaps move the
>> files in the first commit, then make the changes needed to support the
>> move in the build chain (including changes in the moved files) in the
>> second commit.
>>
>> This keeps a clean record of the move, making the move, and the
>> associated changes (as two commits) a clean cherry.
>>
>> Does this make sense?
>
> Not particularly. Git commits are not (conceptually) changes or
> deltas; they are snapshots of a tree of files at a particular time.
> How does the tree state at your above first commit make any sense? It
> is broken. Git's rename/move detection is smart enough to notice that
> a rename + small-changes is close enough to a rename, so just trust
> that to get it right.
Moreover renames detection during merges is based on three states:
ours, theirs and ancestor, and it would not take into account
"pure rename" commit it is there in the middle of one of chains.
Besides broken (not compiling) commit makes it harder for bisect to find
true bug later.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2007-12-23 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-23 2:03 sane, stable renames; when a commit should commit twice Zenaan Harkness
2007-12-23 2:26 ` David Symonds
2007-12-23 16:29 ` Jakub Narebski [this message]
2007-12-23 2:50 ` 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='fkm2ck$o8j$1@ger.gmane.org' \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.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).