unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63261: Recent changes to git config cause errors for non-committers
@ 2023-05-04 10:47 Brian Cully via Bug reports for GNU Guix
  2023-05-04 13:38 ` Maxim Cournoyer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Brian Cully via Bug reports for GNU Guix @ 2023-05-04 10:47 UTC (permalink / raw)
  To: 63261; +Cc: Maxim Cournoyer


I've run into two issues with the recent changes to git config 
integration:

1) All commits must now be signed, even if you're not a 
committer. This breaks just tons of things, including 
rebasing. I'm not sure how to fix this without just disabling that 
configuration line altogether.

2) Some ‘make’ rules now require git to be installed so that ‘git 
config’ can add ‘etc/git/gitconfig’ to the local 
configuration. So, for instance, ‘guix shell --pure -D guix -- 
make’ will now fail. Calls to git should be prefixed with a test 
to see if there is a git executable in the path.

-bjc




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

* bug#63261: Recent changes to git config cause errors for non-committers
  2023-05-04 10:47 bug#63261: Recent changes to git config cause errors for non-committers Brian Cully via Bug reports for GNU Guix
@ 2023-05-04 13:38 ` Maxim Cournoyer
  2023-05-04 14:06 ` bug#63261: [PATCH] Makefile.am: Only auto-configure Git when available Maxim Cournoyer
  2023-05-07  3:34 ` bug#63261: Recent changes to git config cause errors for non-committers Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2023-05-04 13:38 UTC (permalink / raw)
  To: Brian Cully; +Cc: 63261

Hi!

Thanks for the feedback.

Brian Cully <bjc@spork.org> writes:

> I've run into two issues with the recent changes to git config
> integration:
>
> 1) All commits must now be signed, even if you're not a
> committer. This breaks just tons of things, including rebasing. I'm
> not sure how to fix this without just disabling that configuration
> line altogether.

Could you elaborate on 'tons of things' ? :-)  And why does it break
rebasing?  I rebase my branches often while signing the commits, so I'll
need more details to understand the issue.

The idea was to distribute the basic configuration that makes
collaborating on Guix easier, by auto-configuring things that previously
were left to do manually.  By having non-committers also follow the
committers' flow, it also prepares them to become committers, if they
wish :-).

> 2) Some ‘make’ rules now require git to be installed so that ‘git
> config’ can add ‘etc/git/gitconfig’ to the local configuration. So,
> for instance, ‘guix shell --pure -D guix -- make’ will now fail. Calls
> to git should be prefixed with a test to see if there is a git
> executable in the path.

This one is a clear problem, for example causing issues to build a
release tarball of Guix where git shouldn't be a requirement.  It should
be easy to fix with a test as you suggest.

-- 
Thanks,
Maxim




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

* bug#63261: [PATCH] Makefile.am: Only auto-configure Git when available.
  2023-05-04 10:47 bug#63261: Recent changes to git config cause errors for non-committers Brian Cully via Bug reports for GNU Guix
  2023-05-04 13:38 ` Maxim Cournoyer
@ 2023-05-04 14:06 ` Maxim Cournoyer
  2023-05-07  3:34 ` bug#63261: Recent changes to git config cause errors for non-committers Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2023-05-04 14:06 UTC (permalink / raw)
  To: 63261; +Cc: Maxim Cournoyer, bjc

* Makefile.am (.git/hooks/pre-push): Only run recipe if the '.git' directory
exists.  Make it silent.
(.git/config): Likewise, and also check if the 'git' command is available.

Reported-by: Brian Cully <bjc@spork.org>
---
 Makefile.am | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4a9124e0c2..8af69f88ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1115,10 +1115,14 @@ cuirass-jobs: $(GOBJECTS)
 
 # Git auto-configuration.
 .git/hooks/pre-push: etc/git/pre-push
-	cp etc/git/pre-push .git/hooks/pre-push
+	$(AM_V_at)if test -d .git; then \
+	cp etc/git/pre-push .git/hooks/pre-push; \
+	fi
 
 .git/config: etc/git/gitconfig
-	git config include.path ../etc/git/gitconfig
+	$(AM_V_at)if command -v git >/dev/null && test -d .git; then \
+	git config include.path ../etc/git/gitconfig; \
+	fi
 
 nodist_noinst_DATA = .git/hooks/pre-push .git/config
 

base-commit: ae6643326a983d141fd8320a755181d21e5a1f2f
-- 
2.39.2





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

* bug#63261: Recent changes to git config cause errors for non-committers
  2023-05-04 10:47 bug#63261: Recent changes to git config cause errors for non-committers Brian Cully via Bug reports for GNU Guix
  2023-05-04 13:38 ` Maxim Cournoyer
  2023-05-04 14:06 ` bug#63261: [PATCH] Makefile.am: Only auto-configure Git when available Maxim Cournoyer
@ 2023-05-07  3:34 ` Maxim Cournoyer
  2023-05-13 19:03   ` Leo Famulari
  2 siblings, 1 reply; 6+ messages in thread
From: Maxim Cournoyer @ 2023-05-07  3:34 UTC (permalink / raw)
  To: Brian Cully via Bug reports for GNU Guix; +Cc: 63261-done, Brian Cully

Hi,

Brian Cully via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

> I've run into two issues with the recent changes to git config
> integration:
>
> 1) All commits must now be signed, even if you're not a
> committer. This breaks just tons of things, including rebasing. I'm
> not sure how to fix this without just disabling that configuration
> line altogether.
>
> 2) Some ‘make’ rules now require git to be installed so that ‘git
> config’ can add ‘etc/git/gitconfig’ to the local configuration. So,
> for instance, ‘guix shell --pure -D guix -- make’ will now fail. Calls
> to git should be prefixed with a test to see if there is a git
> executable in the path.

2. has been fixed (also by Ludovic, ah!).  I'm not sure a good solution
can be found for 1. but it seems reasonable to me that contributors
working on Guix learn to sign their commits with GnuPG; that way they
are on the right path to become a Guix committer, already getting up to
speed with the required practices.

Closing, but we can continue discussing it.

-- 
Thanks,
Maxim




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

* bug#63261: Recent changes to git config cause errors for non-committers
  2023-05-07  3:34 ` bug#63261: Recent changes to git config cause errors for non-committers Maxim Cournoyer
@ 2023-05-13 19:03   ` Leo Famulari
  2023-05-15 13:38     ` Maxim Cournoyer
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2023-05-13 19:03 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 63261, 63261-done, Brian Cully

Can someone help me by pointing to the original discussion of this
change?




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

* bug#63261: Recent changes to git config cause errors for non-committers
  2023-05-13 19:03   ` Leo Famulari
@ 2023-05-15 13:38     ` Maxim Cournoyer
  0 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2023-05-15 13:38 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 63261, 63261-done, Brian Cully

Hi Leo,

Leo Famulari <leo@famulari.name> writes:

> Can someone help me by pointing to the original discussion of this
> change?

It was the team.scm issue in https://issues.guix.gnu.org/58813 that led
to this change.

-- 
Thanks,
Maxim




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

end of thread, other threads:[~2023-05-15 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 10:47 bug#63261: Recent changes to git config cause errors for non-committers Brian Cully via Bug reports for GNU Guix
2023-05-04 13:38 ` Maxim Cournoyer
2023-05-04 14:06 ` bug#63261: [PATCH] Makefile.am: Only auto-configure Git when available Maxim Cournoyer
2023-05-07  3:34 ` bug#63261: Recent changes to git config cause errors for non-committers Maxim Cournoyer
2023-05-13 19:03   ` Leo Famulari
2023-05-15 13:38     ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).