gitk: use --textconv to generate diff text
PATCH 1/1 gitk: use --textconv to generate diff text
From: Johannes Sixt <[email protected]>
Date: Tue, 28 Apr 2009 14:03:54 +0200
For the most part gitk's focus is on showing history and changes in a human readable form. For this reason, it makes sense to generate the patch text in the diff view using --textconv so that textconv drivers are used if they are defined.
gitk can also generate patches, but we do not use --textconv because such patches could not be applied.
--- gitk-git/gitk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
gitk-git/gitk +1 -1
@@ -7194,7 +7194,7 @@ proc getblobdiffs {ids} { global limitdiffs vfilelimit curview global diffencoding targetline diffnparents - set cmd [diffcmd $ids "-p -C --cc --no-commit-id -U$diffcontext"] + set cmd [diffcmd $ids "-p --textconv -C --cc --no-commit-id -U$diffcontext"] if {$ignorespace} { append cmd " -w" }
Signature · 1 line
1.6.3.1007.g03ec
Quoted 9 lines · Johannes Sixt
For the most part gitk's focus is on showing history and changes in a human readable form. For this reason, it makes sense to generate the patch text in the diff view using --textconv so that textconv drivers are used if they are defined.
gitk can also generate patches, but we do not use --textconv because such patches could not be applied.
Signed-off-by Johannes Sixt <[email protected]>
As the original author of the textconv code, I am in favor of this. So much so that I even posted basically the same patch before:
http://article.gmane.org/gmane.comp.version-control.git/102523
I had trouble finding much discussion in the archive, but I think it may not have been taken because we were in release freeze (and textconv was a brand new feature in the release at the time).
-Peff
Quoted 8 lines · Jeff King
As the original author of the textconv code, I am in favor of this. So much so that I even posted basically the same patch before:
http://article.gmane.org/gmane.comp.version-control.git/102523
I had trouble finding much discussion in the archive, but I think it may not have been taken because we were in release freeze (and textconv was a brand new feature in the release at the time).
Which release did --textconv first appear in?
Paul.
Quoted 5 lines · Paul Mackerras
Quoted 3 lines
I had trouble finding much discussion in the archive, but I think it may not have been taken because we were in release freeze (and textconv was a brand new feature in the release at the time).
Which release did --textconv first appear in?
v1.6.1
-Peff
Quoted 7 lines · Jeff King
Quoted 5 lines · Johannes Sixt
For the most part gitk's focus is on showing history and changes in a human readable form. For this reason, it makes sense to generate the patch text in the diff view using --textconv so that textconv drivers are used if they are defined.
Quoted 6 lines
Quoted 4 lines
gitk can also generate patches, but we do not use --textconv because such patches could not be applied.
Signed-off-by Johannes Sixt <[email protected]>As the original author of the textconv code, I am in favor of this.
I agree; I think textconv is meant for this kind of usage.
Quoted 7 lines · Johannes Sixt
From: Johannes Sixt <[email protected]>
Date: Tue, 28 Apr 2009 14:03:54 +0200For the most part gitk's focus is on showing history and changes in a human readable form. For this reason, it makes sense to generate the patch text in the diff view using --textconv so that textconv drivers are used if they are defined.
FWIW, I keep a few Word documents in git and use catdoc as textconv driver. This works pretty well. Git-gui doesn't show any textual changes (it treats the Word files as binary, and it has to), with this patch I can use gitk to preview the changes in the worktree and the index.
-- Hannes