git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 02/11] Add initial support for many promisor remotes

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Apr 3, 2019, 22:08 UTC
Message-ID
<20190403220839.GM32732@szeder.dev>
In-Reply-To
<20190401164045.17328-3-chriscool@tuxfamily.org>
On Mon, Apr 01, 2019 at 06:40:36PM +0200, Christian Couder wrote:
Show 38 quoted lines
> diff --git a/promisor-remote.c b/promisor-remote.c
> new file mode 100644
> index 0000000000..0c768210ee
> --- /dev/null
> +++ b/promisor-remote.c
> @@ -0,0 +1,92 @@
> +#include "cache.h"
> +#include "promisor-remote.h"
> +#include "config.h"
> +
> +static struct promisor_remote *promisors;
> +static struct promisor_remote **promisors_tail = &promisors;
> +
> +static struct promisor_remote *promisor_remote_new(const char *remote_name)
> +{
> +	struct promisor_remote *r;
> +
> +	if (*remote_name == '/') {
> +		warning(_("promisor remote name cannot begin with '/': %s"),
> +			remote_name);
> +		return NULL;
> +	}
> +
> +	FLEX_ALLOC_STR(r, name, remote_name);
> +
> +	*promisors_tail = r;
> +	promisors_tail = &r->next;
> +
> +	return r;
> +}
> +
> +static struct promisor_remote *promisor_remote_lookup(const char *remote_name,
> +						      struct promisor_remote **previous)
> +{
> +	struct promisor_remote *r, *p;
> +
> +	for (p = NULL, r = promisors; r; p = r, r = r->next)
> +		if (r->name && !strcmp(r->name, remote_name)) {
r->name is a FLEX_ARRAY, and Clang complains about this condition:
  promisor-remote.c:34:10: error: address of array 'r->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                  if (r->name && !strcmp(r->name, remote_name)) {
                      ~~~^~~~ ~~
  1 error generated.
  make: *** [promisor-remote.o] Error 1
Previous: Christian CouderNext: Christian Couder
Message 4 of 18 in “Many promisor remotes”
  1. 00/11 Many promisor remotesChristian Couder, Apr 1, 2019
  2. 01/11 fetch-object: make functions return an error codeChristian Couder, Apr 1, 2019
  3. 02/11 Add initial support for many promisor remotesChristian Couder, Apr 1, 2019
  4. SZEDER GáborApr 3, 2019
  5. Christian CouderApr 4, 2019
  6. 03/11 promisor-remote: implement promisor_remote_get_direct()Christian Couder, Apr 1, 2019
  7. 04/11 promisor-remote: add promisor_remote_reinit()Christian Couder, Apr 1, 2019
  8. 05/11 promisor-remote: use repository_format_partial_cloneChristian Couder, Apr 1, 2019
  9. 06/11 Use promisor_remote_get_direct() and has_promisor_remote()Christian Couder, Apr 1, 2019
  10. 07/11 promisor-remote: parse remote.*.partialclonefilterChristian Couder, Apr 1, 2019
  11. 08/11 builtin/fetch: remove unique promisor remote limitationChristian Couder, Apr 1, 2019
  12. 09/11 t0410: test fetching from many promisor remotesChristian Couder, Apr 1, 2019
  13. SZEDER GáborApr 5, 2019
  14. 10/11 partial-clone: add multiple remotes in the docChristian Couder, Apr 1, 2019
  15. 11/11 remote: add promisor and partial clone config to the docChristian Couder, Apr 1, 2019
  16. Junio C HamanoApr 4, 2019
  17. Christian CouderApr 4, 2019
  18. Johannes SchindelinApr 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.