public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-vcs/lazygit/files/, dev-vcs/lazygit/
@ 2020-04-08  0:22 Sergey Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Torokhov @ 2020-04-08  0:22 UTC (permalink / raw
  To: gentoo-commits

commit:     80233e4bed50a9aa42f502659b5f228027cc1337
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Wed Apr  8 00:21:17 2020 +0000
Commit:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
CommitDate: Wed Apr  8 00:21:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=80233e4b

dev-vcs/lazygit: add new package

Add ebuild for lazygit-0.19:
a simple terminal UI for git commands, written in Go with the gocui library.

The patch fix crash if git config use 'showSignature = true' option.

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>

 dev-vcs/lazygit/Manifest                           |  1 +
 .../lazygit-0.19-fix-gpg-breaking-terminal.patch   | 32 +++++++++++++++++
 dev-vcs/lazygit/lazygit-0.19.ebuild                | 40 ++++++++++++++++++++++
 dev-vcs/lazygit/metadata.xml                       | 14 ++++++++
 4 files changed, 87 insertions(+)

diff --git a/dev-vcs/lazygit/Manifest b/dev-vcs/lazygit/Manifest
new file mode 100644
index 0000000..780c69f
--- /dev/null
+++ b/dev-vcs/lazygit/Manifest
@@ -0,0 +1 @@
+DIST lazygit-0.19.tar.gz 9193308 BLAKE2B c07141661387094651cb6137579dea8ab5231b3e08b0733124cc97f1392251db592e01d60297356c8c5df1f1db554bc8a3be86cd07beed158d33b9eabdb015d4 SHA512 6259fdb98ae74ee59f395bd79fcbe3280b679883cbc0c190e64a36464c258597e18a6b70842cb242696536cfea35ea9c83f43b05ad20ead4f5120e436875abad

diff --git a/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch b/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch
new file mode 100644
index 0000000..a3bee2b
--- /dev/null
+++ b/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch
@@ -0,0 +1,32 @@
+From 7b7f7f0696d94c01852290fa3552caffa0b2af7b Mon Sep 17 00:00:00 2001
+From: Glenn Vriesman <glenn.vriesman@gmail.com>
+Date: Mon, 6 Apr 2020 19:26:12 +0200
+Subject: [PATCH] fix: fixed gpg breaking terminal
+
+Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
+---
+ pkg/commands/commit_list_builder.go | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go b/pkg/commands/commit_list_builder.go
+index 1204b488..f4bbc9dd 100644
+--- a/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go
++++ b/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go
+@@ -109,11 +109,12 @@ func (c *CommitListBuilder) GetCommits(options GetCommitsOptions) ([]*Commit, er
+ 	cmd := c.getLogCmd(options)
+ 
+ 	err = RunLineOutputCmd(cmd, func(line string) (bool, error) {
+-		commit := c.extractCommitFromLine(line)
+-		_, unpushed := unpushedCommits[commit.ShortSha()]
+-		commit.Status = map[bool]string{true: "unpushed", false: "pushed"}[unpushed]
+-		commits = append(commits, commit)
+-
++		if strings.Split(line, " ")[0] != "gpg:" {
++			commit := c.extractCommitFromLine(line)
++			_, unpushed := unpushedCommits[commit.ShortSha()]
++			commit.Status = map[bool]string{true: "unpushed", false: "pushed"}[unpushed]
++			commits = append(commits, commit)
++		}
+ 		return false, nil
+ 	})
+ 	if err != nil {

diff --git a/dev-vcs/lazygit/lazygit-0.19.ebuild b/dev-vcs/lazygit/lazygit-0.19.ebuild
new file mode 100644
index 0000000..6181240
--- /dev/null
+++ b/dev-vcs/lazygit/lazygit-0.19.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGO_PN="github.com/jesseduffield/lazygit"
+
+inherit golang-build golang-vcs-snapshot
+
+DESCRIPTION="Lazygit, a simple terminal UI for git commands"
+HOMEPAGE="https://github.com/jesseduffield/lazygit"
+SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=( sys-libs/glibc )
+RDEPEND=(
+	${DEPEND}
+	dev-vcs/git
+)
+
+PATCHES=( "${FILESDIR}/${P}-fix-gpg-breaking-terminal.patch" )
+
+src_compile() {
+	GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die
+}
+
+src_install() {
+	dobin bin/lazygit
+
+	local DOCS=(
+		src/${EGO_PN}/{CONTRIBUTING,README}.md
+		src/${EGO_PN}/docs/*.md
+		src/${EGO_PN}/docs/keybindings/*.md
+	)
+	einstalldocs
+}

diff --git a/dev-vcs/lazygit/metadata.xml b/dev-vcs/lazygit/metadata.xml
new file mode 100644
index 0000000..dceadcf
--- /dev/null
+++ b/dev-vcs/lazygit/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>torokhov-s-a@yandex.ru</email>
+		<name>Sergey Torokhov</name>
+	</maintainer>
+<longdescription>
+	A simple terminal UI for git commands, written in Go with the gocui library
+</longdescription>
+<upstream>
+	<remote-id type="github">jesseduffield/lazygit</remote-id>
+</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-vcs/lazygit/files/, dev-vcs/lazygit/
@ 2020-11-07 20:36 Sergey Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Torokhov @ 2020-11-07 20:36 UTC (permalink / raw
  To: gentoo-commits

commit:     b0cc9143ef8234aeeb00e181f899d084372e0e56
Author:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Sat Nov  7 20:35:03 2020 +0000
Commit:     Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
CommitDate: Sat Nov  7 20:35:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b0cc9143

dev-vcs/lazygit: drop 0.23.1 revisions

Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>

 dev-vcs/lazygit/Manifest                           |   1 -
 .../files/lazygit-0.23.1_ssh_passphrase.patch      | 122 ---------------------
 dev-vcs/lazygit/lazygit-0.23.1-r1.ebuild           |  38 -------
 dev-vcs/lazygit/lazygit-0.23.1.ebuild              |  36 ------
 4 files changed, 197 deletions(-)

diff --git a/dev-vcs/lazygit/Manifest b/dev-vcs/lazygit/Manifest
index a8d7e77c..6590b46f 100644
--- a/dev-vcs/lazygit/Manifest
+++ b/dev-vcs/lazygit/Manifest
@@ -1,5 +1,4 @@
 DIST lazygit-0.20.9.tar.gz 9196030 BLAKE2B 7fd64d06b3036926b00cc64f684d48a3791561e9b48f4bfbc2134e019caf4c96f8a37e2a1d33c79cab9a840b20f212f999f81d1e5a9763e2902332c298ede613 SHA512 d38fd390076a24b914309b6ecb506fc7b21e48c0bfab14aee5ff3bb7bcb591f47bf82051e5442ca4d4d2a0d864eb1554a64c594aefb130ec4f07861128d124dd
 DIST lazygit-0.22.9.tar.gz 9232631 BLAKE2B 50febf0727dc3fff0e61b158bc37df4128cdc9934a42b113612896a3712fb7cd0ce0a0860eec88cbbde289fd08fb492e851937be549a2036ad993bdeb3a101ae SHA512 9d4dc92762099c141e56bbb386217ea2028ba6a78d6bb5d54ef9c022e447a1b9fa2ce37d6e2813411fe6fa4f5192753beec8b136838aefe067019fd0820225e1
-DIST lazygit-0.23.1.tar.gz 2143832 BLAKE2B 631768a0b6e9b3a18742a5fc0d6c71442e6c81aea2ee2eea72320ef0b624b82220be999d878865d798fe00bd86c22f0a8ea9c3c8b8958edc59713ada308645f6 SHA512 f2a4a949888f63c74931ec10cee8551226ce8886d9f6847403490cfa48127c561dfa9b9f7efef879549ab4dccbf06bdf95fdb5a697736f57fb696c658b0e3a39
 DIST lazygit-0.23.6.tar.gz 2144643 BLAKE2B d8f8be826212517abfc0dd0feace532600a8455c49874e385257a73ec8e3ea794a13d960fbd122461c454313d5a210cd56be99d98cffb5b47c41d70bd67921d3 SHA512 a71bb951eb452252a97789113664b00212cce4bea223c898b20ce3b3dcdc761d3cafe036b5d2dce20c4da06af361ee21f2e701464ba99dcddc49f383219d2713
 DIST lazygit-0.23.7.tar.gz 2144614 BLAKE2B d18aaa19212ec9e6ed7d3b406d3e1f6413f6c15bf6a8c7c99cb8a2b01b9388db3f1ad04c485782e0823415cec3c6b461cf942583ef0ac744cb18270c8fc943b1 SHA512 ffc827a08a3ba99afa339cee48b9e10267bc4aa27592d43ec1e4be80a7b4f9e628f286b50a1940a59a5cfa96121de6ce4247ec91642a8798dba8ca42232596b9

diff --git a/dev-vcs/lazygit/files/lazygit-0.23.1_ssh_passphrase.patch b/dev-vcs/lazygit/files/lazygit-0.23.1_ssh_passphrase.patch
deleted file mode 100644
index 11d63bdf..00000000
--- a/dev-vcs/lazygit/files/lazygit-0.23.1_ssh_passphrase.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-diff -Naur a/src/github.com/jesseduffield/lazygit/pkg/commands/oscommands/os.go b/src/github.com/jesseduffield/lazygit/pkg/commands/oscommands/os.go
---- a/src/github.com/jesseduffield/lazygit/pkg/commands/oscommands/os.go	2020-10-10 02:34:14.000000000 +0300
-+++ b/src/github.com/jesseduffield/lazygit/pkg/commands/oscommands/os.go	2020-10-10 14:00:26.000000000 +0300
-@@ -143,18 +143,19 @@
- 	return RunCommandWithOutputLiveWrapper(c, command, output)
- }
- 
--// DetectUnamePass detect a username / password question in a command
--// promptUserForCredential is a function that gets executed when this function detect you need to fillin a password
--// The promptUserForCredential argument will be "username" or "password" and expects the user's password or username back
-+// DetectUnamePass detect a username / password / passphrase question in a command
-+// promptUserForCredential is a function that gets executed when this function detect you need to fillin a password or passphrase
-+// The promptUserForCredential argument will be "username", "password" or "passphrase" and expects the user's password/passphrase or username back
- func (c *OSCommand) DetectUnamePass(command string, promptUserForCredential func(string) string) error {
- 	ttyText := ""
- 	errMessage := c.RunCommandWithOutputLive(command, func(word string) string {
- 		ttyText = ttyText + " " + word
- 
- 		prompts := map[string]string{
--			`.+'s password:`:         "password",
--			`Password\s*for\s*'.+':`: "password",
--			`Username\s*for\s*'.+':`: "username",
-+			`.+'s password:`:                         "password",
-+			`Password\s*for\s*'.+':`:                 "password",
-+			`Username\s*for\s*'.+':`:                 "username",
-+			`Enter\s*passphrase\s*for\s*key\s*'.+':`: "passphrase",
- 		}
- 
- 		for pattern, askFor := range prompts {
-diff -Naur a/src/github.com/jesseduffield/lazygit/pkg/gui/credentials_panel.go b/src/github.com/jesseduffield/lazygit/pkg/gui/credentials_panel.go
---- a/src/github.com/jesseduffield/lazygit/pkg/gui/credentials_panel.go	2020-10-10 02:34:14.000000000 +0300
-+++ b/src/github.com/jesseduffield/lazygit/pkg/gui/credentials_panel.go	2020-10-10 03:17:57.000000000 +0300
-@@ -9,7 +9,7 @@
- 
- type credentials chan string
- 
--// promptUserForCredential wait for a username or password input from the credentials popup
-+// promptUserForCredential wait for a username, password or passphrase input from the credentials popup
- func (gui *Gui) promptUserForCredential(passOrUname string) string {
- 	gui.credentials = make(chan string)
- 	gui.g.Update(func(g *gocui.Gui) error {
-@@ -17,9 +17,12 @@
- 		if passOrUname == "username" {
- 			credentialsView.Title = gui.Tr.CredentialsUsername
- 			credentialsView.Mask = 0
--		} else {
-+		} else if passOrUname == "password" {
- 			credentialsView.Title = gui.Tr.CredentialsPassword
- 			credentialsView.Mask = '*'
-+		} else {
-+			credentialsView.Title = gui.Tr.CredentialsPassphrase
-+			credentialsView.Mask = '*'
- 		}
- 
- 		if err := gui.switchContext(gui.Contexts.Credentials.Context); err != nil {
-@@ -30,7 +33,7 @@
- 		return nil
- 	})
- 
--	// wait for username/passwords input
-+	// wait for username/passwords/passphrase input
- 	userInput := <-gui.credentials
- 	return userInput + "\n"
- }
-@@ -70,10 +73,10 @@
- func (gui *Gui) handleCredentialsPopup(cmdErr error) {
- 	if cmdErr != nil {
- 		errMessage := cmdErr.Error()
--		if strings.Contains(errMessage, "Invalid username or password") {
-+		if strings.Contains(errMessage, "Invalid username, password or passphrase") {
- 			errMessage = gui.Tr.PassUnameWrong
- 		}
--		// we are not logging this error because it may contain a password
-+		// we are not logging this error because it may contain a password or a passphrase
- 		gui.createErrorPanel(errMessage)
- 	} else {
- 		_ = gui.closeConfirmationPrompt(false)
-diff -Naur a/src/github.com/jesseduffield/lazygit/pkg/i18n/dutch.go b/src/github.com/jesseduffield/lazygit/pkg/i18n/dutch.go
---- a/src/github.com/jesseduffield/lazygit/pkg/i18n/dutch.go	2020-10-10 02:34:14.000000000 +0300
-+++ b/src/github.com/jesseduffield/lazygit/pkg/i18n/dutch.go	2020-10-10 02:57:03.000000000 +0300
-@@ -19,6 +19,7 @@
- 		CommitMessage:                       "Commit bericht",
- 		CredentialsUsername:                 "Gebruikersnaam",
- 		CredentialsPassword:                 "Wachtwoord",
-+		CredentialsPassphrase:               "Voer een wachtwoordzin in voor de SSH-sleutel",
- 		PassUnameWrong:                      "Wachtwoord en/of gebruikersnaam verkeert",
- 		CommitChanges:                       "Commit veranderingen",
- 		AmendLastCommit:                     "wijzig laatste commit",
-diff -Naur a/src/github.com/jesseduffield/lazygit/pkg/i18n/english.go b/src/github.com/jesseduffield/lazygit/pkg/i18n/english.go
---- a/src/github.com/jesseduffield/lazygit/pkg/i18n/english.go	2020-10-10 02:34:14.000000000 +0300
-+++ b/src/github.com/jesseduffield/lazygit/pkg/i18n/english.go	2020-10-10 02:56:08.000000000 +0300
-@@ -30,6 +30,7 @@
- 	CommitMessage                       string
- 	CredentialsUsername                 string
- 	CredentialsPassword                 string
-+	CredentialsPassphrase               string
- 	PassUnameWrong                      string
- 	CommitChanges                       string
- 	AmendLastCommit                     string
-@@ -519,7 +520,8 @@
- 		CommitMessage:                       "Commit message",
- 		CredentialsUsername:                 "Username",
- 		CredentialsPassword:                 "Password",
--		PassUnameWrong:                      "Password and/or username wrong",
-+		CredentialsPassphrase:               "Enter passphrase for SSH key",
-+		PassUnameWrong:                      "Password, passphrase and/or username wrong",
- 		CommitChanges:                       "commit changes",
- 		AmendLastCommit:                     "amend last commit",
- 		SureToAmend:                         "Are you sure you want to amend last commit? Afterwards, you can change commit message from the commits panel.",
-diff -Naur a/src/github.com/jesseduffield/lazygit/pkg/i18n/polish.go b/src/github.com/jesseduffield/lazygit/pkg/i18n/polish.go
---- a/src/github.com/jesseduffield/lazygit/pkg/i18n/polish.go	2020-10-10 02:34:14.000000000 +0300
-+++ b/src/github.com/jesseduffield/lazygit/pkg/i18n/polish.go	2020-10-10 02:49:23.000000000 +0300
-@@ -15,7 +15,8 @@
- 		CommitMessage:                       "Wiadomość commita",
- 		CredentialsUsername:                 "Username",
- 		CredentialsPassword:                 "Password",
--		PassUnameWrong:                      "Password and/or username wrong",
-+		CredentialsPassphrase:               "Passphrase",
-+		PassUnameWrong:                      "Password, passphrase and/or username wrong",
- 		CommitChanges:                       "commituj zmiany",
- 		AmendLastCommit:                     "zmień ostatnie zatwierdzenie",
- 		SureToAmend:                         "Czy na pewno chcesz zmienić ostatnie zatwierdzenie? Możesz zmienić komunikat zatwierdzenia z panelu zatwierdzeń.",

diff --git a/dev-vcs/lazygit/lazygit-0.23.1-r1.ebuild b/dev-vcs/lazygit/lazygit-0.23.1-r1.ebuild
deleted file mode 100644
index b73db124..00000000
--- a/dev-vcs/lazygit/lazygit-0.23.1-r1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGO_PN="github.com/jesseduffield/lazygit"
-
-inherit golang-build golang-vcs-snapshot
-
-DESCRIPTION="Lazygit, a simple terminal UI for git commands"
-HOMEPAGE="https://github.com/jesseduffield/lazygit"
-SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="doc"
-
-DEPEND=( sys-libs/glibc )
-RDEPEND=(
-	${DEPEND}
-	dev-vcs/git
-)
-
-DOCS=( src/${EGO_PN}/{CONTRIBUTING,README}.md )
-
-PATCHES=( "${FILESDIR}/${P}_ssh_passphrase.patch" )
-
-src_compile() {
-	GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die
-}
-
-src_install() {
-	dobin bin/lazygit
-
-	use doc && dodoc -r "src/${EGO_PN}/docs/."
-	einstalldocs
-}

diff --git a/dev-vcs/lazygit/lazygit-0.23.1.ebuild b/dev-vcs/lazygit/lazygit-0.23.1.ebuild
deleted file mode 100644
index df46884b..00000000
--- a/dev-vcs/lazygit/lazygit-0.23.1.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGO_PN="github.com/jesseduffield/lazygit"
-
-inherit golang-build golang-vcs-snapshot
-
-DESCRIPTION="Lazygit, a simple terminal UI for git commands"
-HOMEPAGE="https://github.com/jesseduffield/lazygit"
-SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="doc"
-
-DEPEND=( sys-libs/glibc )
-RDEPEND=(
-	${DEPEND}
-	dev-vcs/git
-)
-
-DOCS=( src/${EGO_PN}/{CONTRIBUTING,README}.md )
-
-src_compile() {
-	GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die
-}
-
-src_install() {
-	dobin bin/lazygit
-
-	use doc && dodoc -r "src/${EGO_PN}/docs/."
-	einstalldocs
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-07 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-07 20:36 [gentoo-commits] repo/proj/guru:dev commit in: dev-vcs/lazygit/files/, dev-vcs/lazygit/ Sergey Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2020-04-08  0:22 Sergey Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox