All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug in git-verify-pack or in its documentation?
@ 2015-03-16  8:05 Mike Hommey
  2015-03-16 10:13 ` Duy Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Hommey @ 2015-03-16  8:05 UTC (permalink / raw)
  To: git

Hi,

git-verify-pack's man page says the following about --stat-only:

   Do not verify the pack contents; only show the histogram of delta
   chain length. With --verbose, list of objects is also shown.

However, there is no difference of output between --verbose and
--verbose --stat-only (and in fact, looking at the code, only one of
them has an effect, --stat-only having precedence).

The text above also implies that this should only display the stats
without doing any sha1 validation, but afaict from a quick glance at
the index-pack code, they are always performed.

Is it an implementation problem or a documentation problem?

Cheers,

Mike

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

* Re: Bug in git-verify-pack or in its documentation?
  2015-03-16  8:05 Bug in git-verify-pack or in its documentation? Mike Hommey
@ 2015-03-16 10:13 ` Duy Nguyen
  2015-03-16 13:18   ` Mike Hommey
  0 siblings, 1 reply; 5+ messages in thread
From: Duy Nguyen @ 2015-03-16 10:13 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Git Mailing List

On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:
> Hi,
>
> git-verify-pack's man page says the following about --stat-only:
>
>    Do not verify the pack contents; only show the histogram of delta
>    chain length. With --verbose, list of objects is also shown.
>
> However, there is no difference of output between --verbose and
> --verbose --stat-only (and in fact, looking at the code, only one of
> them has an effect, --stat-only having precedence).

There is. very-pack --verbose would show a lot of "<sha-1> <type>
<"random" numbers>" lines before the histogram while --stat-only (with
or without --verbose) would only show the histogram.

> The text above also implies that this should only display the stats
> without doing any sha1 validation, but afaict from a quick glance at
> the index-pack code, they are always performed.
>
> Is it an implementation problem or a documentation problem?

I think code and document start to divert from 3de89c9 (verify-pack:
use index-pack --verify - 2011-06-03). The conversion to using
index-pack implies heavier verification anyway (all objects must be
hashed, no way around it), so I'd say it's documentation problem. The
other way would be revert some patches in verify-pack.c and add more
maintenance burden for this command.
-- 
Duy

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

* Re: Bug in git-verify-pack or in its documentation?
  2015-03-16 10:13 ` Duy Nguyen
@ 2015-03-16 13:18   ` Mike Hommey
  2015-03-18 12:31     ` Duy Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Hommey @ 2015-03-16 13:18 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Git Mailing List

On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:
> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:
> > Hi,
> >
> > git-verify-pack's man page says the following about --stat-only:
> >
> >    Do not verify the pack contents; only show the histogram of delta
> >    chain length. With --verbose, list of objects is also shown.
> >
> > However, there is no difference of output between --verbose and
> > --verbose --stat-only (and in fact, looking at the code, only one of
> > them has an effect, --stat-only having precedence).
> 
> There is. very-pack --verbose would show a lot of "<sha-1> <type>
> <"random" numbers>" lines before the histogram while --stat-only (with
> or without --verbose) would only show the histogram.

Err, I meant between --stat-only and --verbose --stat-only.

Mike

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

* Re: Bug in git-verify-pack or in its documentation?
  2015-03-16 13:18   ` Mike Hommey
@ 2015-03-18 12:31     ` Duy Nguyen
  2015-03-19 17:59       ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Duy Nguyen @ 2015-03-18 12:31 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Git Mailing List

On Mon, Mar 16, 2015 at 8:18 PM, Mike Hommey <mh@glandium.org> wrote:
> On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:
>> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:
>> > Hi,
>> >
>> > git-verify-pack's man page says the following about --stat-only:
>> >
>> >    Do not verify the pack contents; only show the histogram of delta
>> >    chain length. With --verbose, list of objects is also shown.
>> >
>> > However, there is no difference of output between --verbose and
>> > --verbose --stat-only (and in fact, looking at the code, only one of
>> > them has an effect, --stat-only having precedence).
>>
>> There is. very-pack --verbose would show a lot of "<sha-1> <type>
>> <"random" numbers>" lines before the histogram while --stat-only (with
>> or without --verbose) would only show the histogram.
>
> Err, I meant between --stat-only and --verbose --stat-only.

Yeah --verbose is always ignored when --stat-only is set. This command is funny.
-- 
Duy

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

* Re: Bug in git-verify-pack or in its documentation?
  2015-03-18 12:31     ` Duy Nguyen
@ 2015-03-19 17:59       ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2015-03-19 17:59 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Mike Hommey, Git Mailing List

Duy Nguyen <pclouds@gmail.com> writes:

> On Mon, Mar 16, 2015 at 8:18 PM, Mike Hommey <mh@glandium.org> wrote:
>> On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:
>>> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:
>>> > Hi,
>>> >
>>> > git-verify-pack's man page says the following about --stat-only:
>>> >
>>> >    Do not verify the pack contents; only show the histogram of delta
>>> >    chain length. With --verbose, list of objects is also shown.
>>> >
>>> > However, there is no difference of output between --verbose and
>>> > --verbose --stat-only (and in fact, looking at the code, only one of
>>> > them has an effect, --stat-only having precedence).
>>>
>>> There is. very-pack --verbose would show a lot of "<sha-1> <type>
>>> <"random" numbers>" lines before the histogram while --stat-only (with
>>> or without --verbose) would only show the histogram.
>>
>> Err, I meant between --stat-only and --verbose --stat-only.
>
> Yeah --verbose is always ignored when --stat-only is set. This command is funny.

I would disagree.  "--verbose" is "do whatever you are told to do
but you can enhance the result by giving more verbose output".

To understand what I mean, compare "git verify-pack" (no other
options) and "git verify-pack --verbose".

Now, when you are asking the command to show the statistics only and
nothing else, there may be nothing useful that you can output to
enhance the "stat-only" output.  "git verify-pack --stat-only" (no
other options) and "git verify-pack --stat-only --verbose" can
produce exactly the same result in such a case.

So I do not see anything funny there.

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

end of thread, other threads:[~2015-03-19 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16  8:05 Bug in git-verify-pack or in its documentation? Mike Hommey
2015-03-16 10:13 ` Duy Nguyen
2015-03-16 13:18   ` Mike Hommey
2015-03-18 12:31     ` Duy Nguyen
2015-03-19 17:59       ` Junio C Hamano

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.