[MacPorts] #56664: enable diff-highlight in git, with variant
MacPorts
noreply at macports.org
Thu Jun 14 08:44:23 UTC 2018
#56664: enable diff-highlight in git, with variant
----------------------+----------------------
Reporter: iEFdev | Owner: ci42
Type: request | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.2
Keywords: haspatch | Port: git
----------------------+----------------------
// Found a [https://twitter.com/jasonkarns/status/885565933498109952 saved
link/tweet] from last year, that I forgot to ask about, and make this
request… //
Last year with v2.13.3, “diff-highlight” disappeard and now you have to
manually run a `make` in that folder to bring it back.
Wouldn't it be good to bring that back with a variant //(&/or make it
default)//? To activate it, one have to add the functionalty to config as
normal/before.
Something like:
{{{
#!diff
diff --git a/Portfile.orig b/Portfile
index 44d286a..1b0f030 100644
--- a/Portfile.orig
+++ b/Portfile
@@ -219,11 +219,26 @@ variant credential_osxkeychain description {Install
git credential-osxkeychain u
}
}
+variant diff-highlight description {Install the diff-highlight utility
from contrib} {
+
+ post-build {
+ system -W "${worksrcpath}/contrib/diff-highlight" "make"
+ }
+
+ notes "
+To add the functionality to config, run:
+
+ $ git config --global interactive.diffFilter diff-highlight
+
+"
+
+}
+
platform darwin 8 {
build.args-append NO_APPLE_COMMON_CRYPTO=1
}
-default_variants +doc +pcre +credential_osxkeychain
+default_variants +doc +pcre +credential_osxkeychain +diff-highlight
livecheck.type regexm
livecheck.regex {<span
class="version">.*?(\d+\.\d+\.\d+).*?</span>}
}}}
**Note:** Compared to the “osxkeychain” variant… There's a `"make [join
${build.args}]"` there. Not sure if that would be necessary? You just run
`make` if you do it manually.
Anyway, it would be nice to add it in some way, even if not default, but
the default would bring the old behaviour back.
//Adding a patch (from above), and an example picture incase anyone wonder
what the diff-highlight is.
--
Ticket URL: <https://trac.macports.org/ticket/56664>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list