Recent changes to git config cause errors for non-committers

  • Done
  • quality assurance status badge
Details
3 participants
  • Brian Cully
  • Leo Famulari
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Brian Cully
Severity
normal
B
B
Brian Cully wrote on 4 May 2023 12:47
(address . bug-guix@gnu.org)(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
874jospdr2.fsf@psyduck.jhoto.kublai.com
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
M
M
Maxim Cournoyer wrote on 4 May 2023 15:38
(name . Brian Cully)(address . bjc@spork.org)(address . 63261@debbugs.gnu.org)
87lei45i9j.fsf@gmail.com
Hi!

Thanks for the feedback.

Brian Cully <bjc@spork.org> writes:

Toggle quote (8 lines)
> 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 :-).

Toggle quote (6 lines)
> 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
M
M
Maxim Cournoyer wrote on 4 May 2023 16:06
[PATCH] Makefile.am: Only auto-configure Git when available.
(address . 63261@debbugs.gnu.org)
eddcf3028b5030804f2e76e970e3912073335161.1683209161.git.maxim.cournoyer@gmail.com
* 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(-)

Toggle diff (25 lines)
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
M
M
Maxim Cournoyer wrote on 7 May 2023 05:34
Re: bug#63261: Recent changes to git config cause errors for non-committers
(name . Brian Cully via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87y1m024rx.fsf@gmail.com
Hi,

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

Toggle quote (14 lines)
> 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
L
L
Leo Famulari wrote on 13 May 2023 21:03
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
ZF/fCxinkPg9lJNc@jasmine.lan
Can someone help me by pointing to the original discussion of this
change?
M
M
Maxim Cournoyer wrote on 15 May 2023 15:38
(name . Leo Famulari)(address . leo@famulari.name)
875y8tww86.fsf@gmail.com
Hi Leo,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (3 lines)
> 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/58813that led
to this change.

--
Thanks,
Maxim
?