From: Stefan Beller <sbeller@google.com>
To: Shaun Uldrikis <stuldrikis@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git log use of date format differs between Command Line and script usage.
Date: Fri, 30 Jun 2017 09:43:18 -0700 [thread overview]
Message-ID: <CAGZ79kZxde9j+O4JDofYLbC2CRk_X0tiwOftEgKQcJLyN409xQ@mail.gmail.com> (raw)
In-Reply-To: <CADHEqX_fiUhnpn6WAFrbDaNJTb1Vbom7Ndn-n6WmQ0gkQ69ZeA@mail.gmail.com>
On Fri, Jun 30, 2017 at 9:06 AM, Shaun Uldrikis <stuldrikis@gmail.com> wrote:
> If you supply a non-standard format to the date configuration for git
> log, something like:
> [log]
> date = format:%Y-%m-%d %H:%M
So I ran
$ git config log.date "format:%Y-%m-%d %H:%M"
$ git config --list |grep log.date
log.date=format:%Y-%m-%d %H:%M
Then I have a script as
$ cat script.sh
#!/bin/sh
git log >out
after executing I get:
$ head out
commit 7930db48ca31b41ac335ae8cd25cb29094d1de5e
Author: Stefan Beller <sbeller@google.com>
Date: 2017-06-30 09:26
Also gitk seems to work here.
Rene's answer sounds reasonable,
check the version(s) of Git on your system?
next prev parent reply other threads:[~2017-06-30 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 16:06 git log use of date format differs between Command Line and script usage Shaun Uldrikis
2017-06-30 16:41 ` René Scharfe
2017-06-30 16:43 ` Stefan Beller [this message]
2017-06-30 17:29 ` Shaun Uldrikis
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=CAGZ79kZxde9j+O4JDofYLbC2CRk_X0tiwOftEgKQcJLyN409xQ@mail.gmail.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=stuldrikis@gmail.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.
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).