Skip to content

Commit

Permalink
Enable textconv in the stage view
Browse files Browse the repository at this point in the history
  • Loading branch information
koutcher committed May 25, 2022
1 parent 7e8de4f commit a56671d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Bug fixes:
- Improve escaping of variables in external commands.
- Fix cursor behaviour during staging. (#842, #1028)
- Fix navigation in split tree view.
- Enable textconv in the stage view.

tig-2.5.5
---------
Expand Down
4 changes: 2 additions & 2 deletions include/tig/git.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
GIT_DIFF_INITIAL(encoding_arg, "--cached", context_arg, space_arg, "", new_name)

#define GIT_DIFF_STAGED(encoding_arg, context_arg, space_arg, old_name, new_name) \
"git", "diff-index", (encoding_arg), "--root", "--patch-with-stat", "-C", "-M", \
"git", "diff-index", (encoding_arg), "--root", "--textconv", "--patch-with-stat", "-C", "-M", \
"--cached", "--diff-filter=ACDMRTXB", DIFF_ARGS, "%(cmdlineargs)", (context_arg), (space_arg), "HEAD", \
"--", (old_name), (new_name), NULL

#define GIT_DIFF_UNSTAGED(encoding_arg, context_arg, space_arg, old_name, new_name) \
"git", "diff-files", (encoding_arg), "--root", "--patch-with-stat", "-C", "-M", \
"git", "diff-files", (encoding_arg), "--root", "--textconv", "--patch-with-stat", "-C", "-M", \
DIFF_ARGS, "%(cmdlineargs)", (context_arg), (space_arg), "--", (old_name), (new_name), NULL

/* Don't show staged unmerged entries. */
Expand Down
2 changes: 1 addition & 1 deletion src/stage.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ stage_open(struct view *view, enum open_flags flags)
/* Diffs for unmerged entries are empty when passing the new
* path, so leave out the new path. */
const char *files_unmerged_argv[] = {
"git", "diff-files", encoding_arg, "--root", "--patch-with-stat",
"git", "diff-files", encoding_arg, "--root", "--textconv", "--patch-with-stat",
DIFF_ARGS, diff_context_arg(), ignore_space_arg(), "--",
stage_status.old.name, NULL
};
Expand Down

0 comments on commit a56671d

Please sign in to comment.