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

Re: [PATCH v9 1/4] cache-tree: Create/update cache-tree on checkout

From
Torsten Bögershausen <tboegi@web.de>
Date
Jul 15, 2014, 19:35 UTC
Message-ID
<53C5828F.2050005@web.de>
In-Reply-To
<1405283299-25636-1-git-send-email-dturner@twitter.com>
On 07/13/2014 10:28 PM, David Turner wrote:
> From: David Turner <dturner@twopensource.com>
[]
Show 13 quoted lines
> diff --git a/cache-tree.c b/cache-tree.c
> index 7fa524a..f951d7d 100644
> --- a/cache-tree.c
> +++ b/cache-tree.c
> @@ -239,9 +239,12 @@ static int update_one(struct cache_tree *it,
>   	struct strbuf buffer;
>   	int missing_ok = flags & WRITE_TREE_MISSING_OK;
>   	int dryrun = flags & WRITE_TREE_DRY_RUN;
> +	int repair = flags & WRITE_TREE_REPAIR;
>   	int to_invalidate = 0;
>   	int i;
>   
> +	assert(!(dryrun && repair));

I think something in the spirit of die("dryrun and repaiir can not be used together"\n) Would be nicer to the user as well as being more reliable (as assert may be a no-op in some systems)

Previous: David TurnerNext: Junio C Hamano
Message 5 of 6 in “cache-tree: Create/update cache-tree on checkout”
  1. 1/4 cache-tree: Create/update cache-tree on checkoutDavid Turner, Jul 13, 2014
  2. 2/4 test-dump-cache-tree: invalid trees are not errorsDavid Turner, Jul 13, 2014
  3. 3/4 cache-tree: subdirectory testsDavid Turner, Jul 13, 2014
  4. 4/4 cache-tree: Write updated cache-tree after commitDavid Turner, Jul 13, 2014
  5. Torsten BögershausenJul 15, 2014
  6. Junio C HamanoJul 15, 2014

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.