summaryrefslogtreecommitdiff
path: root/net/hub
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2018-06-10 10:42:56 +0000
committerleot <leot@pkgsrc.org>2018-06-10 10:42:56 +0000
commit91045035daee711c193741f32b7b90361f4e4f90 (patch)
treea77d25845a27ce115eb367bf8500af53a6b00aa4 /net/hub
parent742a8ad7a4c5eade674717d9e361bf8a29aabd2f (diff)
downloadpkgsrc-91045035daee711c193741f32b7b90361f4e4f90.tar.gz
hub: Avoid possible vim-isms when vi(1) is used
If the editor used matches the `\b(?:[gm]?vim|vi)(?:\.exe)?$' regular expression hub automatically add as arguments `--cmd'. The `--cmd' passed is probably supported only by vim so delete the `|vi' from the RE in order to not append possible non-standard arguments to non-vim vi-s. (This was spotted using `hub pull-request' that failed due non supported argument passed to vi) Bump PKGREVISION
Diffstat (limited to 'net/hub')
-rw-r--r--net/hub/Makefile3
-rw-r--r--net/hub/distinfo3
-rw-r--r--net/hub/patches/patch-github_editor.go18
3 files changed, 22 insertions, 2 deletions
diff --git a/net/hub/Makefile b/net/hub/Makefile
index 6e5d473a0a0..4074dbeb974 100644
--- a/net/hub/Makefile
+++ b/net/hub/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2018/06/01 15:46:43 leot Exp $
+# $NetBSD: Makefile,v 1.6 2018/06/10 10:42:56 leot Exp $
DISTNAME= hub-2.3.0
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=github/}
GITHUB_TAG= v${PKGVERSION_NOREV}
diff --git a/net/hub/distinfo b/net/hub/distinfo
index c56ad481683..a35c8d2c8a3 100644
--- a/net/hub/distinfo
+++ b/net/hub/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2018/06/01 15:42:22 leot Exp $
+$NetBSD: distinfo,v 1.3 2018/06/10 10:42:56 leot Exp $
SHA1 (hub-2.3.0.tar.gz) = 5e88d5f1226d21f129d844d7a2daaf72297fd040
RMD160 (hub-2.3.0.tar.gz) = 9f1ce6f14d35f550e5bc3b7c845519cf5b5d9aac
SHA512 (hub-2.3.0.tar.gz) = 560b4efde80d9074111b2adcf7fe29ce751d2bc185d5e5f9a86b05dbc62f9df9d712a5684c8ff9acd73047d2eb99735beb087a69f23cf162a14488655fd77bdf
Size (hub-2.3.0.tar.gz) = 978882 bytes
+SHA1 (patch-github_editor.go) = fa21efb055ea91c689eceb676548cf528a6aaefe
diff --git a/net/hub/patches/patch-github_editor.go b/net/hub/patches/patch-github_editor.go
new file mode 100644
index 00000000000..ebe2fe72caa
--- /dev/null
+++ b/net/hub/patches/patch-github_editor.go
@@ -0,0 +1,18 @@
+$NetBSD: patch-github_editor.go,v 1.1 2018/06/10 10:42:56 leot Exp $
+
+Avoid vim-isms.
+
+vi(1) is not always vim, avoid to treat it as such and to pass to
+it possible not supported arguments.
+
+--- github/editor.go.orig 2018-05-29 13:34:37.000000000 +0000
++++ github/editor.go
+@@ -129,7 +129,7 @@ func (e *Editor) readContent() (content
+
+ func openTextEditor(program, file string) error {
+ editCmd := cmd.New(program)
+- r := regexp.MustCompile(`\b(?:[gm]?vim|vi)(?:\.exe)?$`)
++ r := regexp.MustCompile(`\b(?:[gm]?vim)(?:\.exe)?$`)
+ if r.MatchString(editCmd.Name) {
+ editCmd.WithArg("--cmd")
+ editCmd.WithArg("set ft=gitcommit tw=0 wrap lbr")