{"thread":{"id":"23659","subject":"[RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","startedAt":"2010-05-01T18:36:33Z","lastAt":"2010-05-17T14:26:40Z","messageCount":27,"participants":["Michael J Gruber","Jakub Narebski","Jeff King","Akhbari, Farshad","Chris Packham","Avery Pennarun","Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"140702","messageId":"83fc6259c434cc63f8e64ddf9ac8f90bae0ab2eb.1272557175.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":null,"subject":"[RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-01T18:36:33Z","receivedAt":"2010-05-01T18:36:33Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Due to the increasing usage of the ref namespace (e.g. notes, replace)\nthe revision specifier \"--all\" becomes decreasingly useful. But\n\"something like --all\" is ineeded for getting a quick overview of\nthe development state of a repository.\n\nIntroduce --heads and --locals specifiers in order to help with that:\n\n--heads == HEAD --branches --remotes\n--locals = HEAD --branches --tags\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nRFD for several reasons:\n\n- It's incredibly useful, I want it - do others? ;)\n- names of the options (let the bikeshedding begin)\n- should rev-parse include HEAD?\n- tests and doc, of course\n\nrev-parse does not include HEAD even with --all, but rev-list does.\nThe patch keeps with that tradition (the commit message does not quite\nconvey this). I don't feel it's a good one. Cleaning that up\nrequires more work, though.\n\n builtin/rev-list.c  |    2 ++\n builtin/rev-parse.c |   12 ++++++++++++\n revision.c          |   12 ++++++++++++\n 3 files changed, 26 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/rev-list.c b/builtin/rev-list.c\nindex 51ceb19..fb8208c 100644\n--- a/builtin/rev-list.c\n+++ b/builtin/rev-list.c\n@@ -20,7 +20,9 @@ static const char rev_list_usage[] =\n \"    --all\\n\"\n \"    --branches\\n\"\n \"    --tags\\n\"\n+\"    --locals\\n\"\n \"    --remotes\\n\"\n+\"    --heads\\n\"\n \"    --stdin\\n\"\n \"    --quiet\\n\"\n \"  ordering output:\\n\"\ndiff --git a/builtin/rev-parse.c b/builtin/rev-parse.c\nindex 8fbf9d0..c739479 100644\n--- a/builtin/rev-parse.c\n+++ b/builtin/rev-parse.c\n@@ -44,6 +44,8 @@ static int is_rev_argument(const char *arg)\n \t\t\"--branches=\",\n \t\t\"--branches\",\n \t\t\"--header\",\n+\t\t\"--heads\",\n+\t\t\"--locals\",\n \t\t\"--max-age=\",\n \t\t\"--max-count=\",\n \t\t\"--min-age=\",\n@@ -598,6 +600,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)\n \t\t\t\tfor_each_tag_ref(show_reference, NULL);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--locals\")) {\n+\t\t\t\tfor_each_branch_ref(show_reference, NULL);\n+\t\t\t\tfor_each_tag_ref(show_reference, NULL);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!prefixcmp(arg, \"--glob=\")) {\n \t\t\t\tfor_each_glob_ref(show_reference, arg + 7, NULL);\n \t\t\t\tcontinue;\n@@ -611,6 +618,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)\n \t\t\t\tfor_each_remote_ref(show_reference, NULL);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--heads\")) {\n+\t\t\t\tfor_each_branch_ref(show_reference, NULL);\n+\t\t\t\tfor_each_remote_ref(show_reference, NULL);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--show-toplevel\")) {\n \t\t\t\tconst char *work_tree = get_git_work_tree();\n \t\t\t\tif (work_tree)\ndiff --git a/revision.c b/revision.c\nindex f4b8b38..04f9be7 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1399,10 +1399,22 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n \t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--locals\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--remotes\")) {\n \t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--heads\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!prefixcmp(arg, \"--glob=\")) {\n \t\t\t\tstruct all_refs_cb cb;\n \t\t\t\tinit_all_refs_cb(&cb, revs, flags);\n-- \n1.7.1.328.g9993c\n"},{"id":"140706","messageId":"m3bpczcsup.fsf@localhost.localdomain","threadId":"23659","inReplyTo":"83fc6259c434cc63f8e64ddf9ac8f90bae0ab2eb.1272557175.git.git@drmicha.warpmail.net","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-01T19:42:15Z","receivedAt":"2010-05-01T19:42:15Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Due to the increasing usage of the ref namespace (e.g. notes, replace)\n> the revision specifier \"--all\" becomes decreasingly useful. But\n> \"something like --all\" is ineeded for getting a quick overview of\n> the development state of a repository.\n> \n> Introduce --heads and --locals specifiers in order to help with that:\n> \n> --heads == HEAD --branches --remotes\n> --locals = HEAD --branches --tags\n\nWouldn't new feature (introduced in 1.7.0) of --glob=<glob-pattern>\nbe enough?\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"140708","messageId":"4BDC8565.6050308@drmicha.warpmail.net","threadId":"23659","inReplyTo":"m3bpczcsup.fsf@localhost.localdomain","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-01T19:47:49Z","receivedAt":"2010-05-01T19:47:49Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 01.05.2010 21:42:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> Due to the increasing usage of the ref namespace (e.g. notes, replace)\n>> the revision specifier \"--all\" becomes decreasingly useful. But\n>> \"something like --all\" is ineeded for getting a quick overview of\n>> the development state of a repository.\n>>\n>> Introduce --heads and --locals specifiers in order to help with that:\n>>\n>> --heads == HEAD --branches --remotes\n>> --locals = HEAD --branches --tags\n> \n> Wouldn't new feature (introduced in 1.7.0) of --glob=<glob-pattern>\n> be enough?\n> \n\nYou can already use the exact expressions which I wrote above\n(\"--branches --tags\" etc.). The point is to have short ones for the most\nuseful cases.  And \"--all\" used to be useful.\n\nIt's just that we don't have aliases for rev notation ;)\n\nMichael\n"},{"id":"140709","messageId":"201005012151.06609.jnareb@gmail.com","threadId":"23659","inReplyTo":"4BDC8565.6050308@drmicha.warpmail.net","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-01T19:51:05Z","receivedAt":"2010-05-01T19:51:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Michael J Gruber wrote:\n> Jakub Narebski venit, vidit, dixit 01.05.2010 21:42:\n>> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>> \n>>> Due to the increasing usage of the ref namespace (e.g. notes, replace)\n>>> the revision specifier \"--all\" becomes decreasingly useful. But\n>>> \"something like --all\" is ineeded for getting a quick overview of\n>>> the development state of a repository.\n>>>\n>>> Introduce --heads and --locals specifiers in order to help with that:\n>>>\n>>> --heads == HEAD --branches --remotes\n>>> --locals = HEAD --branches --tags\n>> \n>> Wouldn't new feature (introduced in 1.7.0) of --glob=<glob-pattern>\n>> be enough?\n>> \n> \n> You can already use the exact expressions which I wrote above\n> (\"--branches --tags\" etc.). The point is to have short ones for the most\n> useful cases.  And \"--all\" used to be useful.\n> \n> It's just that we don't have aliases for rev notation ;)\n\nAh, sorry, I have misunderstood the goal of your change.\n\nSeems like a good idea.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"140729","messageId":"20100502050054.GE14776@coredump.intra.peff.net","threadId":"23659","inReplyTo":"83fc6259c434cc63f8e64ddf9ac8f90bae0ab2eb.1272557175.git.git@drmicha.warpmail.net","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-02T05:00:54Z","receivedAt":"2010-05-02T05:00:54Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, May 01, 2010 at 08:36:33PM +0200, Michael J Gruber wrote:\n\n> Due to the increasing usage of the ref namespace (e.g. notes, replace)\n> the revision specifier \"--all\" becomes decreasingly useful. But\n> \"something like --all\" is ineeded for getting a quick overview of\n> the development state of a repository.\n> \n> Introduce --heads and --locals specifiers in order to help with that:\n> \n> --heads == HEAD --branches --remotes\n> --locals = HEAD --branches --tags\n\nI don't have anything against the concept, but \"--heads\" is a horrible\nname, as it implies refs/heads (which is of course what --branches does.\nYikes!). I know why you picked it, and once you think about it, yes, it\ndoes make some sense (it is all the local and remote heads), but I am\nworried that it will cause confusion.\n\n-Peff\n"},{"id":"140770","messageId":"4BDD8169.9050301@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100502050054.GE14776@coredump.intra.peff.net","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-02T13:43:05Z","receivedAt":"2010-05-02T13:43:05Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jeff King venit, vidit, dixit 02.05.2010 07:00:\n> On Sat, May 01, 2010 at 08:36:33PM +0200, Michael J Gruber wrote:\n> \n>> Due to the increasing usage of the ref namespace (e.g. notes, replace)\n>> the revision specifier \"--all\" becomes decreasingly useful. But\n>> \"something like --all\" is ineeded for getting a quick overview of\n>> the development state of a repository.\n>>\n>> Introduce --heads and --locals specifiers in order to help with that:\n>>\n>> --heads == HEAD --branches --remotes\n>> --locals = HEAD --branches --tags\n> \n> I don't have anything against the concept, but \"--heads\" is a horrible\n> name, as it implies refs/heads (which is of course what --branches does.\n> Yikes!). I know why you picked it, and once you think about it, yes, it\n\nI second your Yikes... but won't suggest renaming refs/heads.\n\n> does make some sense (it is all the local and remote heads), but I am\n> worried that it will cause confusion.\n\nSo, your alternative suggestion is...? ;)\n\nHow about --tips? But I don't like that. We really use head as the term\nfor the tip (ordered end-vertex) of a branch, be it local or remote. I\nwould hope that ordinary users do not have to deal with the layout under\nrefs, and thus won't be confused. But people peel and poke everywhere\nwhere there not supposed to :)\n\nMichael\n"},{"id":"140959","messageId":"20100505033536.GB8779@coredump.intra.peff.net","threadId":"23659","inReplyTo":"4BDD8169.9050301@drmicha.warpmail.net","subject":"Re: [RFD PATCH] revlist/rev-parse: Introduce --heads and --locals revision specifiers","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-05T03:35:36Z","receivedAt":"2010-05-05T03:35:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 02, 2010 at 03:43:05PM +0200, Michael J Gruber wrote:\n\n> > I don't have anything against the concept, but \"--heads\" is a horrible\n> > name, as it implies refs/heads (which is of course what --branches does.\n> > Yikes!). I know why you picked it, and once you think about it, yes, it\n> [...]\n> > does make some sense (it is all the local and remote heads), but I am\n> > worried that it will cause confusion.\n> \n> So, your alternative suggestion is...? ;)\n\nI have to criticize _and_ suggest? Sheesh.\n\n> How about --tips? But I don't like that.\n\nI don't like it either. Really, \"--branches\" is a reasonable\ndescription of what you are providing, but that is already taken. :)\n\nI can't think of another place in git where we collectively refer to\nlocal and remote branch heads by a single term. The closest is\ngit-branch's \"-a\". You could do \"--all-branches\", but this was meant to\nsave some typing, so it probably fails on that count.\n\nThe problem with things like --tips, --heads, or --branches, is that\nthere is nothing to say \"I mean _both_ local and remote\" as opposed to\njust local. And I'm not sure there is a way to say that without getting\nlong. I guess \"--all-heads\" is shorter, but still ugly.\n\n> We really use head as the term for the tip (ordered end-vertex) of a\n> branch, be it local or remote.\n\nYeah. Originally both of those things were in refs/heads/, but the\n\"separate remote\" layout has been standard for some time. Even Junio may\nhave switched by now. :)\n\n> I would hope that ordinary users do not have to deal with the layout under\n> refs, and thus won't be confused. But people peel and poke everywhere\n> where there not supposed to :)\n\nI think refs/heads is something many git users know about. Git was\ndesigned from the start to have a simple data model, and that model\n(including things like ref naming) was always exposed to the user.\nThat's what makes it so flexible, and of course is what makes many\npeople complain.\n\nThese days that data model is a little more hidden, but I think you do\nstill see the refs hierarchy. Certainly users see \"remotes/\" (e.g., in\n\"git branch -a\"), though perhaps they don't necessarily realize how it\nrelates to refs/ and refs/heads/. Full ref names are also used for\ndisambiguation, though I suppose most people never need to deal with\nthat. But the first time one runs \"git for-each-ref\" (I know, I manage\nto work it into every conversation, right?) you get full exposure.\n\n-Peff\n"},{"id":"141594","messageId":"cover.1273760226.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100505033536.GB8779@coredump.intra.peff.net","subject":"[PATCH 0/4] All is too much","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-13T14:24:34Z","receivedAt":"2010-05-13T14:24:34Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"This series introduces --lrbranches and --locals as abbreviations\nfor \"HEAD --branches --remotes\" (local and remote branches) resp.\n\"HEAD --branches --tags\" (local refs).\nThey are becoming increasingly necessary as refs/ is growing\nwith auxiliary refs such as notes and replacements, so that \"--all\"\nis too much :)\n\nWhile at it, or rather: in preparation, we note rev-parse\nas being deprectated as an option sifter (as discussed on list)\nand clean up and complete t6018.\n\nMichael J Gruber (4):\n  rev-parse: deprecate use as an option sifter\n  t6018: add tests for rev-list's --branches and --tags\n  t6018: make sure all tested symbolic names are different revs\n  revlist: Introduce --lrbranches and --locals revision specifiers\n\n Documentation/git-rev-list.txt     |    2 ++\n Documentation/git-rev-parse.txt    |   14 ++++++++++----\n Documentation/rev-list-options.txt |    8 ++++++++\n builtin/rev-list.c                 |    2 ++\n revision.c                         |   12 ++++++++++++\n t/t6018-rev-list-glob.sh           |   33 ++++++++++++++++++++++++++++++++-\n 6 files changed, 66 insertions(+), 5 deletions(-)\n"},{"id":"141593","messageId":"725860e3bfc692c7241695ef5f554ff73f277b15.1273760226.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100505033536.GB8779@coredump.intra.peff.net","subject":"[PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-13T14:24:35Z","receivedAt":"2010-05-13T14:24:35Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"This command used to be used to distinguish between parameters meant\nfor rev-list and others, but this is deprectated now, and one should not\nrely on rev-parse keeping up to date with rev-list. State this in the\nman page and reword the title according to the primary use (converting\nsymbolic names to SHA1's).\n\nReference: <http://permalink.gmane.org/gmane.comp.version-control.git/146118>\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-rev-parse.txt |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\nindex 8db600f..99d2a79 100644\n--- a/Documentation/git-rev-parse.txt\n+++ b/Documentation/git-rev-parse.txt\n@@ -3,7 +3,7 @@ git-rev-parse(1)\n \n NAME\n ----\n-git-rev-parse - Pick out and massage parameters\n+git-rev-parse - Parse symbolic names into object names\n \n \n SYNOPSIS\n@@ -13,12 +13,18 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-Many git porcelainish commands take mixture of flags\n+The primary use of 'git rev-parse' is to turn symbolic object names into\n+40-letter object names (\"SHA-1\").\n+\n+Also, many git porcelainish commands take a mixture of flags\n (i.e. parameters that begin with a dash '-') and parameters\n meant for the underlying 'git rev-list' command they use internally\n and flags and parameters for the other commands they use\n-downstream of 'git rev-list'.  This command is used to\n-distinguish between them.\n+downstream of 'git rev-list'.  This command used to be used to\n+distinguish between them, but this is deprectated now, and you should\n+not expect 'git rev-parse' to keep up to date with newer parameters for\n+'git rev-list'. You can use linkgit:git-rev-list[1] directly or\n+linkgit:git-for-each-ref[1] for scripting.\n \n \n OPTIONS\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141595","messageId":"ee2e0da5718c16fbfe65c61de85da8955bb52c63.1273760226.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100505033536.GB8779@coredump.intra.peff.net","subject":"[PATCH 2/4] t6018: add tests for rev-list's --branches and --tags","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-13T14:24:36Z","receivedAt":"2010-05-13T14:24:36Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"so that we know when they break.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t6018-rev-list-glob.sh |   13 +++++++++++++\n 1 files changed, 13 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex 8d3fa7d..dbedc4d 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -162,6 +162,13 @@ test_expect_success 'rev-list --branches=subspace' '\n \tcompare rev-list \"subspace/one subspace/two\" \"--branches=subspace\"\n \n '\n+\n+test_expect_success 'rev-list --branches' '\n+\n+\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n+\n+'\n+\n test_expect_success 'rev-list --glob=heads/someref/* master' '\n \n \tcompare rev-list \"master\" \"--glob=heads/someref/* master\"\n@@ -186,6 +193,12 @@ test_expect_success 'rev-list --tags=foo' '\n \n '\n \n+test_expect_success 'rev-list --tags' '\n+\n+\tcompare rev-list \"foo/bar\" \"--tags\"\n+\n+'\n+\n test_expect_success 'rev-list --remotes=foo' '\n \n \tcompare rev-list \"foo/baz\" \"--remotes=foo\"\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141596","messageId":"48af27209549dda92ffb37a8d5186bbe5d217e54.1273760226.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100505033536.GB8779@coredump.intra.peff.net","subject":"[PATCH 3/4] t6018: make sure all tested symbolic names are different revs","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-13T14:24:37Z","receivedAt":"2010-05-13T14:24:37Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t6018-rev-list-glob.sh |   16 +++++++++++++++-\n 1 files changed, 15 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex dbedc4d..a1320aa 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -34,7 +34,9 @@ test_expect_success 'setup' '\n \tgit checkout master &&\n \tcommit master2 &&\n \tgit tag foo/bar master &&\n-\tgit update-ref refs/remotes/foo/baz master\n+\tcommit master3 &&\n+\tgit update-ref refs/remotes/foo/baz master &&\n+\tcommit master4\n '\n \n test_expect_success 'rev-parse --glob=refs/heads/subspace/*' '\n@@ -205,4 +207,16 @@ test_expect_success 'rev-list --remotes=foo' '\n \n '\n \n+test_expect_success 'rev-list --locals' '\n+\n+\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--localss\"\n+\n+'\n+\n+test_expect_success 'rev-list --lrbranches' '\n+\n+\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--lrbranches\"\n+\n+'\n+\n test_done\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141597","messageId":"5902e4803a6dcd7cc5911c142dc8c0bca5d2dc55.1273760226.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100505033536.GB8779@coredump.intra.peff.net","subject":"[PATCH 4/4] revlist: Introduce --lrbranches and --locals revision specifiers","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-13T14:24:38Z","receivedAt":"2010-05-13T14:24:38Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Due to the increasing usage of the ref namespace (e.g. notes, replace)\nthe revision specifier \"--all\" becomes decreasingly useful. But\n\"something like --all\" is needed for getting a quick overview of\nthe development state of a repository.\n\nIntroduce --lrbranches and --locals specifiers in order to help with that:\n\n--lrbranches == HEAD --branches --remotes\n--locals = HEAD --branches --tags\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-rev-list.txt     |    2 ++\n Documentation/rev-list-options.txt |    8 ++++++++\n builtin/rev-list.c                 |    2 ++\n revision.c                         |   12 ++++++++++++\n t/t6018-rev-list-glob.sh           |   12 ++++++++----\n 5 files changed, 32 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt\nindex 173f3fc..81d67da 100644\n--- a/Documentation/git-rev-list.txt\n+++ b/Documentation/git-rev-list.txt\n@@ -25,6 +25,8 @@ SYNOPSIS\n \t     [ \\--tags[=pattern] ]\n \t     [ \\--remotes[=pattern] ]\n \t     [ \\--glob=glob-pattern ]\n+\t     [ \\--locals ]\n+\t     [ \\--lrbranches ]\n \t     [ \\--stdin ]\n \t     [ \\--quiet ]\n \t     [ \\--topo-order ]\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex b9fb7a8..21c0c93 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -264,6 +264,14 @@ endif::git-rev-list[]\n \tis automatically prepended if missing. If pattern lacks '?', '*',\n \tor '[', '/*' at the end is implied.\n \n+--locals::\n+\tThis is an abbreviation for `HEAD --branches --tags`, i.e. all\n+\tlocal refs.\n+\n+--lrbranches::\n+\n+\tThis is an abbreviation for `HEAD --branches --remotes`, i.e. all\n+\tlocal and remote branch heads plus HEAD.\n \n ifndef::git-rev-list[]\n --bisect::\ndiff --git a/builtin/rev-list.c b/builtin/rev-list.c\nindex 51ceb19..50664b7 100644\n--- a/builtin/rev-list.c\n+++ b/builtin/rev-list.c\n@@ -20,7 +20,9 @@ static const char rev_list_usage[] =\n \"    --all\\n\"\n \"    --branches\\n\"\n \"    --tags\\n\"\n+\"    --locals\\n\"\n \"    --remotes\\n\"\n+\"    --lrbranches\\n\"\n \"    --stdin\\n\"\n \"    --quiet\\n\"\n \"  ordering output:\\n\"\ndiff --git a/revision.c b/revision.c\nindex f4b8b38..5067fce 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1399,10 +1399,22 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n \t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--locals\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--remotes\")) {\n \t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--lrbranches\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!prefixcmp(arg, \"--glob=\")) {\n \t\t\t\tstruct all_refs_cb cb;\n \t\t\t\tinit_all_refs_cb(&cb, revs, flags);\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex a1320aa..fd77fe5 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -207,15 +207,19 @@ test_expect_success 'rev-list --remotes=foo' '\n \n '\n \n-test_expect_success 'rev-list --locals' '\n+test_expect_success 'rev-list --no-walk --locals' '\n \n-\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--localss\"\n+\tcompare \"rev-list --no-walk\" \\\n+\t\"master subspace-x someref other/three subspace/one subspace/two foo/bar\" \\\n+\t\"--locals\"\n \n '\n \n-test_expect_success 'rev-list --lrbranches' '\n+test_expect_success 'rev-list --no-walk --lrbranches' '\n \n-\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--lrbranches\"\n+\tcompare \"rev-list --no-walk\" \\\n+\t\"master subspace-x someref other/three subspace/one subspace/two foo/baz\" \\\n+\t\"--lrbranches\"\n \n '\n \n-- \n1.7.1.240.geeaa4d\n"},{"id":"141636","messageId":"20100514060612.GA19652@coredump.intra.peff.net","threadId":"23659","inReplyTo":"cover.1273760226.git.git@drmicha.warpmail.net","subject":"Re: [PATCH 0/4] All is too much","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-14T06:06:12Z","receivedAt":"2010-05-14T06:06:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 13, 2010 at 04:24:34PM +0200, Michael J Gruber wrote:\n\n> This series introduces --lrbranches and --locals as abbreviations\n> for \"HEAD --branches --remotes\" (local and remote branches) resp.\n> \"HEAD --branches --tags\" (local refs).\n\nThanks. --lrbranches is still a little ugly to me, but it does address\nmy concern with --heads, and I don't have a better suggestion.\n\nPatch 4/4 itself looks OK. Did you test each part of the series\nindependently, though? It looks like 3/4 tests --lrbranches, which isn't\nintroduced until 4/4.\n\n-Peff\n"},{"id":"141676","messageId":"m3y6fmcx0n.fsf@localhost.localdomain","threadId":"23659","inReplyTo":"725860e3bfc692c7241695ef5f554ff73f277b15.1273760226.git.git@drmicha.warpmail.net","subject":"Re: [PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-14T15:41:19Z","receivedAt":"2010-05-14T15:41:19Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>  NAME\n>  ----\n> -git-rev-parse - Pick out and massage parameters\n> +git-rev-parse - Parse symbolic names into object names\n\nWhat about \"git rev-parse --parseopt\"?  Isn't it massaging parameters?\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"141678","messageId":"4BED7574.4070503@drmicha.warpmail.net","threadId":"23659","inReplyTo":"20100514060612.GA19652@coredump.intra.peff.net","subject":"Re: [PATCH 0/4] All is too much","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T16:08:20Z","receivedAt":"2010-05-14T16:08:20Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jeff King venit, vidit, dixit 14.05.2010 08:06:\n> On Thu, May 13, 2010 at 04:24:34PM +0200, Michael J Gruber wrote:\n> \n>> This series introduces --lrbranches and --locals as abbreviations\n>> for \"HEAD --branches --remotes\" (local and remote branches) resp.\n>> \"HEAD --branches --tags\" (local refs).\n> \n> Thanks. --lrbranches is still a little ugly to me, but it does address\n> my concern with --heads, and I don't have a better suggestion.\n> \n> Patch 4/4 itself looks OK. Did you test each part of the series\n> independently, though? It looks like 3/4 tests --lrbranches, which isn't\n> introduced until 4/4.\n\nSheesh. I did test them individually, of course. That is, before\nreordering with rebase -i and \"fixup!\"ing the last one. I probably\nsquashed them in the wrong order :(\n\nI always get confused by the ordering in the action script, which is\njust the reverse of git log --oneline.\n\nI'm sorry I didn't catch this myself, I'll rerebase-eee asap.\n\nMichael\n"},{"id":"141679","messageId":"F802F7F4D3C2674881AB105A9CD324A804EE0D0D8D@azsmsx504.amr.corp.intel.com","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"Git methodology question","fromName":"Akhbari, Farshad","fromEmail":"farshad.akhbari@intel.com","sentAt":"2010-05-14T16:14:18Z","receivedAt":"2010-05-14T16:14:18Z","isPatch":false,"sender":{"key":"farshad.akhbari@intel.com","avatar":null},"body":"\nAll,\n\nI am trying to setup a \"reliable\" flow with git. I am sort of new to the tool and need some help from the experts. The question pertains to the way SHA1 tags can be back-tracked in parallel clones. Here is the scenario I have in mind:\n\nIn order of time:\nUser1 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_1\nUser2 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_2\nUser3 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_3\n\nIn none of these cases, anyone is updating from each other’s clones\n\nAt the end of the week, the model builder needs to merge and verify all commits from user1, user2 and user3 before pushing into the origin master. \n\nThe question is,\n            Can the model builder use SHA1_3 tag only to get all the updates made by user1, user2 and user3; or all SHA1 tags are needed?\n\n\n\nThanks,\nFarshad.\n"},{"id":"141688","messageId":"cover.1273861341.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"[PATCH v2 0/4] All is too much","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:26:48Z","receivedAt":"2010-05-14T18:26:48Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Resent with correct rebasing/squasing:\n1,2 are unchanged\nThe introduction of tests for the new options is moved from 3 to 4 as\noriginally intended.\n\nMichael J Gruber (4):\n  rev-parse: deprecate use as an option sifter\n  t6018: add tests for rev-list's --branches and --tags\n  t6018: make sure all tested symbolic names are different revs\n  revlist: Introduce --lrbranches and --locals revision specifiers\n\n Documentation/git-rev-list.txt     |    2 ++\n Documentation/git-rev-parse.txt    |   14 ++++++++++----\n Documentation/rev-list-options.txt |    8 ++++++++\n builtin/rev-list.c                 |    2 ++\n revision.c                         |   12 ++++++++++++\n t/t6018-rev-list-glob.sh           |   33 ++++++++++++++++++++++++++++++++-\n 6 files changed, 66 insertions(+), 5 deletions(-)\n"},{"id":"141687","messageId":"725860e3bfc692c7241695ef5f554ff73f277b15.1273861341.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"[PATCH v2 1/4] rev-parse: deprecate use as an option sifter","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:26:49Z","receivedAt":"2010-05-14T18:26:49Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"This command used to be used to distinguish between parameters meant\nfor rev-list and others, but this is deprectated now, and one should not\nrely on rev-parse keeping up to date with rev-list. State this in the\nman page and reword the title according to the primary use (converting\nsymbolic names to SHA1's).\n\nReference: <http://permalink.gmane.org/gmane.comp.version-control.git/146118>\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-rev-parse.txt |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt\nindex 8db600f..99d2a79 100644\n--- a/Documentation/git-rev-parse.txt\n+++ b/Documentation/git-rev-parse.txt\n@@ -3,7 +3,7 @@ git-rev-parse(1)\n \n NAME\n ----\n-git-rev-parse - Pick out and massage parameters\n+git-rev-parse - Parse symbolic names into object names\n \n \n SYNOPSIS\n@@ -13,12 +13,18 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-Many git porcelainish commands take mixture of flags\n+The primary use of 'git rev-parse' is to turn symbolic object names into\n+40-letter object names (\"SHA-1\").\n+\n+Also, many git porcelainish commands take a mixture of flags\n (i.e. parameters that begin with a dash '-') and parameters\n meant for the underlying 'git rev-list' command they use internally\n and flags and parameters for the other commands they use\n-downstream of 'git rev-list'.  This command is used to\n-distinguish between them.\n+downstream of 'git rev-list'.  This command used to be used to\n+distinguish between them, but this is deprectated now, and you should\n+not expect 'git rev-parse' to keep up to date with newer parameters for\n+'git rev-list'. You can use linkgit:git-rev-list[1] directly or\n+linkgit:git-for-each-ref[1] for scripting.\n \n \n OPTIONS\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141690","messageId":"ee2e0da5718c16fbfe65c61de85da8955bb52c63.1273861341.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"[PATCH v2 2/4] t6018: add tests for rev-list's --branches and --tags","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:26:50Z","receivedAt":"2010-05-14T18:26:50Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"so that we know when they break.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t6018-rev-list-glob.sh |   13 +++++++++++++\n 1 files changed, 13 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex 8d3fa7d..dbedc4d 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -162,6 +162,13 @@ test_expect_success 'rev-list --branches=subspace' '\n \tcompare rev-list \"subspace/one subspace/two\" \"--branches=subspace\"\n \n '\n+\n+test_expect_success 'rev-list --branches' '\n+\n+\tcompare rev-list \"master subspace-x someref other/three subspace/one subspace/two\" \"--branches\"\n+\n+'\n+\n test_expect_success 'rev-list --glob=heads/someref/* master' '\n \n \tcompare rev-list \"master\" \"--glob=heads/someref/* master\"\n@@ -186,6 +193,12 @@ test_expect_success 'rev-list --tags=foo' '\n \n '\n \n+test_expect_success 'rev-list --tags' '\n+\n+\tcompare rev-list \"foo/bar\" \"--tags\"\n+\n+'\n+\n test_expect_success 'rev-list --remotes=foo' '\n \n \tcompare rev-list \"foo/baz\" \"--remotes=foo\"\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141689","messageId":"37d27fe11df8bf3dd5c053276ccc068b316717b2.1273861341.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"[PATCH v2 3/4] t6018: make sure all tested symbolic names are different revs","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:26:51Z","receivedAt":"2010-05-14T18:26:51Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n t/t6018-rev-list-glob.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex dbedc4d..58428d9 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -34,7 +34,9 @@ test_expect_success 'setup' '\n \tgit checkout master &&\n \tcommit master2 &&\n \tgit tag foo/bar master &&\n-\tgit update-ref refs/remotes/foo/baz master\n+\tcommit master3 &&\n+\tgit update-ref refs/remotes/foo/baz master &&\n+\tcommit master4\n '\n \n test_expect_success 'rev-parse --glob=refs/heads/subspace/*' '\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141691","messageId":"fdf65c08ac42e4e9123d53a96f2fe49d7bdfd5db.1273861341.git.git@drmicha.warpmail.net","threadId":"23659","inReplyTo":"4BED7574.4070503@drmicha.warpmail.net","subject":"[PATCH v2 4/4] revlist: Introduce --lrbranches and --locals revision specifiers","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:26:52Z","receivedAt":"2010-05-14T18:26:52Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Due to the increasing usage of the ref namespace (e.g. notes, replace)\nthe revision specifier \"--all\" becomes decreasingly useful. But\n\"something like --all\" is needed for getting a quick overview of\nthe development state of a repository.\n\nIntroduce --lrbranches and --locals specifiers in order to help with that:\n\n--lrbranches == HEAD --branches --remotes\n--locals = HEAD --branches --tags\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/git-rev-list.txt     |    2 ++\n Documentation/rev-list-options.txt |    8 ++++++++\n builtin/rev-list.c                 |    2 ++\n revision.c                         |   12 ++++++++++++\n t/t6018-rev-list-glob.sh           |   16 ++++++++++++++++\n 5 files changed, 40 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt\nindex 173f3fc..81d67da 100644\n--- a/Documentation/git-rev-list.txt\n+++ b/Documentation/git-rev-list.txt\n@@ -25,6 +25,8 @@ SYNOPSIS\n \t     [ \\--tags[=pattern] ]\n \t     [ \\--remotes[=pattern] ]\n \t     [ \\--glob=glob-pattern ]\n+\t     [ \\--locals ]\n+\t     [ \\--lrbranches ]\n \t     [ \\--stdin ]\n \t     [ \\--quiet ]\n \t     [ \\--topo-order ]\ndiff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt\nindex b9fb7a8..21c0c93 100644\n--- a/Documentation/rev-list-options.txt\n+++ b/Documentation/rev-list-options.txt\n@@ -264,6 +264,14 @@ endif::git-rev-list[]\n \tis automatically prepended if missing. If pattern lacks '?', '*',\n \tor '[', '/*' at the end is implied.\n \n+--locals::\n+\tThis is an abbreviation for `HEAD --branches --tags`, i.e. all\n+\tlocal refs.\n+\n+--lrbranches::\n+\n+\tThis is an abbreviation for `HEAD --branches --remotes`, i.e. all\n+\tlocal and remote branch heads plus HEAD.\n \n ifndef::git-rev-list[]\n --bisect::\ndiff --git a/builtin/rev-list.c b/builtin/rev-list.c\nindex 51ceb19..50664b7 100644\n--- a/builtin/rev-list.c\n+++ b/builtin/rev-list.c\n@@ -20,7 +20,9 @@ static const char rev_list_usage[] =\n \"    --all\\n\"\n \"    --branches\\n\"\n \"    --tags\\n\"\n+\"    --locals\\n\"\n \"    --remotes\\n\"\n+\"    --lrbranches\\n\"\n \"    --stdin\\n\"\n \"    --quiet\\n\"\n \"  ordering output:\\n\"\ndiff --git a/revision.c b/revision.c\nindex f4b8b38..5067fce 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1399,10 +1399,22 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s\n \t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--locals\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_tag_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(arg, \"--remotes\")) {\n \t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--lrbranches\")) {\n+\t\t\t\thandle_refs(revs, flags, for_each_remote_ref);\n+\t\t\t\thandle_refs(revs, flags, for_each_branch_ref);\n+\t\t\t\thandle_refs(revs, flags, head_ref);\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!prefixcmp(arg, \"--glob=\")) {\n \t\t\t\tstruct all_refs_cb cb;\n \t\t\t\tinit_all_refs_cb(&cb, revs, flags);\ndiff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh\nindex 58428d9..fd77fe5 100755\n--- a/t/t6018-rev-list-glob.sh\n+++ b/t/t6018-rev-list-glob.sh\n@@ -207,4 +207,20 @@ test_expect_success 'rev-list --remotes=foo' '\n \n '\n \n+test_expect_success 'rev-list --no-walk --locals' '\n+\n+\tcompare \"rev-list --no-walk\" \\\n+\t\"master subspace-x someref other/three subspace/one subspace/two foo/bar\" \\\n+\t\"--locals\"\n+\n+'\n+\n+test_expect_success 'rev-list --no-walk --lrbranches' '\n+\n+\tcompare \"rev-list --no-walk\" \\\n+\t\"master subspace-x someref other/three subspace/one subspace/two foo/baz\" \\\n+\t\"--lrbranches\"\n+\n+'\n+\n test_done\n-- \n1.7.1.240.geeaa4d\n"},{"id":"141693","messageId":"4BED9C09.8010801@drmicha.warpmail.net","threadId":"23659","inReplyTo":"m3y6fmcx0n.fsf@localhost.localdomain","subject":"Re: [PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T18:52:57Z","receivedAt":"2010-05-14T18:52:57Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 14.05.2010 17:41:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>>  NAME\n>>  ----\n>> -git-rev-parse - Pick out and massage parameters\n>> +git-rev-parse - Parse symbolic names into object names\n> \n> What about \"git rev-parse --parseopt\"?  Isn't it massaging parameters?\n> \n\nSure it is. But if you read the part of the patch that you cut out (i.e.\nthe comment and relevant diff) you see that the massaging part is the\ndeprecated part of it. That's why I suggest not mentioning it at the\nmost prominent place. (I don't suggest removing that functionality.)\n\nMichael\n"},{"id":"141695","messageId":"201005142101.16317.jnareb@gmail.com","threadId":"23659","inReplyTo":"4BED9C09.8010801@drmicha.warpmail.net","subject":"Re: [PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-05-14T19:01:15Z","receivedAt":"2010-05-14T19:01:15Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia piątek 14. maja 2010 20:52, Michael J Gruber napisał:\n> Jakub Narebski venit, vidit, dixit 14.05.2010 17:41:\n> > Michael J Gruber <git@drmicha.warpmail.net> writes:\n> > \n> >>  NAME\n> >>  ----\n> >> -git-rev-parse - Pick out and massage parameters\n> >> +git-rev-parse - Parse symbolic names into object names\n> > \n> > What about \"git rev-parse --parseopt\"?  Isn't it massaging parameters?\n> > \n> \n> Sure it is. But if you read the part of the patch that you cut out (i.e.\n> the comment and relevant diff) you see that the massaging part is the\n> deprecated part of it. That's why I suggest not mentioning it at the\n> most prominent place. (I don't suggest removing that functionality.)\n\n\"git rev-parse --parseopt\" is not deprecated.  What is deprecated is\n--revs-only, --flags, etc.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"141697","messageId":"4BEDA307.2010400@drmicha.warpmail.net","threadId":"23659","inReplyTo":"201005142101.16317.jnareb@gmail.com","subject":"Re: [PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-05-14T19:22:47Z","receivedAt":"2010-05-14T19:22:47Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 14.05.2010 21:01:\n> Dnia piątek 14. maja 2010 20:52, Michael J Gruber napisał:\n>> Jakub Narebski venit, vidit, dixit 14.05.2010 17:41:\n>>> Michael J Gruber <git@drmicha.warpmail.net> writes:\n>>>\n>>>>  NAME\n>>>>  ----\n>>>> -git-rev-parse - Pick out and massage parameters\n>>>> +git-rev-parse - Parse symbolic names into object names\n>>>\n>>> What about \"git rev-parse --parseopt\"?  Isn't it massaging parameters?\n>>>\n>>\n>> Sure it is. But if you read the part of the patch that you cut out (i.e.\n>> the comment and relevant diff) you see that the massaging part is the\n>> deprecated part of it. That's why I suggest not mentioning it at the\n>> most prominent place. (I don't suggest removing that functionality.)\n> \n> \"git rev-parse --parseopt\" is not deprecated.  What is deprecated is\n> --revs-only, --flags, etc.\n> \n\nStill, I would say that \"massage parameters\" refers to all parameter\nmassaging including '--flags' etc. And, my paragraph about deprecation\nmentions the option sifting part only.\n\nCheers,\nMichael\n"},{"id":"141705","messageId":"AANLkTikCHpIJYsORc2buuZkCNgg3dJAt-r7QuNI_dELv@mail.gmail.com","threadId":"23659","inReplyTo":"F802F7F4D3C2674881AB105A9CD324A804EE0D0D8D@azsmsx504.amr.corp.intel.com","subject":"Re: Git methodology question","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-05-14T21:44:10Z","receivedAt":"2010-05-14T21:44:10Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Fri, May 14, 2010 at 9:14 AM, Akhbari, Farshad\n<farshad.akhbari@intel.com> wrote:\n>\n> All,\n>\n> I am trying to setup a \"reliable\" flow with git. I am sort of new to the tool and need some help from the experts. The question pertains to the way SHA1 tags can be back-tracked in parallel clones. Here is the scenario I have in mind:\n>\n> In order of time:\n> User1 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_1\n> User2 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_2\n> User3 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_3\n>\n> In none of these cases, anyone is updating from each other’s clones\n>\n> At the end of the week, the model builder needs to merge and verify all commits from user1, user2 and user3 before pushing into the origin master.\n>\n> The question is,\n>            Can the model builder use SHA1_3 tag only to get all the updates made by user1, user2 and user3; or all SHA1 tags are needed?\n>\n>\n>\n> Thanks,\n> Farshad.\n>\n\nHi,\n\nI'm not sure if I entirely understand your question. Is \"the model\nbuilder\" a person?\n\nMaking the assumption that it is (the usual term for this would be a\nproject maintainer) then you might wan to have a read of the\n\"DISTRIBUTED WORKFLOWS\" section of the gitworkflows man page [1].\n\nThe short answer, if I've understood your question, is that all 3\ndevelopers will have to submit their work to the maintainer. There are\nvarious mechanisms for this; they can either use \"git format-patch\"\nand \"git send-email\" or request that the maintainer pulls from a\nrepository that they have published (\"git request-pull\" can help by\ngenerating a nicely formatted email message).\n\nAfter the maintainer has applied the changes the developers can then\nuse \"git pull\" to get the latest changes from the origin. This will\ninclude their change and the changes from the other developers and may\nalso  include some merge commits.\n\nAs developers get more advanced they may start working on topic\nbranches and re-basing (or deleting) the branches after the maintainer\nhas applied their changes. Remember that in this case the topic\nbranches are local so the developers can do what they like with them.\nThe maintainer doesn't care _how_ the developers work locally they are\njust concerned with the end result.\n\nHope that helps.\n\n---\n\n[1] http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html#_distributed_workflows\n"},{"id":"141706","messageId":"AANLkTin40FdBUx75c0ENHU6PhsN3tPjy1dK-D6cxPgPX@mail.gmail.com","threadId":"23659","inReplyTo":"F802F7F4D3C2674881AB105A9CD324A804EE0D0D8D@azsmsx504.amr.corp.intel.com","subject":"Re: Git methodology question","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2010-05-14T21:54:48Z","receivedAt":"2010-05-14T21:54:48Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Fri, May 14, 2010 at 12:14 PM, Akhbari, Farshad\n<farshad.akhbari@intel.com> wrote:\n> In order of time:\n> User1 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_1\n> User2 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_2\n> User3 – pulls from the origin; updates, modifies, verifies and commits into his clone. This will generate SHA1_3\n>\n> In none of these cases, anyone is updating from each other’s clones\n>\n> At the end of the week, the model builder needs to merge and verify all commits from user1, user2 and user3 before pushing into the origin master.\n>\n> The question is,\n>            Can the model builder use SHA1_3 tag only to get all the updates made by user1, user2 and user3; or all SHA1 tags are needed?\n\nYou will definitely need all three commit ids (SHA1_* in your words)\nsince all three commits are totally independent from each other.\n\nIn order for someone to *get* all three of those commits, they will\nhave to retrieve them somehow.  Generally, you do it in one of these\nways:\n\n1) Run a git-daemon (or similar) on all three users' machines, and let\nthe model builder 'git pull' from all three servers\n\nor\n\n2) Have all three users 'git push' to a different branch on the\ncentral repo, as in \"git push origin HEAD:user1\", \"git push origin\nHEAD:user2\" and so on, and have the model builder merge all three\nbranches and then push the result back to master.\n\nOf course, you could also have everybody pulling from / pushing to\nmaster directly, but I guess that isn't what you're trying to\naccomplish (it sounds like you want your \"model builder\" to be a\ncentral maintainer who decides what does/doesn't get into the main\ntrunk).\n\nHave fun,\n\nAvery\n"},{"id":"141821","messageId":"201005171626.41175.trast@student.ethz.ch","threadId":"23659","inReplyTo":"201005142101.16317.jnareb@gmail.com","subject":"Re: [PATCH 1/4] rev-parse: deprecate use as an option sifter","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-05-17T14:26:40Z","receivedAt":"2010-05-17T14:26:40Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Jakub Narebski wrote:\n> \n> \"git rev-parse --parseopt\" is not deprecated.  What is deprecated is\n> --revs-only, --flags, etc.\n\ngit-filter-branch uses --revs-only and --no-revs, and I'm not sure how\nit could avoid doing so without losing a lot of flexibility (or\nknowing a list of options, which is worse)...\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}