All of lore.kernel.org
 help / color / mirror / Atom feed
* man git-config inconsistency (*.fsckObjects)
@ 2016-02-08 14:41 Markus Kuhn
  2016-02-08 15:08 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Kuhn @ 2016-02-08 14:41 UTC (permalink / raw)
  To: git

https://www.kernel.org/pub/software/scm/git/docs/git-config.html

The git-config(1) man page entries for "fetch.fsckObjects" and
"receive.fsckObjects" both end with the lines

            Defaults to false. If not set, the value of transfer.fsckObjects is
            used instead.

These two sentences contradict each other: if the variable is not set,
the first sentence says it is interpreted as false, the second sentence
says the value of transfer.fsckObjects is used instead.

Both sentences can't be true at the same time when transfer.fsckObjects = true.

Suggested rephrasing:

            If not set, the value of transfer.fsckObjects is used
            instead, which defaults to false.

Markus

-- 
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain


 From f6253cce1a0f9df53b020c5821e9fc9fa27cd23f Mon Sep 17 00:00:00 2001
From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Date: Mon, 8 Feb 2016 14:36:22 +0000
Subject: [PATCH] avoid self-contradiction on fsckObjects default

---
  Documentation/config.txt | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 02bcde6..85832ba 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1157,8 +1157,8 @@ fetch.fsckObjects::
  	If it is set to true, git-fetch-pack will check all fetched
  	objects. It will abort in the case of a malformed object or a
  	broken link. The result of an abort are only dangling objects.
-	Defaults to false. If not set, the value of `transfer.fsckObjects`
-	is used instead.
+	If not set, the value of `transfer.fsckObjects` is used
+	instead, which defaults to false.
  
  fetch.unpackLimit::
  	If the number of objects fetched over the Git native
@@ -2348,8 +2348,8 @@ receive.fsckObjects::
  	If it is set to true, git-receive-pack will check all received
  	objects. It will abort in the case of a malformed object or a
  	broken link. The result of an abort are only dangling objects.
-	Defaults to false. If not set, the value of `transfer.fsckObjects`
-	is used instead.
+	If not set, the value of `transfer.fsckObjects` is used
+	instead, which defaults to false.
  
  receive.fsck.<msg-id>::
  	When `receive.fsckObjects` is set to true, errors can be switched
-- 
1.9.1

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

* Re: man git-config inconsistency (*.fsckObjects)
  2016-02-08 14:41 man git-config inconsistency (*.fsckObjects) Markus Kuhn
@ 2016-02-08 15:08 ` Jeff King
  2016-02-08 18:00   ` Eric Sunshine
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2016-02-08 15:08 UTC (permalink / raw)
  To: Markus Kuhn; +Cc: git

On Mon, Feb 08, 2016 at 02:41:44PM +0000, Markus Kuhn wrote:

> https://www.kernel.org/pub/software/scm/git/docs/git-config.html
> 
> The git-config(1) man page entries for "fetch.fsckObjects" and
> "receive.fsckObjects" both end with the lines
> 
>            Defaults to false. If not set, the value of transfer.fsckObjects is
>            used instead.
> 
> These two sentences contradict each other: if the variable is not set,
> the first sentence says it is interpreted as false, the second sentence
> says the value of transfer.fsckObjects is used instead.
> 
> Both sentences can't be true at the same time when transfer.fsckObjects = true.
> 
> Suggested rephrasing:
> 
>            If not set, the value of transfer.fsckObjects is used
>            instead, which defaults to false.

Yeah, I agree your phrasing is much clearer.

> From f6253cce1a0f9df53b020c5821e9fc9fa27cd23f Mon Sep 17 00:00:00 2001
> From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
> Date: Mon, 8 Feb 2016 14:36:22 +0000
> Subject: [PATCH] avoid self-contradiction on fsckObjects default
> 
> ---
>  Documentation/config.txt | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

I think the text in your email would make a good commit message. :)

-Peff

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

* Re: man git-config inconsistency (*.fsckObjects)
  2016-02-08 15:08 ` Jeff King
@ 2016-02-08 18:00   ` Eric Sunshine
  2016-02-08 18:41     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sunshine @ 2016-02-08 18:00 UTC (permalink / raw)
  To: Jeff King; +Cc: Markus Kuhn, Git List

On Mon, Feb 8, 2016 at 10:08 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Feb 08, 2016 at 02:41:44PM +0000, Markus Kuhn wrote:
>> Suggested rephrasing:
>>
>>            If not set, the value of transfer.fsckObjects is used
>>            instead, which defaults to false.
>
> Yeah, I agree your phrasing is much clearer.

Should we worry about this becoming outdated if the default of
transfer.fsckObjects ever changes, or is that being overcautious? If
it is a legitimate concern, then perhaps drop "which defaults to
false" from the end of the sentence.

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

* Re: man git-config inconsistency (*.fsckObjects)
  2016-02-08 18:00   ` Eric Sunshine
@ 2016-02-08 18:41     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2016-02-08 18:41 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Markus Kuhn, Git List

On Mon, Feb 08, 2016 at 01:00:50PM -0500, Eric Sunshine wrote:

> On Mon, Feb 8, 2016 at 10:08 AM, Jeff King <peff@peff.net> wrote:
> > On Mon, Feb 08, 2016 at 02:41:44PM +0000, Markus Kuhn wrote:
> >> Suggested rephrasing:
> >>
> >>            If not set, the value of transfer.fsckObjects is used
> >>            instead, which defaults to false.
> >
> > Yeah, I agree your phrasing is much clearer.
> 
> Should we worry about this becoming outdated if the default of
> transfer.fsckObjects ever changes, or is that being overcautious? If
> it is a legitimate concern, then perhaps drop "which defaults to
> false" from the end of the sentence.

I agree that is a potential maintenance pitfall, but I think it is
outweighed by the benefit: namely that the information the user wants is
right there, without them having to cross-reference themselves.

Flipping the default for transfer.fsckObjects would hopefully cause us
to examine matching fetch.*, and we would notice this during review.

-Peff

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

end of thread, other threads:[~2016-02-08 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 14:41 man git-config inconsistency (*.fsckObjects) Markus Kuhn
2016-02-08 15:08 ` Jeff King
2016-02-08 18:00   ` Eric Sunshine
2016-02-08 18:41     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.