{"thread":{"id":"12645","subject":"I: git-fetch: -n option disappeared but git-fetch(1) still describe it","startedAt":"2008-03-12T10:51:02Z","lastAt":"2008-03-13T07:30:36Z","messageCount":8,"participants":["Dmitry V. Levin","Andreas Ericsson","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71800","messageId":"20080312105102.GE14040@wo.int.altlinux.org","threadId":"12645","inReplyTo":null,"subject":"I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2008-03-12T10:51:02Z","receivedAt":"2008-03-12T10:51:02Z","isPatch":false,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"Hi,\n\ngit-fetch builtinification (commit v1.5.3.2-93-gb888d61) apparently\ndropped -n option (alias to --no-tags) documented in\nDocumentation/fetch-options.txt\n\nEither builtin-fetch.c or Documentation/fetch-options.txt should be\nadjusted to sync the code with its docs.\n\nOriginal bug report:\nhttps://bugzilla.altlinux.org/show_bug.cgi?id=14870\n\n\n-- \nldv\n"},{"id":"71808","messageId":"47D7EE27.50407@op5.se","threadId":"12645","inReplyTo":"20080312105102.GE14040@wo.int.altlinux.org","subject":"Re: I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-03-12T14:52:23Z","receivedAt":"2008-03-12T14:52:23Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Dmitry V. Levin wrote:\n> Hi,\n> \n> git-fetch builtinification (commit v1.5.3.2-93-gb888d61) apparently\n> dropped -n option (alias to --no-tags) documented in\n> Documentation/fetch-options.txt\n> \n> Either builtin-fetch.c or Documentation/fetch-options.txt should be\n> adjusted to sync the code with its docs.\n> \n> Original bug report:\n> https://bugzilla.altlinux.org/show_bug.cgi?id=14870\n> \n\nI have a (very) vague memory that git-fetch.sh had to iterate over\ntags one by one, making tag-heavy projects excruciatingly slow to\nfetch from with the shellscript version. Some pathological case\nwith 2700 tags was presented where a fetch took nearly an hour,\niirc. AFAIR, the builtinification (or was it a protocol extension?)\nreduced that time to something around 10 seconds for the pathological\ncase.\n\nDoes anyone else have a sharper memory of what caused the -n option\nto be dropped?\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"71817","messageId":"alpine.LSU.1.00.0803121703010.1656@racer.site","threadId":"12645","inReplyTo":"47D7EE27.50407@op5.se","subject":"Re: I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-12T16:04:12Z","receivedAt":"2008-03-12T16:04:12Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 12 Mar 2008, Andreas Ericsson wrote:\n\n> Dmitry V. Levin wrote:\n> \n> > git-fetch builtinification (commit v1.5.3.2-93-gb888d61) apparently \n> > dropped -n option (alias to --no-tags) documented in \n> > Documentation/fetch-options.txt\n> > \n> > Either builtin-fetch.c or Documentation/fetch-options.txt should be \n> > adjusted to sync the code with its docs.\n> > \n> > Original bug report: \n> > https://bugzilla.altlinux.org/show_bug.cgi?id=14870\n> \n> I have a (very) vague memory that git-fetch.sh had to iterate over tags \n> one by one, making tag-heavy projects excruciatingly slow to fetch from \n> with the shellscript version. Some pathological case with 2700 tags was \n> presented where a fetch took nearly an hour, iirc. AFAIR, the \n> builtinification (or was it a protocol extension?) reduced that time to \n> something around 10 seconds for the pathological case.\n\nAFAIR this was helped by the fetch--tool helper, even at the time of \nnon-builtin fetch.\n\n> Does anyone else have a sharper memory of what caused the -n option to \n> be dropped?\n\nAFAICT this was done because of the parsopt'ification.  But I forgot the \ndetails.\n\nHth,\nDscho\n"},{"id":"71819","messageId":"47D7FF8E.5040700@op5.se","threadId":"12645","inReplyTo":"alpine.LSU.1.00.0803121703010.1656@racer.site","subject":"Re: I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-03-12T16:06:38Z","receivedAt":"2008-03-12T16:06:38Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 12 Mar 2008, Andreas Ericsson wrote:\n> \n>> Dmitry V. Levin wrote:\n>>\n>>> git-fetch builtinification (commit v1.5.3.2-93-gb888d61) apparently \n>>> dropped -n option (alias to --no-tags) documented in \n>>> Documentation/fetch-options.txt\n>>>\n>>> Either builtin-fetch.c or Documentation/fetch-options.txt should be \n>>> adjusted to sync the code with its docs.\n>>>\n>>> Original bug report: \n>>> https://bugzilla.altlinux.org/show_bug.cgi?id=14870\n>> I have a (very) vague memory that git-fetch.sh had to iterate over tags \n>> one by one, making tag-heavy projects excruciatingly slow to fetch from \n>> with the shellscript version. Some pathological case with 2700 tags was \n>> presented where a fetch took nearly an hour, iirc. AFAIR, the \n>> builtinification (or was it a protocol extension?) reduced that time to \n>> something around 10 seconds for the pathological case.\n> \n> AFAIR this was helped by the fetch--tool helper, even at the time of \n> non-builtin fetch.\n> \n>> Does anyone else have a sharper memory of what caused the -n option to \n>> be dropped?\n> \n> AFAICT this was done because of the parsopt'ification.  But I forgot the \n> details.\n> \n\nI had a look at the code. It seems the new way of specifying -n is\nto say --no-tags or -t 0, or --tags=0 (although I'm not well-versed\nenough in the parseopt thing to be sure). I have no time now, but I'll\ntake a stab at adding the -n option back tomorrow if nobody beats me\nto it.\n\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"71820","messageId":"alpine.LSU.1.00.0803121710460.1656@racer.site","threadId":"12645","inReplyTo":"47D7FF8E.5040700@op5.se","subject":"Re: I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-12T16:11:24Z","receivedAt":"2008-03-12T16:11:24Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 12 Mar 2008, Andreas Ericsson wrote:\n\n> Johannes Schindelin wrote:\n> \n> > On Wed, 12 Mar 2008, Andreas Ericsson wrote:\n> > \n> > > Dmitry V. Levin wrote:\n> > >\n> > > > git-fetch builtinification (commit v1.5.3.2-93-gb888d61) \n> > > > apparently dropped -n option (alias to --no-tags) documented in \n> > > > Documentation/fetch-options.txt\n> > > >\n> > > > Either builtin-fetch.c or Documentation/fetch-options.txt should \n> > > > be adjusted to sync the code with its docs.\n> > > >\n> > > > Original bug report: \n> > > > https://bugzilla.altlinux.org/show_bug.cgi?id=14870\n> > > I have a (very) vague memory that git-fetch.sh had to iterate over \n> > > tags one by one, making tag-heavy projects excruciatingly slow to \n> > > fetch from with the shellscript version. Some pathological case with \n> > > 2700 tags was presented where a fetch took nearly an hour, iirc. \n> > > AFAIR, the builtinification (or was it a protocol extension?) \n> > > reduced that time to something around 10 seconds for the \n> > > pathological case.\n> > \n> > AFAIR this was helped by the fetch--tool helper, even at the time of \n> > non-builtin fetch.\n> > \n> > > Does anyone else have a sharper memory of what caused the -n option \n> > > to be dropped?\n> > \n> > AFAICT this was done because of the parsopt'ification.  But I forgot \n> > the details.\n> > \n> \n> I had a look at the code. It seems the new way of specifying -n is to \n> say --no-tags or -t 0, or --tags=0 (although I'm not well-versed enough \n> in the parseopt thing to be sure). I have no time now, but I'll take a \n> stab at adding the -n option back tomorrow if nobody beats me to it.\n\nMaybe like this (completely untested, that will be your task tomorrow):\n\n builtin-fetch.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-fetch.c b/builtin-fetch.c\nindex 5196688..c406298 100644\n--- a/builtin-fetch.c\n+++ b/builtin-fetch.c\n@@ -40,6 +40,8 @@ static struct option builtin_fetch_options[] = {\n \t\t    \"force overwrite of local branch\"),\n \tOPT_SET_INT('t', \"tags\", &tags,\n \t\t    \"fetch all tags and associated objects\", TAGS_SET),\n+\tOPT_SET_INT('n', NULL, &tags,\n+\t\t    \"do not fetch all tags (--no-tags)\", TAGS_UNSET),\n \tOPT_BOOLEAN('k', \"keep\", &keep, \"keep downloaded pack\"),\n \tOPT_BOOLEAN('u', \"update-head-ok\", &update_head_ok,\n \t\t    \"allow updating of HEAD ref\"),\n"},{"id":"71896","messageId":"47D8CEA6.5040301@op5.se","threadId":"12645","inReplyTo":"alpine.LSU.1.00.0803121710460.1656@racer.site","subject":"Re: I: git-fetch: -n option disappeared but git-fetch(1) still describe it","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-03-13T06:50:14Z","receivedAt":"2008-03-13T06:50:14Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 12 Mar 2008, Andreas Ericsson wrote:\n> \n>> Johannes Schindelin wrote:\n>>\n>>> On Wed, 12 Mar 2008, Andreas Ericsson wrote:\n>>>\n>>>> Dmitry V. Levin wrote:\n>>>>\n>>>>> git-fetch builtinification (commit v1.5.3.2-93-gb888d61) \n>>>>> apparently dropped -n option (alias to --no-tags) documented in \n>>>>> Documentation/fetch-options.txt\n>>>>>\n>>>>> Either builtin-fetch.c or Documentation/fetch-options.txt should \n>>>>> be adjusted to sync the code with its docs.\n>>>>>\n>>>>> Original bug report: \n>>>>> https://bugzilla.altlinux.org/show_bug.cgi?id=14870\n>>>> I have a (very) vague memory that git-fetch.sh had to iterate over \n>>>> tags one by one, making tag-heavy projects excruciatingly slow to \n>>>> fetch from with the shellscript version. Some pathological case with \n>>>> 2700 tags was presented where a fetch took nearly an hour, iirc. \n>>>> AFAIR, the builtinification (or was it a protocol extension?) \n>>>> reduced that time to something around 10 seconds for the \n>>>> pathological case.\n>>> AFAIR this was helped by the fetch--tool helper, even at the time of \n>>> non-builtin fetch.\n>>>\n>>>> Does anyone else have a sharper memory of what caused the -n option \n>>>> to be dropped?\n>>> AFAICT this was done because of the parsopt'ification.  But I forgot \n>>> the details.\n>>>\n>> I had a look at the code. It seems the new way of specifying -n is to \n>> say --no-tags or -t 0, or --tags=0 (although I'm not well-versed enough \n>> in the parseopt thing to be sure). I have no time now, but I'll take a \n>> stab at adding the -n option back tomorrow if nobody beats me to it.\n> \n> Maybe like this (completely untested, that will be your task tomorrow):\n> \n\nLooks like how I thought it should be. Test passed fine, both real and\nautomated. Proper patch incoming in a minute.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"71897","messageId":"47D8D40B.60409@op5.se","threadId":"12645","inReplyTo":"47D8CEA6.5040301@op5.se","subject":"[PATCH] git fetch: Take '-n' to mean '--no-tags'","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-03-13T07:13:15Z","receivedAt":"2008-03-13T07:13:15Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nPrior to commit 83201998730ac5f0b95ac832f3b727da26ab0129, we\nunderstood '-n' as a short option to mean \"don't fetch tags\nfrom the remote\". This patch reinstates behaviour similar,\nbut not identical to the pre commit 832019987 times.\n\nBack then, -n always overrode --tags, so if both --tags and -n\nwas given on command-line, no tags were fetched regardless of\nargument ordering. Now we use a \"last entry wins\" strategy,\nso '-n --tags' means \"fetch tags\".\nSince it's patently absurd to say both --tags and --no-tags\nthis shouldn't matter in practice.\n\nSpotted-by: Artem Zolochevskiy <azol@altlinux.org>\nReported-by: Dmitry V. Levin <ldv@altlinux.org>\nTested-by: Andreas Ericsson <ae@op5.se>\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\nAndreas Ericsson wrote:\n> Johannes Schindelin wrote:\n>>\n>> Maybe like this (completely untested, that will be your task tomorrow):\n>>\n> \n> Looks like how I thought it should be. Test passed fine, both real and\n> automated. Proper patch incoming in a minute.\n> \n\nAnd here it is.\n\ndiff --git a/builtin-fetch.c b/builtin-fetch.c\nindex 55f611e..b2b9935 100644\n--- a/builtin-fetch.c\n+++ b/builtin-fetch.c\n@@ -40,6 +40,8 @@ static struct option builtin_fetch_options[] = {\n \t\t    \"force overwrite of local branch\"),\n \tOPT_SET_INT('t', \"tags\", &tags,\n \t\t    \"fetch all tags and associated objects\", TAGS_SET),\n+\tOPT_SET_INT('n', NULL, &tags,\n+\t\t    \"do not fetch all tags (--no-tags)\", TAGS_UNSET),\n \tOPT_BOOLEAN('k', \"keep\", &keep, \"keep downloaded pack\"),\n \tOPT_BOOLEAN('u', \"update-head-ok\", &update_head_ok,\n \t\t    \"allow updating of HEAD ref\"),\n-- \n1.5.4.4.532.ga6828.dirty\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"71900","messageId":"7vlk4nytb7.fsf@gitster.siamese.dyndns.org","threadId":"12645","inReplyTo":"47D8D40B.60409@op5.se","subject":"Re: [PATCH] git fetch: Take '-n' to mean '--no-tags'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-13T07:30:36Z","receivedAt":"2008-03-13T07:30:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Very well done.  Thanks.\n"}]}