Re: modifying commit's author

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: modifying commit's author

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:50

"J. Bruce Fields" [off-list ref] writes:
If I got the author wrong on a commit, is there a quick way to fix it
(e.g. by passing the right arguments or environment variables to commit
--amend)?
I usually do "format-patch -$n; reset --hard HEAD~$n; edit
00??-*.patch; am 00??-*.patch" myself when I got into that
situation to rebuild the branch, and haven't personally felt
need for an option to --amend, but it might make sense to teach
git-commit --amend to allow --author option to override it; I
think it currently ignores --author when given without erroring
out.

It may become a question if we would want to allow updating the
timestamp as well, but when people asked for --author I did not
hear from anybody who wanted to have --authortime, so not being
able to do so probably is Ok.

Re: modifying commit's author

From: J. Bruce Fields <hidden>
Date: 2016-06-15 22:42:50

On Mon, Jan 22, 2007 at 12:48:27PM -0800, Junio C Hamano wrote:
"J. Bruce Fields" [off-list ref] writes:
quoted
If I got the author wrong on a commit, is there a quick way to fix it
(e.g. by passing the right arguments or environment variables to commit
--amend)?
I usually do "format-patch -$n; reset --hard HEAD~$n; edit
00??-*.patch; am 00??-*.patch" myself when I got into that
situation to rebuild the branch, and haven't personally felt
need for an option to --amend, but it might make sense to teach
git-commit --amend to allow --author option to override it; I
think it currently ignores --author when given without erroring
out.
That might be nice, but actually the git-am trick is more convenient
than I'd realized; thanks for the tip.

--b.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help