Skip to content

Enhance encoding support.

Alexander Gavrilov git 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 3 repliesIn review
  2. v24 patches 7 repliesSuperseded
  3. v18 patches 24 repliesSuperseded

Changes in v3 from the cover letter

- Killed get_cached_encoding, replacing it with get_path_encoding.
- Squashed file name and content patches into one.
- Added the tcl_encoding reimplementation patch. I should say that without the second cache this really makes a difference with thousand-file diffs.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4gitk: Port new encoding logic from git-gui.gitk+36 -30 replies
2/4gitk: Enhance file encoding support.gitk+27 -80 replies
3/4gitk: Implement batch lookup and caching of encoding attrs.gitk+34 -10 replies
4/4gitk: Optimize encoding name resolution using a lookup table.gitk+54 -300 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchJohannes Sixt
1/4T-b
2/4T-b
3/4T-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH (GITK) v3 0/4] Enhance encoding support.

Currently GUI tools don't provide enough support for viewing files that contain non-ASCII characters. This set of patches addresses this issue. The git-gui part of the series is based on patches that were in the 'pu' branch of the git-gui repository.

UPDATE: the git-gui part of the series is in master.

File encoding can be specified in the following ways:

1) It defaults to the current locale encoding.
2) It can be overridden by setting the gui.encoding option.
3) It can be further set on per-file basis by specifying the 'encoding' attribute in gitattributes.
4) Finally, git-gui allows directly selecting encodings through a popup menu.

Since git apparently cannot work with filenames in non-locale encodings anyway, I did not try to do anything about it apart from fixing some obvious bugs.

CHANGES v2:

- Wrote better comments for the first three patches.
- Added a patch to speed up loading of very large diffs.

CHANGES v3:

- Killed get_cached_encoding, replacing it with get_path_encoding.
- Squashed file name and content patches into one.
- Added the tcl_encoding reimplementation patch. I should say that without the second cache this really makes a difference with thousand-file diffs.

GITK:

	gitk: Port new encoding logic from git-gui.
	---
	 gitk |   39 ++++++++++++++++++++++++++++++++++++---
	 1 files changed, 36 insertions(+), 3 deletions(-)

	gitk: Enhance file encoding support.
	---
	 gitk |   35 +++++++++++++++++++++++++++--------
	 1 files changed, 27 insertions(+), 8 deletions(-)

	gitk: Implement batch lookup and caching of encoding attrs.
	---
	 gitk |   35 ++++++++++++++++++++++++++++++++++-
	 1 files changed, 34 insertions(+), 1 deletions(-)

	gitk: Optimize encoding name resolution using a lookup table.
	---
	 gitk |   84 ++++++++++++++++++++++++++++++++++++++++++-----------------------
	 1 files changed, 54 insertions(+), 30 deletions(-)