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

Re: [PATCH v4 2/4] path: optimize common dir checking

From
Torsten Bögershausen <tboegi@web.de>
Date
Aug 30, 2015, 06:25 UTC
Message-ID
<55E2A1BF.5080204@web.de>
In-Reply-To
<1440618365-20628-3-git-send-email-dturner@twopensource.com>
On 26.08.15 21:46, David Turner wrote:
Show 11 quoted lines
> Instead of a linear search over common_list to check whether
> a path is common, use a trie.  The trie search operates on
> path prefixes, and handles excludes.
> 
> Signed-off-by: David Turner <dturner@twopensource.com>
> ---
>  path.c                | 226 ++++++++++++++++++++++++++++++++++++++++++++++----
>  t/t0060-path-utils.sh |   1 +
>  2 files changed, 213 insertions(+), 14 deletions(-)
> 
> diff --git a/path.c b/path.c
Show 5 quoted lines
> +		child->len = root->len - i - 1;
> +		if (child->len) {
> +			child->contents = strndup(root->contents + i + 1,
> +						   child->len);
>  		}

Could we use xtrndup() instead of strndup() ? (Otherwise it won't compile under Mac OS here)

Previous: David TurnerNext: David Turner
Message 10 of 13 in “per-worktree bisection refs”
  1. 0/4 per-worktree bisection refsDavid Turner, Aug 26, 2015
  2. 1/4 refs: clean up common_listDavid Turner, Aug 26, 2015
  3. 2/4 path: optimize common dir checkingDavid Turner, Aug 26, 2015
  4. Junio C HamanoAug 26, 2015
  5. David TurnerAug 26, 2015
  6. Junio C HamanoAug 26, 2015
  7. David TurnerAug 26, 2015
  8. Junio C HamanoAug 28, 2015
  9. David TurnerAug 28, 2015
  10. Torsten BögershausenAug 30, 2015
  11. David TurnerAug 31, 2015
  12. 3/4 refs: make refs/worktree/* per-worktreeDavid Turner, Aug 26, 2015
  13. 4/4 bisect: make bisection refs per-worktreeDavid Turner, Aug 26, 2015

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.