Re: commit --amend --author error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King schrieb am 14.01.2015 um 13:09:
> On Tue, Jan 13, 2015 at 12:24:18PM +0100, Michael J Gruber wrote:
> 
>> Gunnar Wagner schrieb am 13.01.2015 um 09:15:
>>> I got APGL licensed code from someone else and want to post it on my 
>>> github (without taking credit for the work)
>>>
>>> tried   git commit --amend --author="Author name, www.website.com" but 
>>> got an error message which said something like "original author not found"
>>> Can it be that the --amen --author only work if the author is on github 
>>> himself?
>>>
>>
>> This has nothing to do with github.
>>
>> The author has be in the form "authorname <authoremail>". The important
>> parts for the format are the <>.
> 
> Yes, but the error message is a hint that there is something else going
> on. When there are no angle brackets, some DWIM magic kicks in: git
> tries to find a matching author by walking the project history from
> HEAD. So you can do (in git.git):
> 
>   $ git commit --allow-empty -m foo --author=gruber
>   [detached HEAD 73ef08b] foo
>    Author: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>

(git commit --allow-almost-empty in the case of that author, hum)

> Of course that does not work if you do not already have commits from the
> person in your repository:
> 
>   $ git commit --allow-empty -m foo --author=foobar
>   fatal: No existing author found with 'foobar'
> 
> -Peff

That is the full explanation, yes:

Neither can "Author name, www.website.com" be parsed as a complete valid
"name <email>"
nor can it be matched as part of an existing "name <email>" in the repo.

The OP clearly tried to do the first and got an error message about the
second. Maybe we can do better here?

Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]