From: Dietmar Winkler <dietmarw@gmx.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [Bug] %[a|c]d placeholder does not respect --date= option in combination with git archive
Date: Fri, 04 Mar 2011 11:10:36 +0100 [thread overview]
Message-ID: <4D70BA9C.1080902@gmx.de> (raw)
In-Reply-To: <20110303151019.GC1074@sigill.intra.peff.net>
Jeff and list,
Den 03. mars 2011 16:10, skrev Jeff King:
> I am not sure that this is a bug. The log.date parameter is about the
> log command, not necessarily other format substitutions.
Well in
http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html it says:
"The placeholders are the same as those for the option
--pretty=format: of git-log(1), except that they need to be wrapped like
this: $Format:PLACEHOLDERS$ in the file."
And in git log the list includes (besides the various date formats) also
%ad: author date (format respects --date= option)
...
%cd: committer date *
*) actually here the string "(format respects --date= option)" is
missing. Otherwise what committer date format are we speaking about ;)
So either the documentation should make clear that the substitution will
*not* work or (and this would be preferable) fix the substitution so
that it works as documented.
> I remember at some point discussing extending the specifier syntax to
> allow things like "%(ad,date=short)", but it was never implemented. I
> think that would be the cleanest way to do what you want.
Yes that would be even better since it would give one the freedom of
defining different format for the subsitutions in different places in a
project. Shame it was not accepted.
> The second cleanest would be adding an archive.date variable. Which is
> much simpler, obviously. But I think making "log.date" start applying to
> archive substitutions is going to surprise some people and possibly
> break their setups.
How should this surprise people? If the used %ad they would have
expected a configuration depended substitution to start with. If they
wanted a log.date *independent* substitution they should have (according
to the documentation) some of the other formats (e.g., %ar, %ai, ...).
So I don't really see this as a reason for not fixing this bug.
/Dietmar/
next prev parent reply other threads:[~2011-03-04 10:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 9:30 [Bug] %[a|c]d placeholder does not respect --date= option in combination with git archive Dietmar Winkler
2011-03-03 15:10 ` Jeff King
2011-03-04 10:10 ` Dietmar Winkler [this message]
2011-03-05 19:50 ` Jeff King
2011-03-05 19:51 ` [PATCH 1/2] pretty.c: give format_person_part the whole placeholder Jeff King
2011-03-05 20:00 ` [PATCH 2/2] pretty.c: allow date formats in user format strings Jeff King
[not found] ` <AANLkTinH8zwX2sbd5bpk=x4R3zOAg3Dc92Fbspfdv03T@mail.gmail.com>
2011-03-06 21:54 ` Fwd: " Will Palmer
2011-03-07 16:17 ` Jeff King
2011-03-07 17:28 ` Will Palmer
2011-03-07 18:50 ` Will Palmer
2011-03-07 19:26 ` Jeff King
2011-03-08 8:29 ` Will Palmer
2011-03-09 21:06 ` Junio C Hamano
2011-03-10 22:31 ` Jeff King
2011-03-11 8:33 ` Dietmar Winkler
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=4D70BA9C.1080902@gmx.de \
--to=dietmarw@gmx.de \
--cc=git@vger.kernel.org \
--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).