Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> When preparing temporary files for an external diff, the files should be
> handled as if they were worktree files.

I do not think so.  convert_to_working_tree() aka "smudge" means you would
be feeding crap like $Id$ expansion to the external diff, which we chose
not to do quite on purpose.

I think the right solution is to filter inside GIT_EXTERNAL_DIFF *if* the
diff tool you are dispatching into from the external diff script wants to
take smudged representation.  I know we don't have such a command right
now, but something like

	git filter --take-attr-for-path=$path --direction=out <clean >smudged
	git filter --take-attr-for-path=$path --direction=in >clean ><mudged

to invoke convert_to_working_tree() and convert_to_git() filters would be
sufficient.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux