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

Re: [PATCH 2/2] WIP per-path attribute based hunk header selection.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 5, 2007, 11:25 UTC
Message-ID
<Pine.LNX.4.64.0707051223520.9789@racer.site>
In-Reply-To
<7vlkdve93o.fsf_-_@assigned-by-dhcp.cox.net>
Hi,
On Wed, 4 Jul 2007, Junio C Hamano wrote:
Show 39 quoted lines
> diff --git a/diff.c b/diff.c
> index 552f7c0..0c7d2c6 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -3011,21 +3079,6 @@ void diffcore_std(struct diff_options *options)
>  	if (options->quiet)
>  		return;
>  
> -	/*
> -	 * break/rename count similarity differently depending on
> -	 * the binary-ness.
> -	 */
> -	if ((options->break_opt != -1) || (options->detect_rename)) {
> -		struct diff_queue_struct *q = &diff_queued_diff;
> -		int i;
> -
> -		for (i = 0; i < q->nr; i++) {
> -			struct diff_filepair *p = q->queue[i];
> -			p->one->is_binary = file_is_binary(p->one);
> -			p->two->is_binary = file_is_binary(p->two);
> -		}
> -	}
> -
>  	if (options->break_opt != -1)
>  		diffcore_break(options->break_opt);
>  	if (options->detect_rename)
> diff --git a/diffcore-delta.c b/diffcore-delta.c
> index a038b16..d9729e5 100644
> --- a/diffcore-delta.c
> +++ b/diffcore-delta.c
> @@ -129,7 +129,7 @@ static struct spanhash_top *hash_chars(struct diff_filespec *one)
>  	struct spanhash_top *hash;
>  	unsigned char *buf = one->data;
>  	unsigned int sz = one->size;
> -	int is_text = !one->is_binary;
> +	int is_text = !diff_filespec_is_binary(one);
>  
>  	i = INITIAL_HASH_SIZE;
>  	hash = xmalloc(sizeof(*hash) + sizeof(struct spanhash) * (1<<i));
It is quite cute to hide this in the funcname patch...

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 29 in “diff: add custom regular expressions for function names”
  1. 2/2 diff: add custom regular expressions for function namesJohannes Schindelin, Jul 4, 2007
  2. Linus TorvaldsJul 4, 2007
  3. Johannes SchindelinJul 4, 2007
  4. Junio C HamanoJul 4, 2007
  5. Johannes SchindelinJul 4, 2007
  6. Junio C HamanoJul 5, 2007
  7. 1/2 Future-proof source for changes in xdemitconf_tJunio C Hamano, Jul 5, 2007
  8. Johannes SchindelinJul 5, 2007
  9. 2/2 WIP per-path attribute based hunk header selection.Junio C Hamano, Jul 5, 2007
  10. Johannes SchindelinJul 5, 2007
  11. Junio C HamanoJul 5, 2007
  12. 1/3 Introduce diff_filespec_is_binary()Junio C Hamano, Jul 6, 2007
  13. Johannes SchindelinJul 6, 2007
  14. Per-path attribute based hunk header selection.Junio C Hamano, Jul 6, 2007
  15. Johannes SchindelinJul 6, 2007
  16. Linus TorvaldsJul 6, 2007
  17. Junio C HamanoJul 7, 2007
  18. しらいしななこJul 7, 2007
  19. Junio C HamanoJul 7, 2007
  20. Johannes SchindelinJul 7, 2007
  21. Junio C HamanoJul 7, 2007
  22. Junio C HamanoJul 8, 2007
  23. Johannes SchindelinJul 8, 2007
  24. Nicolas PitreJul 9, 2007
  25. Junio C HamanoJul 9, 2007
  26. Johannes SchindelinJul 9, 2007
  27. Fix configuration syntax to specify customized hunk header patterns.Junio C Hamano, Jul 7, 2007
  28. Florian WeimerJul 5, 2007
  29. Johannes SchindelinJul 5, 2007

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.