Use working tree directory instead of temp directory whenever it matches the right or left hand side of the diff.
Closed this issue · 5 comments
What would it take to use the working tree directory directly instead of a temporary directory whenever the working tree matches what would end up in the temporary directory? Some diff tools -- Beyond Compare, Guiffy -- allow editing the files under comparison, and it would be really nice to edit the affected files as I'm diffing.
I see that there's a --copy-back option that probably provides the behavior that I want. It would be nice if it "just worked" without the option, and if the path that git-diffall presents to my diff tool were literally the working tree directory.
The --copy-back
option was intended to provide this behavior. When used, your diff tool should show the path as "working_tree" for the files.
I specifically avoided having --copy-back
be the default behavior to match the way git difftool
works. However, I probably need to take another look to see how strongly I feel about that decision.
As the script works today, it only copies files that have been added, modified or deleted to the temp directory. This reduces disk space and processing time by only working on files that are needed for the comparison. On large repos, this can be important.
If the script were changed to use the actual working copy directory as one of the diff targets, then the temp directory would need a complete copy of the repo files as well, instead of just a copy of the files needed for comparison.
For now, you could simply add a line to your copy of the script that always sets copy_back=1
. Anywhere after line 68 in the HEAD version would work.
Thanks, Tim.
On Mon, Dec 5, 2011 at 4:11 PM, Tim Henigan
reply@reply.github.com
wrote:
For now, you could simply add a line to your copy of the script that always sets
copy_back=1
. Anywhere after line 68 in the HEAD version would work.
Reply to this email directly or view it on GitHub:
#13 (comment)
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure