From: Andreas Ericsson <ae@op5.se>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] Documentation: Update information about <format> in git-for-each-ref
Date: Wed, 01 Nov 2006 09:25:51 +0100 [thread overview]
Message-ID: <45485A0F.3040807@op5.se> (raw)
In-Reply-To: <200610282323.57797.jnareb@gmail.com>
Jakub Narebski wrote:
> Junio C Hamano wrote:
>> [PATCH] for-each-ref: epoch and epochdate
>>
>> This adds "epoch" (which is parallel to "tagger" or "committer")
>> and "epochdate" (corresponds to "taggerdate" and
>> "committerdate").
>>
>> As other "date" fields, "epochdate" sorts numerically
>> and displays human readably
>
> I was thinking about having only "epochdate" (corresponding to either
> "taggerdate" or "committerdate"), only named "epoch". There is I think
> no need for field which would be "tagger" or "committer", and
> especially not named "epoch" ;-).
>
> Otherwise looks fine, thanks a lot.
>
>
> BTW. I had to translate
> + if (strcmp(who, "tagger") && strcmp(who, "committer"))
> to
> + if (strcmp(who, "tagger") == 0 || strcmp(who, "committer") == 0)
> to understand it. But this is probably my lack of contact with such
> C idioms.
But this does the exact opposite. The condition will now be true if the
'who' variable holds a pointer to a string that is either "tagger" or
"committer", whereas it used to be true for strings that were anything
*but* any of those.
"Compare" (as in "strcmp") also translates to "are equal to" and isn't
only a verb. This is unfortunate for people who aren't natively english
and has had me confused on many a long night. I once ended up doing a
macro called "string_matches" just to wrap my head around an insanely
long conditional with too many strcmp() with about half of them negated
by !.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
next prev parent reply other threads:[~2006-11-01 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-28 17:30 [PATCH] Documentation: Update information about <format> in git-for-each-ref Jakub Narebski
2006-10-28 20:33 ` Junio C Hamano
2006-10-28 21:23 ` Jakub Narebski
2006-11-01 8:25 ` Andreas Ericsson [this message]
2006-11-01 8:47 ` Junio C Hamano
2006-11-01 10:23 ` Andreas Ericsson
2006-11-01 15:30 ` Junio C Hamano
2006-11-01 15:48 ` Johannes Schindelin
2006-11-02 19:17 ` [PATCH 1/2] for-each-ref: "creator" and "creatordate" fields Jakub Narebski
2006-11-02 19:23 ` [PATCH 2/2] gitweb: Use git-for-each-ref to generate list of heads and/or tags Jakub Narebski
2006-11-03 2:40 ` Junio C Hamano
2006-11-03 3:26 ` Jakub Narebski
2006-11-03 2:40 ` [PATCH 1/2] for-each-ref: "creator" and "creatordate" fields Junio C Hamano
2006-11-03 3:27 ` Jakub Narebski
2006-10-28 20:42 ` [PATCH] Documentation: Update information about <format> in git-for-each-ref Junio C Hamano
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=45485A0F.3040807@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=junkio@cox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.