* [PATCH] Allow default core.logallrefupdates to be overridden with template's config
@ 2007-01-23 15:54 Alex Riesen
2007-01-23 16:32 ` Linus Torvalds
2007-01-24 1:34 ` Junio C Hamano
0 siblings, 2 replies; 8+ messages in thread
From: Alex Riesen @ 2007-01-23 15:54 UTC (permalink / raw)
To: Git Mailing List; +Cc: Junio C Hamano, Johannes Schindelin
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Never found a use for the reflogs and tried to switch
them off. Didn't work - init-db rewrote it.
builtin-init-db.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
[-- Attachment #2: 0001-Allow-default-core.logallrefupdates-to-be-overridden-with-template-s-config.txt --]
[-- Type: text/plain, Size: 906 bytes --]
From 713c4890ce795c840f5b4468db8689de44572ef8 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Tue, 23 Jan 2007 16:51:18 +0100
Subject: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
builtin-init-db.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 8e7540b..1865489 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -257,7 +257,9 @@ static int create_default_files(const char *git_dir, const char *template_path)
}
else {
git_config_set("core.bare", "false");
- git_config_set("core.logallrefupdates", "true");
+ /* allow template config file to override the default */
+ if (log_all_ref_updates == -1)
+ git_config_set("core.logallrefupdates", "true");
}
return reinit;
}
--
1.5.0.rc2.g83d3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-23 15:54 [PATCH] Allow default core.logallrefupdates to be overridden with template's config Alex Riesen
@ 2007-01-23 16:32 ` Linus Torvalds
2007-01-23 17:58 ` Uwe Kleine-König
2007-01-23 22:06 ` Alex Riesen
2007-01-24 1:34 ` Junio C Hamano
1 sibling, 2 replies; 8+ messages in thread
From: Linus Torvalds @ 2007-01-23 16:32 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List, Junio C Hamano, Johannes Schindelin
Alex,
just out of curiosity, what _is_ your curious text-attachment thing:
1 Shown 8 lines Text (charset: UTF-8)
2 OK ~928 bytes Text (charset: ANSI_X3.4-1968)
where your normal text is UTF-8, but then attachments are in some really
strange encoding name (why not just call it iso-8859-15? Don't ask me..)
Anyway. Strange.
Linus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-23 16:32 ` Linus Torvalds
@ 2007-01-23 17:58 ` Uwe Kleine-König
2007-01-23 22:06 ` Alex Riesen
1 sibling, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2007-01-23 17:58 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Alex Riesen, Git Mailing List
Hi Linus,
Linus Torvalds wrote:
> just out of curiosity, what _is_ your curious text-attachment thing:
>
> 1 Shown 8 lines Text (charset: UTF-8)
> 2 OK ~928 bytes Text (charset: ANSI_X3.4-1968)
ANSI_X3.4-1968 is just the offical name for us-ascii.
zeisberg@cepheus:~$ LANG=C locale charmap
ANSI_X3.4-1968
I'm not sure that this was making you curious.
Another strange thing is, that Alex' MUA choosed
"Content-Transfer-Encoding: 7bit" for the first part although UTF-8 is
an 8bit charset.
Best regards
Uwe
--
Uwe Kleine-König
http://www.google.com/search?q=the+speed+of+light+in+m%2Fs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-23 16:32 ` Linus Torvalds
2007-01-23 17:58 ` Uwe Kleine-König
@ 2007-01-23 22:06 ` Alex Riesen
1 sibling, 0 replies; 8+ messages in thread
From: Alex Riesen @ 2007-01-23 22:06 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List, Junio C Hamano, Johannes Schindelin
On 1/23/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> just out of curiosity, what _is_ your curious text-attachment thing:
>
> 1 Shown 8 lines Text (charset: UTF-8)
> 2 OK ~928 bytes Text (charset: ANSI_X3.4-1968)
>
> where your normal text is UTF-8, but then attachments are in some really
> strange encoding name (why not just call it iso-8859-15? Don't ask me..)
>
> Anyway. Strange.
That's Google Mail. The Webmailer. Have no other means to send mail at
that time of day.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-23 15:54 [PATCH] Allow default core.logallrefupdates to be overridden with template's config Alex Riesen
2007-01-23 16:32 ` Linus Torvalds
@ 2007-01-24 1:34 ` Junio C Hamano
2007-01-24 1:49 ` Johannes Schindelin
2007-01-24 1:53 ` Junio C Hamano
1 sibling, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2007-01-24 1:34 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
> ---
> builtin-init-db.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/builtin-init-db.c b/builtin-init-db.c
> index 8e7540b..1865489 100644
> --- a/builtin-init-db.c
> +++ b/builtin-init-db.c
> @@ -257,7 +257,9 @@ static int create_default_files(const char *git_dir, const char *template_path)
> }
> else {
> git_config_set("core.bare", "false");
> - git_config_set("core.logallrefupdates", "true");
> + /* allow template config file to override the default */
> + if (log_all_ref_updates == -1)
> + git_config_set("core.logallrefupdates", "true");
> }
> return reinit;
> }
It is sensible to let the user say "I do not want steenking
reflogs" (or "I love reflogs and want one everywhere"). But I
think the above is not really doing that.
We seem to read ~/.gitconfig while running git-init-db, and I do
not think doing so necessarily is a bug. After all, there may
be some configurations you would want to have in ~/.gitconfig to
control the way git-init-db operates (right now I do not think
there is any).
That makes your new check depend on what is in ~/.gitconfig when
core.logallrefupdates is not set (either true or false) in the
template config.
Forgetting the case of having the variable in ~/.gitconfig, what
does it mean to have core.logallrefupdates set in a template
config? Setting it to true is obvious -- "I want reflogs
everywhere", and I think it happens with or without your patch,
because create_default_files() copies the template.
However, when set to false, your check says "Do not set it
per-repo". This tells git to follow the default "use reflog in
non-bare repositories" and it does not mean "I do not want
steenking reflogs anywhere". So I think at least you would need
to check for (log_all_ref_updates == 0) and set it explicitly to
"false".
While on the topic of config files, we should fix the config
reader not to allow per-repository variables in ~/.gitconfig
(issuing warning and ignoring, or erroring out), as some
variables such as core.sharedrepository are inherently per
repository. core.repositoryformatversion has the same issue,
but we do set it per repository explicitly with init-db, which
makes sure that whatever value in ~/.gitconfig is ignored.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-24 1:34 ` Junio C Hamano
@ 2007-01-24 1:49 ` Johannes Schindelin
2007-01-24 1:51 ` Junio C Hamano
2007-01-24 1:53 ` Junio C Hamano
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2007-01-24 1:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Tue, 23 Jan 2007, Junio C Hamano wrote:
> While on the topic of config files, we should fix the config
> reader not to allow per-repository variables in ~/.gitconfig
So we finally get this central place where all possible config variables
are listed, with options (a la struct cmd_struct) which tell more about
where they may be used?
While I think this might make sense, I feel quite uneasy about such a
drastic change between -rc2 and -final.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-24 1:49 ` Johannes Schindelin
@ 2007-01-24 1:51 ` Junio C Hamano
0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2007-01-24 1:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> While on the topic of config files, we should fix the config
>> reader not to allow per-repository variables in ~/.gitconfig
>
> So we finally get this central place where all possible config variables
> are listed, with options (a la struct cmd_struct) which tell more about
> where they may be used?
>
> While I think this might make sense, I feel quite uneasy about such a
> drastic change between -rc2 and -final.
I do not like the "config registry" in 1.5.0 but a simple
blacklisting should work, shouldn't it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Allow default core.logallrefupdates to be overridden with template's config
2007-01-24 1:34 ` Junio C Hamano
2007-01-24 1:49 ` Johannes Schindelin
@ 2007-01-24 1:53 ` Junio C Hamano
1 sibling, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2007-01-24 1:53 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
Junio C Hamano <junkio@cox.net> writes:
> However, when set to false, your check says "Do not set it
> per-repo". This tells git to follow the default "use reflog in
> non-bare repositories" and it does not mean "I do not want
> steenking reflogs anywhere".
This part is not true -- as we copy the templated config which
has explicit "no steenking reflog" to the new repository.
So I am Ok with your patch.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-01-24 1:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 15:54 [PATCH] Allow default core.logallrefupdates to be overridden with template's config Alex Riesen
2007-01-23 16:32 ` Linus Torvalds
2007-01-23 17:58 ` Uwe Kleine-König
2007-01-23 22:06 ` Alex Riesen
2007-01-24 1:34 ` Junio C Hamano
2007-01-24 1:49 ` Johannes Schindelin
2007-01-24 1:51 ` Junio C Hamano
2007-01-24 1:53 ` Junio C Hamano
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 NNTP newsgroup(s).