All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH v2 1/1] filter-options: Expand abbreviated numbers
Date: Wed, 9 Jan 2019 10:55:43 -0800	[thread overview]
Message-ID: <20190109185543.GD54613@google.com> (raw)
In-Reply-To: <20190109122342.GF4673@szeder.dev>

On 2019.01.09 13:23, SZEDER Gábor wrote:
> On Mon, Jan 07, 2019 at 04:17:09PM -0800, Josh Steadmon wrote:
> > diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
> > index 5285e7674d..9efb3e9902 100644
> > --- a/list-objects-filter-options.c
> > +++ b/list-objects-filter-options.c
> 
> > @@ -111,6 +112,21 @@ int opt_parse_list_objects_filter(const struct option *opt,
> >  	return parse_list_objects_filter(filter_options, arg);
> >  }
> >  
> > +void expand_list_objects_filter_spec(
> > +	const struct list_objects_filter_options *filter,
> > +	struct strbuf *expanded_spec)
> > +{
> > +	strbuf_init(expanded_spec, strlen(filter->filter_spec));
> > +	if (filter->choice == LOFC_BLOB_LIMIT)
> > +		strbuf_addf(expanded_spec, "blob:limit=%lu",
> > +			    filter->blob_limit_value);
> > +	else if (filter->choice == LOFC_TREE_DEPTH)
> > +		strbuf_addf(expanded_spec, "tree:%lu",
> > +			    filter->tree_exclude_depth);
> > +	else
> > +		strbuf_addstr(expanded_spec, filter->filter_spec);
> > +}
> > +
> 
> All compilers error out with something like this:
> 
>   list-objects-filter-options.c: In function
>   ‘expand_list_objects_filter_spec’:
>   list-objects-filter-options.c:124:29: error: ‘LOFC_TREE_DEPTH’ undeclared (first use in this function); did you mean ‘LOFC_TREE_NONE’?
>     else if (filter->choice == LOFC_TREE_DEPTH)
>                                ^~~~~~~~~~~~~~~
>                                LOFC_TREE_NONE
>   list-objects-filter-options.c:124:29: note: each undeclared identifier is reported only once for each function it appears in
>   list-objects-filter-options.c:126:14: error: ‘const struct list_objects_filter_options’ has no member named ‘tree_exclude_depth’
>           filter->tree_exclude_depth);
>                 ^~
>   make: *** [list-objects-filter-options.o] Error 1
> 

Hmm, looks like you may not have applied this on top of
md/list-objects-filter-by-depth? However, the most recent version of
that branch has its own compilation errors at the moment.

  reply	other threads:[~2019-01-09 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 23:21 [RFC PATCH 0/1] Expand abbreviated filters Josh Steadmon
2018-12-19 23:21 ` [RFC PATCH 1/1] filter-options: Expand abbreviated numbers Josh Steadmon
2019-01-02 23:15   ` Junio C Hamano
2019-01-07 21:25     ` Josh Steadmon
2019-01-07 22:12       ` Junio C Hamano
2019-01-07 22:18         ` Junio C Hamano
2019-01-08  0:17 ` [PATCH v2 0/1] Expand abbreviated filters Josh Steadmon
2019-01-08  0:17   ` [PATCH v2 1/1] filter-options: Expand abbreviated numbers Josh Steadmon
2019-01-09 12:23     ` SZEDER Gábor
2019-01-09 18:55       ` Josh Steadmon [this message]
2019-01-09 19:20         ` SZEDER Gábor

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=20190109185543.GD54613@google.com \
    --to=steadmon@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder.dev@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 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.