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

Re: [PATCH v5 2/2] am: reload .gitattributes after patching it

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 28, 2019, 11:30 UTC
Message-ID
<nycvar.QRO.7.76.6.1908281327180.46@tvgsbejvaqbjf.bet>
In-Reply-To
<20190825233340.10894-3-sandals@crustytoothpaste.net>
Hi brian,

[chiming in from the peanut gallery; if my comments don't make any sense, please do feel free to completely ignore me.]

On Sun, 25 Aug 2019, brian m. carlson wrote:
Show 25 quoted lines
> diff --git a/convert.c b/convert.c
> index 94ff837649..0e6e9d2d75 100644
> --- a/convert.c
> +++ b/convert.c
> @@ -8,6 +8,7 @@
>  #include "pkt-line.h"
>  #include "sub-process.h"
>  #include "utf8.h"
> +#include "ll-merge.h"
>
>  /*
>   * convert.c - convert a file when checking it out and checking it in.
> @@ -1293,10 +1294,11 @@ struct conv_attrs {
>  	const char *working_tree_encoding; /* Supported encoding or default encoding if NULL */
>  };
>
> +static struct attr_check *check;
> +
>  static void convert_attrs(const struct index_state *istate,
>  			  struct conv_attrs *ca, const char *path)
>  {
> -	static struct attr_check *check;
>  	struct attr_check_item *ccheck = NULL;
>
>  	if (!check) {
After this line:
                check = attr_check_initl("crlf", "ident", "filter",
				"eol", "text", "working-tree-encoding",
				NULL);
		user_convert_tail = &user_convert;
		git_config(read_convert_config, NULL);
	}
I am a bit worried about `user_convert`: it seems never to be re-set.
Also, how thread-safe do we need `reset_parsed_attributes()` to be?

Ciao, Dscho

Previous: brian m. carlsonNext: brian m. carlson
Message 4 of 10 in “Honor .gitattributes with rebase --am”
  1. 0/2 Honor .gitattributes with rebase --ambrian m. carlson, Aug 25, 2019
  2. 1/2 path: add a function to check for path suffixbrian m. carlson, Aug 25, 2019
  3. 2/2 am: reload .gitattributes after patching itbrian m. carlson, Aug 25, 2019
  4. Johannes SchindelinAug 28, 2019
  5. brian m. carlsonAug 29, 2019
  6. Johannes SchindelinAug 30, 2019
  7. Phillip WoodAug 26, 2019
  8. 0/2 Honor .gitattributes with rebase --ambrian m. carlson, Sep 2, 2019
  9. 1/2 path: add a function to check for path suffixbrian m. carlson, Sep 2, 2019
  10. 2/2 am: reload .gitattributes after patching itbrian m. carlson, Sep 2, 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.