git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jared Hance <jaredhance@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Add -e/--exclude to git-clean.
Date: Tue, 20 Jul 2010 13:27:07 -0700	[thread overview]
Message-ID: <7vr5ixlx0k.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <8f454efeb3aa4acd0e0c420b197d0269dc53db34.1279654370.git.jaredhance@gmail.com> (Jared Hance's message of "Tue\, 20 Jul 2010 15\:35\:56 -0400")

Jared Hance <jaredhance@gmail.com> writes:

> With the -e/--exclude option for git-clean, a user can specify files
> that they haven't yet told git about, but either need for a short amount
> of time or plan to tell git about them later. This allows one to still
> use git-clean while these files are around without losing data.
>
> Signed-off-by: Jared Hance <jaredhance@gmail.com>

Thanks.

> +static int exclude_cb(const struct option *opt, const char *arg, int unset)
> +{
> +	struct string_list *exclude_list = (struct string_list *)opt->value;

Unnecessary cast, as opt->value is of type (void *).

> @@ -36,6 +44,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
>  	struct dir_struct dir;
>  	static const char **pathspec;
>  	struct strbuf buf = STRBUF_INIT;
> +	struct string_list exclude_list = { NULL, 0, 0, 0 };

Mental note to myself.  We should convert this to use STRING_LIST_INIT
after the next release when Thiago's patch graduates to 'master'.

  reply	other threads:[~2010-07-20 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 19:35 [PATCH 0/2] Add -e/--exclude to git-clean Jared Hance
2010-07-20 19:35 ` [PATCH 1/2] " Jared Hance
2010-07-20 20:27   ` Junio C Hamano [this message]
2010-07-20 19:36 ` [PATCH 2/2] Add test for git clean -e Jared Hance
2010-07-20 20:34   ` Junio C Hamano
2010-07-20 23:35     ` Jared Hance
2010-07-20 19:43 ` [PATCH 0/2] Add -e/--exclude to git-clean Jared Hance

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=7vr5ixlx0k.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jaredhance@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).