Re: [PATCH 4/4] use smudge-to-file in git checkout etc
- From
Joey Hess <id@joeyh.name>
- Date
- Jun 16, 2016, 20:55 UTC
- Message-ID
- <20160616205553.GA23176@kitenet.net>
- In-Reply-To
- <20160616203259.5886-5-joeyh@joeyh.name>
Joey Hess wrote:
Show 7 quoted lines
> + int smudge_to_file = can_smudge_to_file(ce->name);
> if (ce_mode_s_ifmt == S_IFREG &&
> + ! smudge_to_file &&
> convert_to_working_tree(ce->name, new, size, &buf)) {
> free(new);
> new = strbuf_detach(&buf, &newsize);
> @@ -189,13 +193,29 @@ static int write_entry(struct cache_entry *ce,Show 5 quoted lines
> + if (! can_smudge_to_file(ce->name)) {
> + }
> + else {
> + close(fd);
> + convert_to_working_tree_filter_to_file(ce->name, path, new, size);Oops, I had meant to avoid using smudge-to-file when e_mode_s_ifmt != S_IFREG, and forgot it in this patch, so it does the wrong thing for symlinks.
I'll send an updated patch set fixing this after any other review.
-- see shy jo