[MacPorts] #56664: enable diff-highlight in git, with variant

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
#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
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
#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
Resolution:           |   Keywords:  haspatch
      Port:  git      |
----------------------+----------------------
Changes (by iEFdev):

 * Attachment "Portfile_diff_highlight.diff" added.


--
Ticket URL: <https://trac.macports.org/ticket/56664>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#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
Resolution:           |   Keywords:  haspatch
      Port:  git      |
----------------------+----------------------
Changes (by iEFdev):

 * Attachment "mp_diff-hl_example.png" added.


--
Ticket URL: <https://trac.macports.org/ticket/56664>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#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
Resolution:           |   Keywords:  haspatch
      Port:  git      |
----------------------+----------------------

Comment (by 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.

 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?

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#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
Resolution:           |   Keywords:  haspatch
      Port:  git      |
----------------------+----------------------

Comment (by iEFdev):

 Replying to [comment:1 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

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#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
Resolution:           |   Keywords:  haspatch
      Port:  git      |
----------------------+----------------------
Changes (by iEFdev):

 * Attachment "Portfile_diff_highlight.2.diff" added.


--
Ticket URL: <https://trac.macports.org/ticket/56664>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#56664: enable diff-highlight in git, with variant
--------------------------+----------------------
  Reporter:  iEFdev       |      Owner:  ci42
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  git          |
--------------------------+----------------------
Changes (by mf2k):

 * version:  2.5.2 =>
 * type:  request => enhancement


Comment:

 Note that a "request" ticket type is only for requesting a new port.

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#56664: enable diff-highlight in git, with variant
--------------------------+----------------------
  Reporter:  iEFdev       |      Owner:  ci42
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  git          |
--------------------------+----------------------

Comment (by iEFdev):

 Replying to [comment:3 mf2k]:
 > Note that a "request" ticket type is only for requesting a new port.
 Ok, thanks! I didn't know that.

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#56664: enable diff-highlight in git, with variant
--------------------------+----------------------
  Reporter:  iEFdev       |      Owner:  ci42
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  git          |
--------------------------+----------------------

Comment (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.

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#56664: enable diff-highlight in git, with variant
--------------------------+----------------------
  Reporter:  iEFdev       |      Owner:  ci42
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  git          |
--------------------------+----------------------

Comment (by reneeotten):

 it looks like [https://github.com/macports/macports-
 ports/commit/16abf7d2bb7e520d69a99c5a48f68a15cb374143 this commit]
 (followed by [https://github.com/macports/macports-
 ports/commit/9e569373784542196fed3005f92eb5b0e249755f this one]) resolved
 this ticket, correct?

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56664: enable diff-highlight in git, with variant

MacPorts
In reply to this post by MacPorts
#56664: enable diff-highlight in git, with variant
--------------------------+----------------------
  Reporter:  iEFdev       |      Owner:  ci42
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  haspatch
      Port:  git          |
--------------------------+----------------------

Comment (by iEFdev):

 Replying to [comment:6 reneeotten]:
 > it looks like [https://github.com/macports/macports-
 ports/commit/16abf7d2bb7e520d69a99c5a48f68a15cb374143 this commit]
 (followed by [https://github.com/macports/macports-
 ports/commit/9e569373784542196fed3005f92eb5b0e249755f this one]) resolved
 this ticket, correct?
 Yes, it showed up tonight when I updated my ports.

 //Thanks! :+1:

--
Ticket URL: <https://trac.macports.org/ticket/56664#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS