-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Git ReAuthor] Replace by name #621
Conversation
Added option to search for old user name instead of old email address * Help to fix repository commits that have a identical emails but different users * Help to clean up repository commits after (broken) imports from HG and SVN
Fix for #614 |
@@ -22,7 +23,8 @@ Options | |||
-c, --use-config define correct values from user Git config | |||
-e, --correct-email <email> define the correct email to set | |||
-n, --correct-name <name> define the correct name to set | |||
-o, --old-email <email> rewrite identities matching old email in commits and tags | |||
-oe, --old-email <email> rewrite identities matching old email in commits and tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to keep the old option. For example, -oe, --old-email, -o
.
And don't forget to update the man page and Commands.md, so that everyone can find your new feature!
The changes looks fine to me but there is a case that needs to be cleared From what I see in the current implementation, the commit is updated if any of the email or name matches. In any case this needs to be made clear in the docs. |
Yes you are right, |
Is there any update on this? This is a feature I would very much like. |
@spacewander I was messing with it a bit yesterday and I found out a code change isn't completely necessary, except for clarity. For example, you have these authors:
You can see it's the same person but for some commits it used their name and for the others it used their username. An example command to change just the name would be:
Resulting AUTHORS file:
Explanation: The command gets all the users with the specified email, keeps the email but changes the name associated to the email. Easy fix: change git-author.md to include this example. Which fix would be preferred? |
@tiemonl |
I will make the documentation change for now, and possibly open another pull request to introduce the new option if I have time/can get it working |
Sorry, if you need to change the commit instead of the |
@spacewander For example running
and not:
For the permanent fix, I would need an A fix could also be made for I apologize for the confusion I made with my first example. |
OK, now I understand what you mean.
It's up to you. Feel free to do contribution when you have spare time. PR is always welcome! |
Added option to search for old user name instead of old email address