You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lines containing the file name are now colored using the same color
as the diff header and index lines:
diff --git a/NEWS.adoc b/NEWS.adoc
index 6b152f3..bf0c83a 100644
--- a/NEWS.adoc
+++ b/NEWS.adoc
References #375
I've fixed it so that all diff header lines have the same (yellow) color.
Changing the color based on whether the file is renamed is a lot harder and I am not sure it is really that useful since Git will add its own rename meta lines.
It seems that in tig, when you look into a commit with renames, the old file is listed with all lines removed (i.e. starting with - in the diff) and the new files with everything added.
The same is the case for the short stat given before the diff.
And the file name is e.g.
--- a/oldname
+++ /dev/null
respectively:
--- /dev/null
+++ b/newname
gitg does that better.
it only lists lines like;
diff --git a/old1 b/new1
similarity index 100%
rename from old2
rename to new2
(if there is no difference).
And if the file wasn't just renamed, but also has modifications (but is still detected as renamed), than it does what I've described originally, i.e.
--- a/foo
+++ b/bar
(and afterwards the diffs between the old and new file, but just the real differences,.. not everything - and then everything +)
Tig doesn't automatically enable rename detection, like gtig. It used to but it was removed to make diff loading faster. Maybe something to reconsider.
Hi.
In the diff views the lines for filea/b, e.g.:
--- a/foo
+++ b/foo
are coloured red/green.
I think it would be better for readability if this was only the case if the file was also renamed, e.g.
--- a/foo
+++ b/bar
Cheers,
Chris.
The text was updated successfully, but these errors were encountered: