From: "David Symonds" <dsymonds@gmail.com>
To: "Zenaan Harkness" <zen@freedbms.net>
Cc: git@vger.kernel.org
Subject: Re: sane, stable renames; when a commit should commit twice
Date: Sun, 23 Dec 2007 13:26:24 +1100 [thread overview]
Message-ID: <ee77f5c20712221826r5945a6d0x8a84eae98c85b25b@mail.gmail.com> (raw)
In-Reply-To: <20071223020310.GA22450@freedbms.net>
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.
Dave.
next prev parent reply other threads:[~2007-12-23 2:26 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 [this message]
2007-12-23 16:29 ` Jakub Narebski
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=ee77f5c20712221826r5945a6d0x8a84eae98c85b25b@mail.gmail.com \
--to=dsymonds@gmail.com \
--cc=git@vger.kernel.org \
--cc=zen@freedbms.net \
/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).