From: Junio C Hamano <gitster@pobox.com>
To: Bruno Macabeus <bruno.macabeus@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Feature Suggestion: Allow to enforce "rename" in git while committing
Date: Fri, 14 Feb 2020 13:38:08 -0800 [thread overview]
Message-ID: <xmqqa75konnj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CANnkH-ViK9qySZGi=xbcE4YDiskhLxDsH21DMxTEHi6=X0EZuQ@mail.gmail.com> (Bruno Macabeus's message of "Fri, 14 Feb 2020 21:23:18 +0000")
Bruno Macabeus <bruno.macabeus@gmail.com> writes:
> I should not create one commit just renaming the file and on another
> commit updating its content, because the project won't build on the
> first commit (since the build steps is different on a .ts file). And I
> don't want to create a commit that the project can't be built on.
Even if you did the two-step renaming, comparing the end result
(i.e. HEAD) with the state before these two commits (i.e. HEAD~2,
before renaming and before editing) with "git diff HEAD~2 HEAD" will
not behave any differently if you did the renaming and modifying in
a single commit. So it does not make much sense to split it into
two artificial steps at all.
prev parent reply other threads:[~2020-02-14 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 21:23 Feature Suggestion: Allow to enforce "rename" in git while committing Bruno Macabeus
2020-02-14 21:38 ` Junio C Hamano [this message]
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=xmqqa75konnj.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=bruno.macabeus@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).