From: hsed@unimetic.com
To: Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: [PATCH V2] config: add --expiry-date
Date: Wed, 15 Nov 2017 22:10:48 +0000 [thread overview]
Message-ID: <d1c0558cd56b4509c3e34daa48fd528d@unimetic.com> (raw)
In-Reply-To: <xmqqshdh2wln.fsf@gitster.mtv.corp.google.com>
On 2017-11-14 06:38, Junio C Hamano wrote:
> hsed@unimetic.com writes:
>
>> From: Haaris <hsed@unimetic.com>
>>
>> Description:
>> This patch adds a new option to the config command.
>>
>> ...
>>
>> Motivation:
>> A parse_expiry_date() function already existed for api calls,
>> this patch simply allows the function to be used from the command
>> line.
>>
>> Signed-off-by: Haaris <hsed@unimetic.com>
>> ---
>
> Please drop all these section headers; they are irritating. Learn
> from "git log --no-merges" how the log messages in this project is
> written and imitate them. Documentation/SubmittingPatches would be
> helpful.
>
> Add --expiry-date as a new type 'git config --get' takes,
> similar to existing --int, --bool, etc. types, so that
> scripts can learn values of configuration variables like
> gc.reflogexpire (e.g. "2.weeks") in a more useful way
> (e.g. the timesamp as of two weeks ago, expressed in number
> of seconds since epoch).
>
> As a helper function necessary to do this already exists in
> the implementation of builtin/reflog.c, the implementation
> is just the matter of moving it to config.c and using it
> from bultin/config.c, but shuffle the order of the parameter
> so that the pointer to the output variable comes first.
> This is to match the convention used by git_config_pathname()
> and other helper functions.
>
> or something like that?
Hi,
I am sorry for not following the format properly. I will change this for
next patch update.
>
>> + } else if (types == TYPE_EXPIRY_DATE) {
>> + timestamp_t t;
>> + if(git_config_expiry_date(&t, key_, value_) < 0)
>
> Style.
Sure.
>
> if (git_config_expiry_date(&t, key_, value_) < 0)
>
>> + return -1;
>> + strbuf_addf(buf, "%"PRItime, t);
>> ...
>
> Thanks.
Kind Regards,
Haaris
next prev parent reply other threads:[~2017-11-15 22:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 12:19 [PATCH] config: added --expiry-date type support Haaris
2017-11-12 13:55 ` Kevin Daudt
2017-11-12 14:22 ` Jeff King
2017-11-12 14:55 ` Jeff King
[not found] ` <a05a8e8020ec31cfd9a0271ce2a00034@unimetic.com>
2017-11-12 19:43 ` hsed
2017-11-14 2:04 ` [PATCH V2] config: add --expiry-date hsed
2017-11-14 6:21 ` Christian Couder
2017-11-14 16:03 ` Marc Branchaud
2017-11-14 6:38 ` Junio C Hamano
2017-11-15 22:10 ` hsed [this message]
2017-11-16 0:05 ` [PATCH V3] " hsed
2017-11-16 0:54 ` Junio C Hamano
2017-11-17 18:15 ` hsed
2017-11-18 2:27 ` [PATCH V4] " hsed
2017-11-18 3:37 ` Junio C Hamano
2017-11-20 14:53 ` hsed
2017-11-20 17:04 ` Jeff King
2017-11-20 20:28 ` Stefan Beller
2017-11-20 20:37 ` Jeff King
2017-11-30 11:18 ` Heiko Voigt
2017-11-30 17:45 ` Jeff King
[not found] <f9d6d1cfcad17c93a0131cf69c3d7705@unimetic.com>
2017-11-13 17:53 ` [PATCH V2] " hsed
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=d1c0558cd56b4509c3e34daa48fd528d@unimetic.com \
--to=hsed@unimetic.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).