git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Macabeus <bruno.macabeus@gmail.com>
To: git@vger.kernel.org
Subject: Feature Suggestion: Allow to enforce "rename" in git while committing
Date: Fri, 14 Feb 2020 21:23:18 +0000	[thread overview]
Message-ID: <CANnkH-ViK9qySZGi=xbcE4YDiskhLxDsH21DMxTEHi6=X0EZuQ@mail.gmail.com> (raw)

Hello for all,

initially I posted a question on Stack Overflow asking if is possible
to do something using Git, but seems that there is no away to do that,
and I think that it could be useful in order to improve the
organisation on logs.

My user case is:
- I'm doing a refactor on a project, migrating from JS to TS
- So I need to rename a file from index.js to index.ts (for example)
- Since the TS build steps are different, I also need to change its contents
- Sometimes I need to do so much changes that git thinks that I
removed index.js and created index.ts, but it's wrong, losing its
tracking on logs!

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.

So I think that would be useful explicitly say to git "Hey, you should
forgot the minimum similarity threshold on this file and on this
commit. I renamed this file from index.js to index.ts. You should bind
they".

Is it make sense?

Thank you!

             reply	other threads:[~2020-02-14 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 21:23 Bruno Macabeus [this message]
2020-02-14 21:38 ` Feature Suggestion: Allow to enforce "rename" in git while committing 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='CANnkH-ViK9qySZGi=xbcE4YDiskhLxDsH21DMxTEHi6=X0EZuQ@mail.gmail.com' \
    --to=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).