git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git merge --date --author

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 7, 2014, 19:43 UTC
Message-ID
<xmqqvbvpu757.fsf@gitster.dls.corp.google.com>
In-Reply-To
<87y50mxj0b.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
Show 7 quoted lines
> Yann Droneaud <ydroneaud@opteya.com> writes:
>
>> But I'd like to know if there's a specific reason for git merge to not
>> support --date and --author ?
>
> It's rather unusual that a merge is performed on behalf of a different
> author.

Yes. Michael's "Nobody bothered to implement it" is also correct but the reason why nobody bothered to most likely is due to "why would you want to lie?".

If the use case is to rebuild history, you would need to be able to also lie about the committer, so

>> git merge \
>>     --date "2013-12-31 23:59:59 +0000" \
>>     --author "Happy New Year <happy.new-year@gregorian.calendar>" \
>>     current-year

in such a history-rebuild script would not be sufficient. The script can set necessary environment variables to lie about both author and commiter, though, of course.

Previous: Andreas SchwabNext: Yann Droneaud
Message 4 of 5 in “git merge --date --author”
  1. Yann DroneaudMar 7, 2014
  2. Michael HaggertyMar 7, 2014
  3. Andreas SchwabMar 7, 2014
  4. Junio C HamanoMar 7, 2014
  5. Yann DroneaudMar 10, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.