From: Joey Hess Date: Thu, 16 Jun 2016 20:55:53 GMT Subject: Re: [PATCH 4/4] use smudge-to-file in git checkout etc Message-ID: <20160616205553.GA23176@kitenet.net> In-Reply-To: <20160616203259.5886-5-joeyh@joeyh.name> Joey Hess wrote: > + 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, > + 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