Skip to content
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-gui: Do not reset author details on amend #2

Closed
wants to merge 1 commit into from
Closed

git-gui: Do not reset author details on amend #2

wants to merge 1 commit into from

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Apr 11, 2016

git commit --amend preserves the author details unless --reset-author is
given.

git-gui discards the author details on amend.

Fix by reading the author details along with the commit message, and
setting the appropriate environment variables required for preserving
them.

Reported long ago in the mailing list[1].

[1] http://article.gmane.org/gmane.comp.version-control.git/243921

git commit --amend preserves the author details unless --reset-author is
given.

git-gui discards the author details on amend.

Fix by reading the author details along with the commit message, and
setting the appropriate environment variables required for preserving
them.

Reported long ago in the mailing list[1].

[1] http://article.gmane.org/gmane.comp.version-control.git/243921

Signed-off-by: Orgad Shaneh <[email protected]>
@patthoyts
Copy link
Owner

Note for me: check to see if this is responsible for the problem at http://stackoverflow.com/q/39724766/291641

@orgads
Copy link
Contributor Author

orgads commented Sep 30, 2016

It is, and this is by design. git commit --amend preserves author time. I answered your question there.

@patthoyts
Copy link
Owner

As pointed out by the OP for the stackoverflow question, the method used here is excessively sticky. Currently this has only been applied to the git for windows version but needs resolving before it gets merged upstream here.

@patthoyts
Copy link
Owner

@orgads: I've added another change to branch os/preserve-author which stops this change to the author details from persisting for the rest of the session and reworked the changes to avoid adding more globals. If you could check that it's still working for you then I can merge the two commits into git-gui's master.
As your original is merged to git-for-windows already I've left it as is and done all changes as a new commit on top. ( https://github.com/patthoyts/git-gui/tree/os/preserve-author )

@orgads orgads closed this Oct 12, 2016
@orgads orgads deleted the preserve-author branch October 12, 2016 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants