{"thread":{"id":"38820","subject":"Bug in git-verify-pack or in its documentation?","startedAt":"2015-03-16T08:05:58Z","lastAt":"2015-03-19T17:59:32Z","messageCount":5,"participants":["Mike Hommey","Duy Nguyen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"257773","messageId":"20150316080558.GA30234@glandium.org","threadId":"38820","inReplyTo":null,"subject":"Bug in git-verify-pack or in its documentation?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-03-16T08:05:58Z","receivedAt":"2015-03-16T08:05:58Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"Hi,\n\ngit-verify-pack's man page says the following about --stat-only:\n\n   Do not verify the pack contents; only show the histogram of delta\n   chain length. With --verbose, list of objects is also shown.\n\nHowever, there is no difference of output between --verbose and\n--verbose --stat-only (and in fact, looking at the code, only one of\nthem has an effect, --stat-only having precedence).\n\nThe text above also implies that this should only display the stats\nwithout doing any sha1 validation, but afaict from a quick glance at\nthe index-pack code, they are always performed.\n\nIs it an implementation problem or a documentation problem?\n\nCheers,\n\nMike\n"},{"id":"257778","messageId":"CACsJy8AXvYCje0-smbNdfGtjsdYieKyxxiHCGf32Jpi3seDrvA@mail.gmail.com","threadId":"38820","inReplyTo":"20150316080558.GA30234@glandium.org","subject":"Re: Bug in git-verify-pack or in its documentation?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-03-16T10:13:25Z","receivedAt":"2015-03-16T10:13:25Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:\n> Hi,\n>\n> git-verify-pack's man page says the following about --stat-only:\n>\n>    Do not verify the pack contents; only show the histogram of delta\n>    chain length. With --verbose, list of objects is also shown.\n>\n> However, there is no difference of output between --verbose and\n> --verbose --stat-only (and in fact, looking at the code, only one of\n> them has an effect, --stat-only having precedence).\n\nThere is. very-pack --verbose would show a lot of \"<sha-1> <type>\n<\"random\" numbers>\" lines before the histogram while --stat-only (with\nor without --verbose) would only show the histogram.\n\n> The text above also implies that this should only display the stats\n> without doing any sha1 validation, but afaict from a quick glance at\n> the index-pack code, they are always performed.\n>\n> Is it an implementation problem or a documentation problem?\n\nI think code and document start to divert from 3de89c9 (verify-pack:\nuse index-pack --verify - 2011-06-03). The conversion to using\nindex-pack implies heavier verification anyway (all objects must be\nhashed, no way around it), so I'd say it's documentation problem. The\nother way would be revert some patches in verify-pack.c and add more\nmaintenance burden for this command.\n-- \nDuy\n"},{"id":"257780","messageId":"20150316131808.GA19353@glandium.org","threadId":"38820","inReplyTo":"CACsJy8AXvYCje0-smbNdfGtjsdYieKyxxiHCGf32Jpi3seDrvA@mail.gmail.com","subject":"Re: Bug in git-verify-pack or in its documentation?","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2015-03-16T13:18:08Z","receivedAt":"2015-03-16T13:18:08Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:\n> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:\n> > Hi,\n> >\n> > git-verify-pack's man page says the following about --stat-only:\n> >\n> >    Do not verify the pack contents; only show the histogram of delta\n> >    chain length. With --verbose, list of objects is also shown.\n> >\n> > However, there is no difference of output between --verbose and\n> > --verbose --stat-only (and in fact, looking at the code, only one of\n> > them has an effect, --stat-only having precedence).\n> \n> There is. very-pack --verbose would show a lot of \"<sha-1> <type>\n> <\"random\" numbers>\" lines before the histogram while --stat-only (with\n> or without --verbose) would only show the histogram.\n\nErr, I meant between --stat-only and --verbose --stat-only.\n\nMike\n"},{"id":"257948","messageId":"CACsJy8B=S9ajzj9N-JoCou6_FVj9VgCHEkZ2AiQ=zR=aCLKXuw@mail.gmail.com","threadId":"38820","inReplyTo":"20150316131808.GA19353@glandium.org","subject":"Re: Bug in git-verify-pack or in its documentation?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-03-18T12:31:19Z","receivedAt":"2015-03-18T12:31:19Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Mar 16, 2015 at 8:18 PM, Mike Hommey <mh@glandium.org> wrote:\n> On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:\n>> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:\n>> > Hi,\n>> >\n>> > git-verify-pack's man page says the following about --stat-only:\n>> >\n>> >    Do not verify the pack contents; only show the histogram of delta\n>> >    chain length. With --verbose, list of objects is also shown.\n>> >\n>> > However, there is no difference of output between --verbose and\n>> > --verbose --stat-only (and in fact, looking at the code, only one of\n>> > them has an effect, --stat-only having precedence).\n>>\n>> There is. very-pack --verbose would show a lot of \"<sha-1> <type>\n>> <\"random\" numbers>\" lines before the histogram while --stat-only (with\n>> or without --verbose) would only show the histogram.\n>\n> Err, I meant between --stat-only and --verbose --stat-only.\n\nYeah --verbose is always ignored when --stat-only is set. This command is funny.\n-- \nDuy\n"},{"id":"258037","messageId":"xmqq7fuckgvv.fsf@gitster.dls.corp.google.com","threadId":"38820","inReplyTo":"CACsJy8B=S9ajzj9N-JoCou6_FVj9VgCHEkZ2AiQ=zR=aCLKXuw@mail.gmail.com","subject":"Re: Bug in git-verify-pack or in its documentation?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-03-19T17:59:32Z","receivedAt":"2015-03-19T17:59:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> On Mon, Mar 16, 2015 at 8:18 PM, Mike Hommey <mh@glandium.org> wrote:\n>> On Mon, Mar 16, 2015 at 05:13:25PM +0700, Duy Nguyen wrote:\n>>> On Mon, Mar 16, 2015 at 3:05 PM, Mike Hommey <mh@glandium.org> wrote:\n>>> > Hi,\n>>> >\n>>> > git-verify-pack's man page says the following about --stat-only:\n>>> >\n>>> >    Do not verify the pack contents; only show the histogram of delta\n>>> >    chain length. With --verbose, list of objects is also shown.\n>>> >\n>>> > However, there is no difference of output between --verbose and\n>>> > --verbose --stat-only (and in fact, looking at the code, only one of\n>>> > them has an effect, --stat-only having precedence).\n>>>\n>>> There is. very-pack --verbose would show a lot of \"<sha-1> <type>\n>>> <\"random\" numbers>\" lines before the histogram while --stat-only (with\n>>> or without --verbose) would only show the histogram.\n>>\n>> Err, I meant between --stat-only and --verbose --stat-only.\n>\n> Yeah --verbose is always ignored when --stat-only is set. This command is funny.\n\nI would disagree.  \"--verbose\" is \"do whatever you are told to do\nbut you can enhance the result by giving more verbose output\".\n\nTo understand what I mean, compare \"git verify-pack\" (no other\noptions) and \"git verify-pack --verbose\".\n\nNow, when you are asking the command to show the statistics only and\nnothing else, there may be nothing useful that you can output to\nenhance the \"stat-only\" output.  \"git verify-pack --stat-only\" (no\nother options) and \"git verify-pack --stat-only --verbose\" can\nproduce exactly the same result in such a case.\n\nSo I do not see anything funny there.\n"}]}