git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Vajna <vmiklos@frugalware.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-commit: add --date option
Date: Wed, 2 Dec 2009 22:07:51 +0100	[thread overview]
Message-ID: <20091202210751.GC31763@genesis.frugalware.org> (raw)
In-Reply-To: <7vpr6xcgki.fsf@alter.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

On Wed, Dec 02, 2009 at 11:38:05AM -0800, Junio C Hamano <gitster@pobox.com> wrote:
>  - We should honor GIT_AUTHOR_DATE if --reset-author is given.

This is already a situation, as far as I see.

>  - I _think_ we should ignore GIT_AUTHOR_DATE if --reset-author is not
>    given, as --amend/-c/-C is stronger for being command line options than
>    an environment variable.

We already ignore GIT_AUTHOR_DATE if --reset-author is not given, also
when I change it like this:

diff --git a/builtin-commit.c b/builtin-commit.c
index e93a647..7234c7d 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -397,7 +397,8 @@ static void determine_author_info(void)

                name = xstrndup(a + 8, lb - (a + 8));
                email = xstrndup(lb + 2, rb - (lb + 2));
-               date = xstrndup(rb + 2, eol - (rb + 2));
+               if (!date)
+                       date = xstrndup(rb + 2, eol - (rb + 2));
        }

        if (force_author) {

tests 27, 33, 38 and 39 fail in t7501-commit.sh.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-12-02 21:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01  0:27 [PATCH] builtin-commit: add --date option Miklos Vajna
2009-12-02 17:11 ` Miklos Vajna
2009-12-02 17:35   ` Junio C Hamano
2009-12-02 17:55     ` Junio C Hamano
2009-12-02 21:40       ` Miklos Vajna
2009-12-02 19:24     ` Jeff King
2009-12-02 20:33       ` Miklos Vajna
2009-12-02 19:26 ` Jeff King
2009-12-02 19:38   ` Junio C Hamano
2009-12-02 21:07     ` Miklos Vajna [this message]
2009-12-02 22:16     ` [PATCH 1/2] " Miklos Vajna
2009-12-02 22:16       ` [PATCH 2/2] Document date formats accepted by parse_date() Miklos Vajna
2009-12-02 22:33         ` Nanako Shiraishi
2009-12-02 22:42           ` Jeff King
2009-12-02 22:54           ` Junio C Hamano
2009-12-02 23:49             ` [PATCH 2/2 v2] " Miklos Vajna
2009-12-02 22:12   ` [PATCH] builtin-commit: add --date option Miklos Vajna
2009-12-02 22:22     ` Jeff King

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

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

  git send-email \
    --in-reply-to=20091202210751.GC31763@genesis.frugalware.org \
    --to=vmiklos@frugalware.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
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 NNTP newsgroup(s).