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

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
Previous: Joey Hess
Message 22 of 22 in “extend smudge/clean filters with direct file access”
  1. 0/4 extend smudge/clean filters with direct file accessJoey Hess, Jun 16, 2016
  2. 3/4 use clean-from-file in git addJoey Hess, Jun 16, 2016
  3. 2/4 add smudge-to-file and clean-from-file filter configurationJoey Hess, Jun 16, 2016
  4. Junio C HamanoJun 16, 2016
  5. Joey HessJun 17, 2016
  6. Junio C HamanoJun 17, 2016
  7. Eric SunshineJun 17, 2016
  8. Michael J GruberJun 17, 2016
  9. Joey HessJun 17, 2016
  10. Junio C HamanoJun 17, 2016
  11. Junio C HamanoJun 17, 2016
  12. Joey HessJun 17, 2016
  13. Joey HessJun 17, 2016
  14. Junio C HamanoJun 17, 2016
  15. 1/4 clarify %f documentationJoey Hess, Jun 16, 2016
  16. Junio C HamanoJun 16, 2016
  17. Joey HessJun 17, 2016
  18. Junio C HamanoJun 17, 2016
  19. Joey HessJun 17, 2016
  20. Junio C HamanoJun 17, 2016
  21. 4/4 use smudge-to-file in git checkout etcJoey Hess, Jun 16, 2016
  22. Joey HessJun 16, 2016

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.