git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Phillip Wood <phillip.wood123@gmail.com>,
	Thomas Gummerer <t.gummerer@gmail.com>
Subject: Re: [PATCH v5 2/2] am: reload .gitattributes after patching it
Date: Wed, 28 Aug 2019 13:30:53 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1908281327180.46@tvgsbejvaqbjf.bet> (raw)
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:

> 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

  reply	other threads:[~2019-08-28 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-25 23:33 [PATCH v5 0/2] Honor .gitattributes with rebase --am brian m. carlson
2019-08-25 23:33 ` [PATCH v5 1/2] path: add a function to check for path suffix brian m. carlson
2019-08-25 23:33 ` [PATCH v5 2/2] am: reload .gitattributes after patching it brian m. carlson
2019-08-28 11:30   ` Johannes Schindelin [this message]
2019-08-29 23:09     ` brian m. carlson
2019-08-30 19:46       ` Johannes Schindelin
2019-08-26 15:11 ` [PATCH v5 0/2] Honor .gitattributes with rebase --am Phillip Wood
2019-09-02 22:39 ` [PATCH v6 " brian m. carlson
2019-09-02 22:39   ` [PATCH v6 1/2] path: add a function to check for path suffix brian m. carlson
2019-09-02 22:39   ` [PATCH v6 2/2] am: reload .gitattributes after patching it brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1908281327180.46@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=phillip.wood123@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=t.gummerer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).