git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Yann Droneaud <ydroneaud@opteya.com>
Cc: git@vger.kernel.org
Subject: Re: git merge --date --author
Date: Fri, 07 Mar 2014 12:41:01 +0100	[thread overview]
Message-ID: <5319B04D.6080906@alum.mit.edu> (raw)
In-Reply-To: <1394188215.3257.17.camel@localhost.localdomain>

On 03/07/2014 11:30 AM, Yann Droneaud wrote:
> I was trying to rebuild some history and found myself trying to use some
> options with git merge which are available in git commit:
> 
>  git merge \
>      --date "2013-12-31 23:59:59 +0000" \
>      --author "Happy New Year <happy.new-year@gregorian.calendar>" \
>      current-year
> 
> But unfortunately, unlike git commit, git merge doesn't support either
> --date or --author.
> 
> I can work around with environment variables:
> 
>  GIT_AUTHOR_DATE="2013-12-31 23:59:59 +0000" \
>  GIT_AUTHOR_NAME="Happy New Year" \
>  GIT_AUTHOR_EMAIL="happy.new-year@gregorian.calendar"  \
>  git merge current-year

You can also use

    git merge --no-commit [...]
    git commit --date ... --author ...

> But I'd like to know if there's a specific reason for git merge to not
> support --date and --author ?

None that I can think of, except that nobody has implemented it.  Don't
forget that the merge invocation might not lead immediately to a commit
(if there is a conflict, or if --no-commit is used) so the metadata that
is passed to its command line would have to be tucked away safely
somewhere until the merge commit is finally ready to be created.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  reply	other threads:[~2014-03-07 11:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 10:30 git merge --date --author Yann Droneaud
2014-03-07 11:41 ` Michael Haggerty [this message]
2014-03-07 12:58 ` Andreas Schwab
2014-03-07 19:43   ` Junio C Hamano
2014-03-10 12:52     ` Yann Droneaud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5319B04D.6080906@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=ydroneaud@opteya.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).