{"thread":{"id":"25312","subject":"[PATCH] Documentation/git-clone: describe --mirror more verbose","startedAt":"2010-10-01T20:13:03Z","lastAt":"2010-10-05T15:41:34Z","messageCount":18,"participants":["Uwe Kleine-König","Darren Hart","Steven Rostedt","Michael J Gruber","Junio C Hamano","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"152261","messageId":"1285963983-5629-1-git-send-email-u.kleine-koenig@pengutronix.de","threadId":"25312","inReplyTo":null,"subject":"[PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-01T20:13:03Z","receivedAt":"2010-10-01T20:13:03Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n\"mirror\".\n\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n---\n Documentation/git-clone.txt |   11 ++++++++++-\n 1 files changed, 10 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex dc7d3d1..5eedfbd 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n \tconfiguration variables are created.\n \n --mirror::\n-\tSet up a mirror of the remote repository.  This implies `--bare`.\n+\tSet up a mirror of the remote repository.\n+\tUsing\n+\n+\t\tgit remote update origin\n+\n+\t(or `<name>` instead of `origin` if -o is given) in the resulting\n+\trepository overwrites the local branches without asking.\n+\tThis implies `--bare`.\n+\tWithout --mirror (but with --bare) git remote update doesn't touch any\n+\tbranches at all.\n \n --origin <name>::\n -o <name>::\n-- \n1.7.2.3\n"},{"id":"152262","messageId":"AANLkTimN53bcadyzshHNVULkt=kzdfTQrUmZxUd+FKpY@mail.gmail.com","threadId":"25312","inReplyTo":"1285963983-5629-1-git-send-email-u.kleine-koenig@pengutronix.de","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Darren Hart","fromEmail":"darren@dvhart.com","sentAt":"2010-10-01T20:18:00Z","receivedAt":"2010-10-01T20:18:00Z","isPatch":true,"sender":{"key":"darren@dvhart.com","avatar":"https://gravatar.com/avatar/6ccf8d792d0ae1836941850f4f2afe03f64562de4733f2c421bdb34eddf947eb?d=mp&s=160"},"body":"2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> \"mirror\".\n>\n> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n\nAcked-by: Darren 'Some People' Hart <darren@dvhart.com>\n\n> ---\n>  Documentation/git-clone.txt |   11 ++++++++++-\n>  1 files changed, 10 insertions(+), 1 deletions(-)\n>\n> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> index dc7d3d1..5eedfbd 100644\n> --- a/Documentation/git-clone.txt\n> +++ b/Documentation/git-clone.txt\n> @@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n>        configuration variables are created.\n>\n>  --mirror::\n> -       Set up a mirror of the remote repository.  This implies `--bare`.\n> +       Set up a mirror of the remote repository.\n> +       Using\n> +\n> +               git remote update origin\n> +\n> +       (or `<name>` instead of `origin` if -o is given) in the resulting\n> +       repository overwrites the local branches without asking.\n> +       This implies `--bare`.\n> +       Without --mirror (but with --bare) git remote update doesn't touch any\n> +       branches at all.\n>\n>  --origin <name>::\n>  -o <name>::\n> --\n> 1.7.2.3\n>\n>\n\n\n\n-- \nDarren Hart\n"},{"id":"152269","messageId":"1285967766.6750.2.camel@gandalf.stny.rr.com","threadId":"25312","inReplyTo":"AANLkTimN53bcadyzshHNVULkt=kzdfTQrUmZxUd+FKpY@mail.gmail.com","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2010-10-01T21:16:06Z","receivedAt":"2010-10-01T21:16:06Z","isPatch":true,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n> > Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> > \"mirror\".\n> >\n> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n> \n> Acked-by: Darren 'Some People' Hart <darren@dvhart.com>\n\n  Acked-by: Steven Rostedt <rostedt@goodmis.org>\n\n-- Steve\n\n> \n> > ---\n> >  Documentation/git-clone.txt |   11 ++++++++++-\n> >  1 files changed, 10 insertions(+), 1 deletions(-)\n> >\n> > diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> > index dc7d3d1..5eedfbd 100644\n> > --- a/Documentation/git-clone.txt\n> > +++ b/Documentation/git-clone.txt\n> > @@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n> >        configuration variables are created.\n> >\n> >  --mirror::\n> > -       Set up a mirror of the remote repository.  This implies `--bare`.\n> > +       Set up a mirror of the remote repository.\n> > +       Using\n> > +\n> > +               git remote update origin\n> > +\n> > +       (or `<name>` instead of `origin` if -o is given) in the resulting\n> > +       repository overwrites the local branches without asking.\n> > +       This implies `--bare`.\n> > +       Without --mirror (but with --bare) git remote update doesn't touch any\n> > +       branches at all.\n> >\n> >  --origin <name>::\n> >  -o <name>::\n> > --\n> > 1.7.2.3\n> >\n> >\n> \n> \n> \n"},{"id":"152479","messageId":"4CA9815D.3040801@drmicha.warpmail.net","threadId":"25312","inReplyTo":"1285967766.6750.2.camel@gandalf.stny.rr.com","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-10-04T07:25:17Z","receivedAt":"2010-10-04T07:25:17Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Steven Rostedt venit, vidit, dixit 01.10.2010 23:16:\n> On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n>> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n>>> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n>>> \"mirror\".\n>>>\n\nI'd say \"mirror\" is a commonly known term for an exact copy. Moreover,\nthe text below doesn't explain what a mirror is either, only how\n\"update\" behaves in it.\n\n>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n>>\n>> Acked-by: Darren 'Some People' Hart <darren@dvhart.com>\n> \n>   Acked-by: Steven Rostedt <rostedt@goodmis.org>\n> \n> -- Steve\n> \n>>\n>>> ---\n>>>  Documentation/git-clone.txt |   11 ++++++++++-\n>>>  1 files changed, 10 insertions(+), 1 deletions(-)\n>>>\n>>> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n>>> index dc7d3d1..5eedfbd 100644\n>>> --- a/Documentation/git-clone.txt\n>>> +++ b/Documentation/git-clone.txt\n>>> @@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n>>>        configuration variables are created.\n>>>\n>>>  --mirror::\n>>> -       Set up a mirror of the remote repository.  This implies `--bare`.\n>>> +       Set up a mirror of the remote repository.\n>>> +       Using\n>>> +\n>>> +               git remote update origin\n>>> +\n>>> +       (or `<name>` instead of `origin` if -o is given) in the resulting\n\n\"remote\" has no \"-o\" option. You probably mean the \"clone\" option, but\nthe way it's written it refers to the preceding command.\n\n>>> +       repository overwrites the local branches without asking.\n>>> +       This implies `--bare`.\n\nAgain, \"this\" refers to the preceding sentence. But the update behavior\ndoes not imply \"--bare\". Specifying \"--mirror\" for \"clone\" implies \"--bare\".\n\n>>> +       Without --mirror (but with --bare) git remote update doesn't touch any\n>>> +       branches at all.\n\nThat's not true. It just doesn't touch any local branches; it updates\nthe remote branches, of course.\n\nI'm sorry but I can't consider this patch an improvement.\n\nMichael\n"},{"id":"152484","messageId":"20101004075015.GN28679@pengutronix.de","threadId":"25312","inReplyTo":"4CA9815D.3040801@drmicha.warpmail.net","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-04T07:50:15Z","receivedAt":"2010-10-04T07:50:15Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Michael,\n\nOn Mon, Oct 04, 2010 at 09:25:17AM +0200, Michael J Gruber wrote:\n> Steven Rostedt venit, vidit, dixit 01.10.2010 23:16:\n> > On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n> >> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n> >>> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> >>> \"mirror\".\n> >>>\n> \n> I'd say \"mirror\" is a commonly known term for an exact copy. Moreover,\n> the text below doesn't explain what a mirror is either, only how\n> \"update\" behaves in it.\nhmm.  The --mirror option doesn't have any effect (apart from the\nchanges in the config file) until you update.  So I think it's natural\nto talk about git update.  No?\n \n> >>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n> >>\n> >> Acked-by: Darren 'Some People' Hart <darren@dvhart.com>\n> > \n> >   Acked-by: Steven Rostedt <rostedt@goodmis.org>\n> > \n> > -- Steve\n> > \n> >>\n> >>> ---\n> >>>  Documentation/git-clone.txt |   11 ++++++++++-\n> >>>  1 files changed, 10 insertions(+), 1 deletions(-)\n> >>>\n> >>> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> >>> index dc7d3d1..5eedfbd 100644\n> >>> --- a/Documentation/git-clone.txt\n> >>> +++ b/Documentation/git-clone.txt\n> >>> @@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n> >>>        configuration variables are created.\n> >>>\n> >>>  --mirror::\n> >>> -       Set up a mirror of the remote repository.  This implies `--bare`.\n> >>> +       Set up a mirror of the remote repository.\n> >>> +       Using\n> >>> +\n> >>> +               git remote update origin\n> >>> +\n> >>> +       (or `<name>` instead of `origin` if -o is given) in the resulting\n> \n> \"remote\" has no \"-o\" option. You probably mean the \"clone\" option, but\n> the way it's written it refers to the preceding command.\nSo what do you think about:\n\n\t... (or `<name>` instead of `origin` if -o is given to clone)\n\n> \n> >>> +       repository overwrites the local branches without asking.\n> >>> +       This implies `--bare`.\n> \n> Again, \"this\" refers to the preceding sentence. But the update behavior\n> does not imply \"--bare\". Specifying \"--mirror\" for \"clone\" implies \"--bare\".\nOK.\n \n> >>> +       Without --mirror (but with --bare) git remote update doesn't touch any\n> >>> +       branches at all.\n> \n> That's not true. It just doesn't touch any local branches; it updates\n> the remote branches, of course.\nHmm, for me there are no remote branches when using --bare:\n\n\tukleinek@cassiopeia:~/tmp$ git clone --bare ~/gsrc/topgit\n\tCloning into bare repository topgit.git...\n\tdone.\n\tukleinek@cassiopeia:~/tmp$ cd topgit.git/\n\tukleinek@cassiopeia:~/tmp/topgit.git$ git remote update\n\tFetching origin\n\tFrom /home/ukleinek/gsrc/topgit\n\t * branch            HEAD       -> FETCH_HEAD\n\nThis is also documented for --bare:\n\n\tWhen this option is used, neither remote-tracking branches nor\n\tthe related configuration variables are created.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"152493","messageId":"4CA98EF1.1050102@drmicha.warpmail.net","threadId":"25312","inReplyTo":"20101004075015.GN28679@pengutronix.de","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-10-04T08:23:13Z","receivedAt":"2010-10-04T08:23:13Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Uwe Kleine-König venit, vidit, dixit 04.10.2010 09:50:\n> Hello Michael,\n> \n> On Mon, Oct 04, 2010 at 09:25:17AM +0200, Michael J Gruber wrote:\n>> Steven Rostedt venit, vidit, dixit 01.10.2010 23:16:\n>>> On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n>>>> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n>>>>> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n>>>>> \"mirror\".\n>>>>>\n>>\n>> I'd say \"mirror\" is a commonly known term for an exact copy. Moreover,\n>> the text below doesn't explain what a mirror is either, only how\n>> \"update\" behaves in it.\n> hmm.  The --mirror option doesn't have any effect (apart from the\n> changes in the config file) until you update.  So I think it's natural\n> to talk about git update.  No?\n\n\"git clone\" (with or without --mirror) does a couple of things, and it\ndoes them differently when \"--mirror\" is used. It mirrors each branch\nfrom the source repo in the target repo under the same name, including\nfor example any remote branches in the source repo. This is completely\ndifferent without \"--mirror\", where clone does not look at the source's\nremote branches at all. Also, it sets up a mirroring refspec, i.e.\n+refs/*:refs/*\n\nThen, when you use the mirror clone, the refspec makes it behave\ndifferently from a normal clone, which is what you notice with \"update\" etc.\n\n>>>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n>>>>\n>>>> Acked-by: Darren 'Some People' Hart <darren@dvhart.com>\n>>>\n>>>   Acked-by: Steven Rostedt <rostedt@goodmis.org>\n>>>\n>>> -- Steve\n>>>\n>>>>\n>>>>> ---\n>>>>>  Documentation/git-clone.txt |   11 ++++++++++-\n>>>>>  1 files changed, 10 insertions(+), 1 deletions(-)\n>>>>>\n>>>>> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n>>>>> index dc7d3d1..5eedfbd 100644\n>>>>> --- a/Documentation/git-clone.txt\n>>>>> +++ b/Documentation/git-clone.txt\n>>>>> @@ -128,7 +128,16 @@ objects from the source repository into a pack in the cloned repository.\n>>>>>        configuration variables are created.\n>>>>>\n>>>>>  --mirror::\n>>>>> -       Set up a mirror of the remote repository.  This implies `--bare`.\n>>>>> +       Set up a mirror of the remote repository.\n>>>>> +       Using\n>>>>> +\n>>>>> +               git remote update origin\n>>>>> +\n>>>>> +       (or `<name>` instead of `origin` if -o is given) in the resulting\n>>\n>> \"remote\" has no \"-o\" option. You probably mean the \"clone\" option, but\n>> the way it's written it refers to the preceding command.\n> So what do you think about:\n> \n> \t... (or `<name>` instead of `origin` if -o is given to clone)\n\nmaybe \"was given\"\n\n> \n>>\n>>>>> +       repository overwrites the local branches without asking.\n>>>>> +       This implies `--bare`.\n>>\n>> Again, \"this\" refers to the preceding sentence. But the update behavior\n>> does not imply \"--bare\". Specifying \"--mirror\" for \"clone\" implies \"--bare\".\n> OK.\n>  \n>>>>> +       Without --mirror (but with --bare) git remote update doesn't touch any\n>>>>> +       branches at all.\n>>\n>> That's not true. It just doesn't touch any local branches; it updates\n>> the remote branches, of course.\n> Hmm, for me there are no remote branches when using --bare:\n\nI'm sorry, I missed the parenthetical remark. You're completely right\nfor the case with \"--bare\" only.\n\n> \n> \tukleinek@cassiopeia:~/tmp$ git clone --bare ~/gsrc/topgit\n> \tCloning into bare repository topgit.git...\n> \tdone.\n> \tukleinek@cassiopeia:~/tmp$ cd topgit.git/\n> \tukleinek@cassiopeia:~/tmp/topgit.git$ git remote update\n> \tFetching origin\n> \tFrom /home/ukleinek/gsrc/topgit\n> \t * branch            HEAD       -> FETCH_HEAD\n> \n> This is also documented for --bare:\n> \n> \tWhen this option is used, neither remote-tracking branches nor\n> \tthe related configuration variables are created.\n> \n> Best regards\n> Uwe\n> \n\nThis makes me think that --mirror should be explained on top of --bare.\nFor example:\n\nIn addition to the mapping of local branches to local branches which\n--bare does, --mirror maps all refs which the source has under the same\nname in the target (including remote branches, notes etc.) and sets up a\nrefspec configuration so that all these refs are updated by a `git\nupdate` in the target repo.\n\nMichael\n"},{"id":"152494","messageId":"20101004085050.GQ28679@pengutronix.de","threadId":"25312","inReplyTo":"4CA98EF1.1050102@drmicha.warpmail.net","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-04T08:50:50Z","receivedAt":"2010-10-04T08:50:50Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Michael,\n\nOn Mon, Oct 04, 2010 at 10:23:13AM +0200, Michael J Gruber wrote:\n> Uwe Kleine-König venit, vidit, dixit 04.10.2010 09:50:\n> > Hello Michael,\n> > \n> > On Mon, Oct 04, 2010 at 09:25:17AM +0200, Michael J Gruber wrote:\n> >> Steven Rostedt venit, vidit, dixit 01.10.2010 23:16:\n> >>> On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n> >>>> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n> >>>>> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> >>>>> \"mirror\".\n> >>>>>\n> >>\n> >> I'd say \"mirror\" is a commonly known term for an exact copy. Moreover,\n> >> the text below doesn't explain what a mirror is either, only how\n> >> \"update\" behaves in it.\n> > hmm.  The --mirror option doesn't have any effect (apart from the\n> > changes in the config file) until you update.  So I think it's natural\n> > to talk about git update.  No?\n> \n> \"git clone\" (with or without --mirror) does a couple of things, and it\n> does them differently when \"--mirror\" is used. It mirrors each branch\n> from the source repo in the target repo under the same name, including\n> for example any remote branches in the source repo. This is completely\n> different without \"--mirror\", where clone does not look at the source's\n> remote branches at all. Also, it sets up a mirroring refspec, i.e.\n> +refs/*:refs/*\nAh, didn't notice that.\n\n> [...]\n> This makes me think that --mirror should be explained on top of --bare.\nOK.\n\n> For example:\n> \n> In addition to the mapping of local branches to local branches which\n> --bare does, --mirror maps all refs which the source has under the same\n> name in the target (including remote branches, notes etc.) and sets up a\n> refspec configuration so that all these refs are updated by a `git\n> update` in the target repo.\nHmm, I didn't understand this when I read it the first few times.  The\nspecial thing is that --mirror maps *all* refs, not *same name*.\n\nSo maybe:\n\n\tSet up a mirror of the remote repository.  This implies `--bare`.\n\tCompared to `--bare`, `--mirror` doesn't only map local branches of\n\tthe remote to local branches of the target but all refs\n\t(including remote branches, notes etc.) and sets up a refspec\n\tconfiguration such that all these refs are overwritten by a\n\t`git remote update` in the target repository.\n\nI choosed to write \"overwritten\" instead of \"updated\" to make it clearer\nthat it makes no sence to push into these branches from a different\nsource.  Should this be noted more explicit?\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"152499","messageId":"4CA99E43.1000204@drmicha.warpmail.net","threadId":"25312","inReplyTo":"20101004085050.GQ28679@pengutronix.de","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-10-04T09:28:35Z","receivedAt":"2010-10-04T09:28:35Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Uwe Kleine-König venit, vidit, dixit 04.10.2010 10:50:\n> Hello Michael,\n> \n> On Mon, Oct 04, 2010 at 10:23:13AM +0200, Michael J Gruber wrote:\n>> Uwe Kleine-König venit, vidit, dixit 04.10.2010 09:50:\n>>> Hello Michael,\n>>>\n>>> On Mon, Oct 04, 2010 at 09:25:17AM +0200, Michael J Gruber wrote:\n>>>> Steven Rostedt venit, vidit, dixit 01.10.2010 23:16:\n>>>>> On Fri, 2010-10-01 at 13:18 -0700, Darren Hart wrote:\n>>>>>> 2010/10/1 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n>>>>>>> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n>>>>>>> \"mirror\".\n>>>>>>>\n>>>>\n>>>> I'd say \"mirror\" is a commonly known term for an exact copy. Moreover,\n>>>> the text below doesn't explain what a mirror is either, only how\n>>>> \"update\" behaves in it.\n>>> hmm.  The --mirror option doesn't have any effect (apart from the\n>>> changes in the config file) until you update.  So I think it's natural\n>>> to talk about git update.  No?\n>>\n>> \"git clone\" (with or without --mirror) does a couple of things, and it\n>> does them differently when \"--mirror\" is used. It mirrors each branch\n>> from the source repo in the target repo under the same name, including\n>> for example any remote branches in the source repo. This is completely\n>> different without \"--mirror\", where clone does not look at the source's\n>> remote branches at all. Also, it sets up a mirroring refspec, i.e.\n>> +refs/*:refs/*\n> Ah, didn't notice that.\n> \n>> [...]\n>> This makes me think that --mirror should be explained on top of --bare.\n> OK.\n> \n>> For example:\n>>\n>> In addition to the mapping of local branches to local branches which\n>> --bare does, --mirror maps all refs which the source has under the same\n>> name in the target (including remote branches, notes etc.) and sets up a\n>> refspec configuration so that all these refs are updated by a `git\n>> update` in the target repo.\n> Hmm, I didn't understand this when I read it the first few times.  The\n> special thing is that --mirror maps *all* refs, not *same name*.\n\nYep, my sentence was bad, it could be misunderstood.\n\n> \n> So maybe:\n> \n> \tSet up a mirror of the remote repository.  This implies `--bare`.\n> \tCompared to `--bare`, `--mirror` doesn't only map local branches of\n\n\"does not\"\n\n> \tthe remote to local branches of the target but all refs\n> \t(including remote branches, notes etc.) and sets up a refspec\n\nMaybe \"of the source\" for \"of the remote\"? Because remote comes up right\nafter in a different meaning.\n\n> \tconfiguration such that all these refs are overwritten by a\n> \t`git remote update` in the target repository.\n> \n\nI like that a lot!\n\n> I choosed to write \"overwritten\" instead of \"updated\" to make it clearer\n> that it makes no sence to push into these branches from a different\n> source.  Should this be noted more explicit?\n\n\"update\" may be more Git lingo but I think either is fine. \"overwritten\"\nmakes it clearer this is not a repo to do development in...\n\nCheers,\nMichael\n"},{"id":"152504","messageId":"1286185878-23795-1-git-send-email-u.kleine-koenig@pengutronix.de","threadId":"25312","inReplyTo":"4CA99E43.1000204@drmicha.warpmail.net","subject":"[PATCH v2] Documentation/git-clone: describe --mirror more verbose","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-04T09:51:18Z","receivedAt":"2010-10-04T09:51:18Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n\"mirror\" only.\n\nCc: Steven Rostedt <rostedt@goodmis.org>\nCc: Darren 'Some People' Hart <darren@dvhart.com>\nCc: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n---\n Documentation/git-clone.txt |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex dc7d3d1..524a080 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.\n \tconfiguration variables are created.\n \n --mirror::\n-\tSet up a mirror of the remote repository.  This implies `--bare`.\n+\tSet up a mirror of the source repository.  This implies `--bare`.\n+\tCompared to `--bare`, `--mirror` does not only map local branches of\n+\tthe source to local branches of the target but all refs (including\n+\tremote branches, notes etc.) and sets up a refspec configuration such\n+\tthat all these refs are overwritten by a `git remote update` in the\n+\ttarget repository.\n \n --origin <name>::\n -o <name>::\n-- \n1.7.2.3\n"},{"id":"152519","messageId":"1286196454.6750.60.camel@gandalf.stny.rr.com","threadId":"25312","inReplyTo":"1286185878-23795-1-git-send-email-u.kleine-koenig@pengutronix.de","subject":"Re: [PATCH v2] Documentation/git-clone: describe --mirror more verbose","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2010-10-04T12:47:34Z","receivedAt":"2010-10-04T12:47:34Z","isPatch":true,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Mon, 2010-10-04 at 11:51 +0200, Uwe Kleine-König wrote:\n> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> \"mirror\" only.\n> \n\nAcked-by: Steven Rostedt <rostedt@goodmis.org>\n\n-- Steve\n\n> Cc: Darren 'Some People' Hart <darren@dvhart.com>\n> Cc: Michael J Gruber <git@drmicha.warpmail.net>\n> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n> ---\n>  Documentation/git-clone.txt |    7 ++++++-\n>  1 files changed, 6 insertions(+), 1 deletions(-)\n> \n> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> index dc7d3d1..524a080 100644\n> --- a/Documentation/git-clone.txt\n> +++ b/Documentation/git-clone.txt\n> @@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.\n>  \tconfiguration variables are created.\n>  \n>  --mirror::\n> -\tSet up a mirror of the remote repository.  This implies `--bare`.\n> +\tSet up a mirror of the source repository.  This implies `--bare`.\n> +\tCompared to `--bare`, `--mirror` does not only map local branches of\n> +\tthe source to local branches of the target but all refs (including\n> +\tremote branches, notes etc.) and sets up a refspec configuration such\n> +\tthat all these refs are overwritten by a `git remote update` in the\n> +\ttarget repository.\n>  \n>  --origin <name>::\n>  -o <name>::\n"},{"id":"152521","messageId":"4CA9CDF8.6040002@drmicha.warpmail.net","threadId":"25312","inReplyTo":"1286185878-23795-1-git-send-email-u.kleine-koenig@pengutronix.de","subject":"Re: [PATCH v2] Documentation/git-clone: describe --mirror more verbose","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-10-04T12:52:08Z","receivedAt":"2010-10-04T12:52:08Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Uwe Kleine-König venit, vidit, dixit 04.10.2010 11:51:\n> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> \"mirror\" only.\n> \n> Cc: Steven Rostedt <rostedt@goodmis.org>\n> Cc: Darren 'Some People' Hart <darren@dvhart.com>\n> Cc: Michael J Gruber <git@drmicha.warpmail.net>\n> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n> ---\n>  Documentation/git-clone.txt |    7 ++++++-\n>  1 files changed, 6 insertions(+), 1 deletions(-)\n> \n> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> index dc7d3d1..524a080 100644\n> --- a/Documentation/git-clone.txt\n> +++ b/Documentation/git-clone.txt\n> @@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.\n>  \tconfiguration variables are created.\n>  \n>  --mirror::\n> -\tSet up a mirror of the remote repository.  This implies `--bare`.\n> +\tSet up a mirror of the source repository.  This implies `--bare`.\n> +\tCompared to `--bare`, `--mirror` does not only map local branches of\n> +\tthe source to local branches of the target but all refs (including\n> +\tremote branches, notes etc.) and sets up a refspec configuration such\n> +\tthat all these refs are overwritten by a `git remote update` in the\n> +\ttarget repository.\n>  \n>  --origin <name>::\n>  -o <name>::\n\nYep, and thanks for being patient! JC may prefer a grammatically correct\ncommit subject (\"more verbosely\") but in any case, thanks for hanging in\nthere ;)\n\nMichael\n\nAcked-by: sender\n"},{"id":"152535","messageId":"AANLkTikFzbWJ9CZ5skXe38+QF3QRWK5hfTWJhc5FOYK_@mail.gmail.com","threadId":"25312","inReplyTo":"1286185878-23795-1-git-send-email-u.kleine-koenig@pengutronix.de","subject":"Re: [PATCH v2] Documentation/git-clone: describe --mirror more verbose","fromName":"Darren Hart","fromEmail":"darren@dvhart.com","sentAt":"2010-10-04T14:42:26Z","receivedAt":"2010-10-04T14:42:26Z","isPatch":true,"sender":{"key":"darren@dvhart.com","avatar":"https://gravatar.com/avatar/6ccf8d792d0ae1836941850f4f2afe03f64562de4733f2c421bdb34eddf947eb?d=mp&s=160"},"body":"Hi Uwe,\n\n(sorry for the dup Uwe)\n\nThanks for iterating on this with Michael. The following looks good to\nme, with one exception below:\n\n2010/10/4 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:\n> Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n> \"mirror\" only.\n>\n> Cc: Steven Rostedt <rostedt@goodmis.org>\n> Cc: Darren 'Some People' Hart <darren@dvhart.com>\n> Cc: Michael J Gruber <git@drmicha.warpmail.net>\n> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n> ---\n>  Documentation/git-clone.txt |    7 ++++++-\n>  1 files changed, 6 insertions(+), 1 deletions(-)\n>\n> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\n> index dc7d3d1..524a080 100644\n> --- a/Documentation/git-clone.txt\n> +++ b/Documentation/git-clone.txt\n> @@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.\n>        configuration variables are created.\n>\n>  --mirror::\n> -       Set up a mirror of the remote repository.  This implies `--bare`.\n> +       Set up a mirror of the source repository.  This implies `--bare`.\n> +       Compared to `--bare`, `--mirror` does not only map local branches of\n\ns/does not only map/not only maps/\n\n> +       the source to local branches of the target but all refs (including\n\ns/but all refs/, it maps all refs/\n\nThese changes form a more parallel sentence structure and is easier to\nread/parse IMO.\n\nThanks,\n\nDarren Hart\n\n> +       remote branches, notes etc.) and sets up a refspec configuration such\n> +       that all these refs are overwritten by a `git remote update` in the\n> +       target repository.\n>\n>  --origin <name>::\n>  -o <name>::\n> --\n> 1.7.2.3\n>\n>\n\n\n\n--\nDarren Hart\n"},{"id":"152547","messageId":"1286213307-23600-1-git-send-email-u.kleine-koenig@pengutronix.de","threadId":"25312","inReplyTo":"AANLkTikFzbWJ9CZ5skXe38+QF3QRWK5hfTWJhc5FOYK_@mail.gmail.com","subject":"[PATCH v3] Documentation/git-clone: describe --mirror more verbosely","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-04T17:28:27Z","receivedAt":"2010-10-04T17:28:27Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Some people in #linux-rt claimed that you cannot define \"--mirror\" with\n\"mirror\" only.\n\nCc: Steven Rostedt <rostedt@goodmis.org>\nCc: Darren 'Some People' Hart <darren@dvhart.com>\nCc: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n---\n Documentation/git-clone.txt |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt\nindex dc7d3d1..ab72933 100644\n--- a/Documentation/git-clone.txt\n+++ b/Documentation/git-clone.txt\n@@ -128,7 +128,12 @@ objects from the source repository into a pack in the cloned repository.\n \tconfiguration variables are created.\n \n --mirror::\n-\tSet up a mirror of the remote repository.  This implies `--bare`.\n+\tSet up a mirror of the source repository.  This implies `--bare`.\n+\tCompared to `--bare`, `--mirror` not only maps local branches of the\n+\tsource to local branches of the target, it maps all refs (including\n+\tremote branches, notes etc.) and sets up a refspec configuration such\n+\tthat all these refs are overwritten by a `git remote update` in the\n+\ttarget repository.\n \n --origin <name>::\n -o <name>::\n-- \n1.7.2.3\n"},{"id":"152548","messageId":"7vlj6d988o.fsf@alter.siamese.dyndns.org","threadId":"25312","inReplyTo":"4CA99E43.1000204@drmicha.warpmail.net","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-10-04T17:29:43Z","receivedAt":"2010-10-04T17:29:43Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>> I choosed to write \"overwritten\" instead of \"updated\" to make it clearer\n>> that it makes no sence to push into these branches from a different\n>> source.  Should this be noted more explicit?\n>\n> \"update\" may be more Git lingo but I think either is fine. \"overwritten\"\n> makes it clearer this is not a repo to do development in...\n\nIn a repository with remote.origin.mirror set to true, \"git fetch origin\"\ndoes not seem to prune a ref that has been removed from the origin.  I\nthink that is a design bug, albeit a minor one (\"git fetch -p origin\" can\nfix, but \"-p\" should not be necessary).  A \"mirror\"'s purpose is to, ehh,\nmirror a remote so that local people can share it as a nearby copy.\n\nA wording that also implies this automatic deletion of a stale ref would\nbe nice; \"overwritten\" does not exactly sound like that, though.\n"},{"id":"152550","messageId":"vpqfwwlvov1.fsf@bauges.imag.fr","threadId":"25312","inReplyTo":"7vlj6d988o.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-10-04T17:39:46Z","receivedAt":"2010-10-04T17:39:46Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> A \"mirror\"'s purpose is to, ehh, mirror a remote so that local\n> people can share it as a nearby copy.\n\nI think this is the one sentence that is missing in the description.\nEven after the patch, the reader knows _what_ --mirror does, still not\nreally _how_ to use it.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"152574","messageId":"AANLkTinvOhTO4Zs3_wSvV4ONmbWK-=jjtjPLPW2F_54v@mail.gmail.com","threadId":"25312","inReplyTo":"vpqfwwlvov1.fsf@bauges.imag.fr","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Darren Hart","fromEmail":"darren@dvhart.com","sentAt":"2010-10-04T19:05:20Z","receivedAt":"2010-10-04T19:05:20Z","isPatch":true,"sender":{"key":"darren@dvhart.com","avatar":"https://gravatar.com/avatar/6ccf8d792d0ae1836941850f4f2afe03f64562de4733f2c421bdb34eddf947eb?d=mp&s=160"},"body":"On Mon, Oct 4, 2010 at 10:39 AM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> A \"mirror\"'s purpose is to, ehh, mirror a remote so that local\n>> people can share it as a nearby copy.\n>\n> I think this is the one sentence that is missing in the description.\n> Even after the patch, the reader knows _what_ --mirror does, still not\n> really _how_ to use it.\n\nAgreed, that would be a nice addition.\n\n-- \nDarren Hart\n"},{"id":"152642","messageId":"20101005070113.GE11737@pengutronix.de","threadId":"25312","inReplyTo":"7vlj6d988o.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2010-10-05T07:01:13Z","receivedAt":"2010-10-05T07:01:13Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hi Junio,\n\nOn Mon, Oct 04, 2010 at 10:29:43AM -0700, Junio C Hamano wrote:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n> >> I choosed to write \"overwritten\" instead of \"updated\" to make it clearer\n> >> that it makes no sence to push into these branches from a different\n> >> source.  Should this be noted more explicit?\n> >\n> > \"update\" may be more Git lingo but I think either is fine. \"overwritten\"\n> > makes it clearer this is not a repo to do development in...\n> \n> In a repository with remote.origin.mirror set to true, \"git fetch origin\"\n> does not seem to prune a ref that has been removed from the origin.  I\n> think that is a design bug, albeit a minor one (\"git fetch -p origin\" can\n> fix, but \"-p\" should not be necessary).  A \"mirror\"'s purpose is to, ehh,\n> mirror a remote so that local people can share it as a nearby copy.\n> \n> A wording that also implies this automatic deletion of a stale ref would\n> be nice; \"overwritten\" does not exactly sound like that, though.\nSo you intend to change git fetch origin to remove stale refs, right?\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"152684","messageId":"7vwrpw7ikx.fsf@alter.siamese.dyndns.org","threadId":"25312","inReplyTo":"20101005070113.GE11737@pengutronix.de","subject":"Re: [PATCH] Documentation/git-clone: describe --mirror more verbose","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-10-05T15:41:34Z","receivedAt":"2010-10-05T15:41:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:\n\n> So you intend to change git fetch origin to remove stale refs, right?\n\nI personally?  Am too lazy for doing it myself ;-)\n\nI am just\n\n (1) pointing it out as a potential design bug; and\n\n (2) seeing if somebody who is depending on the current behaviour to\n     object.\n"}]}