Opened 6 years ago
Closed 4 years ago
#56664 closed enhancement (fixed)
enable diff-highlight in git, with variant
Reported by: | iefdev (Eric F) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | |
Port: | git |
Description
Found a 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:
-
(a) a/Portfile.orig vs. (b) b/Portfile
diff --git a/Portfile.orig b/Portfile index 44d286a..1b0f030 100644
a b variant credential_osxkeychain description {Install git credential-osxkeychain u 219 219 } 220 220 } 221 221 222 variant diff-highlight description {Install the diff-highlight utility from contrib} { 223 224 post-build { 225 system -W "${worksrcpath}/contrib/diff-highlight" "make" 226 } 227 228 notes " 229 To add the functionality to config, run: 230 231 $ git config --global interactive.diffFilter diff-highlight 232 233 " 234 235 } 236 222 237 platform darwin 8 { 223 238 build.args-append NO_APPLE_COMMON_CRYPTO=1 224 239 } 225 240 226 default_variants +doc +pcre +credential_osxkeychain 241 default_variants +doc +pcre +credential_osxkeychain +diff-highlight 227 242 228 243 livecheck.type regexm 229 244 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.
Attachments (3)
Change History (11)
Changed 6 years ago by iEFdev
Attachment: | Portfile_diff_highlight.diff added |
---|
Changed 6 years ago by iEFdev
Attachment: | mp_diff-hl_example.png added |
---|
comment:1 follow-up: 2 Changed 6 years ago by raimue (Rainer Müller)
comment:2 Changed 6 years ago by iEFdev
Replying to raimue:
Variant names must not contain a minus as that would be ambiguous (it is used to negate variants). Apparently you have not tested this change, as the Portfile fails to parse.
Sorry, my bad
Your notes do not describe what "functionality" they refer to.
Yes, it sounded a bit vague... I changed it to:
---> Staging git into destroot ---> Installing git @2.17.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_26 ---> Activating git @2.17.1_0+credential_osxkeychain+diff_highlight+doc+pcre+perl5_26 // … // ---> Some of the ports you installed have notes: git has the following notes: To add the use of "diff-highlight" to config, run: $ git config --global interactive.diffFilter diff-highlight
Better? Perhaps there's another terminlogy to use?
Now that you added a post-build to build the script, would it not also required to be copied in the destroot phase?
No, the file/script stays in its contrib folder.
adding a new patch
Changed 6 years ago by iEFdev
Attachment: | Portfile_diff_highlight.2.diff added |
---|
comment:3 follow-up: 4 Changed 6 years ago by mf2k (Frank Schima)
Type: | request → enhancement |
---|---|
Version: | 2.5.2 |
Note that a "request" ticket type is only for requesting a new port.
comment:4 Changed 6 years ago by iEFdev
Replying to mf2k:
Note that a "request" ticket type is only for requesting a new port.
Ok, thanks! I didn't know that.
comment:5 Changed 6 years ago by iEFdev
Any update on this, if it will be fixed or not?
Had to go and fix it manually again after the last update.
comment:6 follow-up: 7 Changed 6 years ago by reneeotten (Renee Otten)
it looks like this commit (followed by this one) resolved this ticket, correct?
comment:7 Changed 6 years ago by iEFdev
Replying to reneeotten:
it looks like this commit (followed by this one) resolved this ticket, correct?
Yes, it showed up tonight when I updated my ports.
Thanks! :+1:
comment:8 Changed 4 years ago by mf2k (Frank Schima)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Variant names must not contain a minus as that would be ambiguous (it is used to negate variants). Apparently you have not tested this change, as the Portfile fails to parse.
Your notes do not describe what "functionality" they refer to.
Now that you added a post-build to build the script, would it not also required to be copied in the destroot phase?