{"thread":{"id":"25336","subject":"branch versioning","startedAt":"2010-10-04T13:18:59Z","lastAt":"2010-10-04T14:33:38Z","messageCount":8,"participants":["Nguyen Thai Ngoc Duy","Matthieu Moy","Ævar Arnfjörð Bjarmason","Michael J Gruber","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"152523","messageId":"AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com","threadId":"25336","inReplyTo":null,"subject":"branch versioning","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-10-04T13:18:59Z","receivedAt":"2010-10-04T13:18:59Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"Hi,\n\nHow do you guys manage versions of a topic branch? I usually end up\nsaving format-patch series somewhere or forget all old versions.\nAlthough I really want to keep old versions around. reflog to me   is\npolluted with every kind of branch updates. And it's local\ninformation. It can't be transferred to another repo (or can it?)\n\nOn the same subject, I have quite a few old topic branches that I\nrarely touch. I don't want to remove them. I just want to hide them\naway from \"git branch\". I've been thinking of \"attic/\" namespace that\n\"git branch\" by default will not show. Just wondering if other people\nface the same problem..\n-- \nDuy\n"},{"id":"152524","messageId":"vpqpqvqjdj1.fsf@bauges.imag.fr","threadId":"25336","inReplyTo":"AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com","subject":"Re: branch versioning","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-10-04T13:25:22Z","receivedAt":"2010-10-04T13:25:22Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> Hi,\n>\n> How do you guys manage versions of a topic branch? I usually end up\n> saving format-patch series somewhere or forget all old versions.\n> Although I really want to keep old versions around. reflog to me   is\n> polluted with every kind of branch updates. And it's local\n> information. It can't be transferred to another repo (or can it?)\n\nI don't have strong needs in branch-versionning, so usually, the\nreflog is OK for me. When I need to save something, I set a tag on the\ncurrent version of the branch before continuing (that's somehow manual\nversionning: the tag isn't versionned, so if I actually need history,\nI'll set several tags like refs/tags/sent-to-list-as-v1\nrefs/tags/before-starting-rebase, ...).\n\nBut other tools like stgit, topgit & friends may help to manage that\nin a cleaner way.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"152525","messageId":"AANLkTi=73Siu9O1WT8MdjfAEO5j5y=CkOAiof0z83L=c@mail.gmail.com","threadId":"25336","inReplyTo":"AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com","subject":"Re: branch versioning","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-04T13:29:55Z","receivedAt":"2010-10-04T13:29:55Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Oct 4, 2010 at 13:18, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:\n> How do you guys manage versions of a topic branch? I usually end up\n> saving format-patch series somewhere or forget all old versions.\n> Although I really want to keep old versions around. reflog to me   is\n> polluted with every kind of branch updates. And it's local\n> information. It can't be transferred to another repo (or can it?)\n\nI usually have foo, foo-v2, foo-v3 which eventually gets reset back to\nfoo once I'm sure nobody cares about the initial one or foo-v2. It's\nvery chaotic.\n\nSo my git.git on GitHub is up to 123 branches, and I don't even want\nto know what my personal git.git is at. I also save my outgoing\nformat-patch E-Mails, but would probably do less of that if there was\nsupport for attaching the comments after the diffstat in a git-note or\nsomething.\n"},{"id":"152526","messageId":"4CA9DA38.3070103@drmicha.warpmail.net","threadId":"25336","inReplyTo":"AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com","subject":"Re: branch versioning","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-10-04T13:44:24Z","receivedAt":"2010-10-04T13:44:24Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Nguyen Thai Ngoc Duy venit, vidit, dixit 04.10.2010 15:18:\n> Hi,\n> \n> How do you guys manage versions of a topic branch? I usually end up\n> saving format-patch series somewhere or forget all old versions.\n> Although I really want to keep old versions around. reflog to me   is\n> polluted with every kind of branch updates. And it's local\n> information. It can't be transferred to another repo (or can it?)\n> \n> On the same subject, I have quite a few old topic branches that I\n> rarely touch. I don't want to remove them. I just want to hide them\n> away from \"git branch\". I've been thinking of \"attic/\" namespace that\n> \"git branch\" by default will not show. Just wondering if other people\n> face the same problem..\n\nSame problem, without a perfect solution. I have a branch mjg/foo for a\ntopic in flight. If I need to submit v2, I tag the old tip mjg/foo-v1\nand rebase -i, etc. Once a patch gets accepted, I do:\n\n- Merge the git.git commit with the applied patch to mjg/foo (with a\nmessage like \"Applied as commit deadbeef on next). The merge diff shows\nthe differences between my patch and the actual commit on git.git.\n- Tag the tip as mjg/applied/foo.\n- Delete the branch.\n- Delete the branch on my repos if it has been pushed out already (this\npoint sucks).\n\nThat way my branch namespace is reasonably clean, and the graph view on\ngithub, e.g., is somewhat meaningful. My tag name space is a bit crowded...\n\nI also keep the commit notes (post ---) in a note ;)\n\nMichael\n"},{"id":"152527","messageId":"AANLkTinR31x9NrsHoDt3UQ8w=hioPGtkQDkQ-5bSNW69@mail.gmail.com","threadId":"25336","inReplyTo":"AANLkTi=73Siu9O1WT8MdjfAEO5j5y=CkOAiof0z83L=c@mail.gmail.com","subject":"Re: branch versioning","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-10-04T13:50:54Z","receivedAt":"2010-10-04T13:50:54Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On 10/4/10, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> On Mon, Oct 4, 2010 at 13:18, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:\n>  > How do you guys manage versions of a topic branch? I usually end up\n>  > saving format-patch series somewhere or forget all old versions.\n>  > Although I really want to keep old versions around. reflog to me   is\n>  > polluted with every kind of branch updates. And it's local\n>  > information. It can't be transferred to another repo (or can it?)\n>\n>\n> I usually have foo, foo-v2, foo-v3 which eventually gets reset back to\n>  foo once I'm sure nobody cares about the initial one or foo-v2. It's\n>  very chaotic.\n\nYou remind me of my ~100 patch rebase/refactor on busybox-w32. I had\nup to master.7 :)\n\n>  So my git.git on GitHub is up to 123 branches, and I don't even want\n>  to know what my personal git.git is at. I also save my outgoing\n>  format-patch E-Mails, but would probably do less of that if there was\n>  support for attaching the comments after the diffstat in a git-note or\n>  something.\n\nOK. Thanks for the information. I'll try my best to stay away from\nyour repo :-D. Seriously, how can you select a branch out of those 123\nbranches? Does git-branch support regex matching or.. (looked up\ngit-branch.txt, no it does not)\n-- \nDuy\n"},{"id":"152531","messageId":"20101004141031.GA8349@do","threadId":"25336","inReplyTo":"4CA9DA38.3070103@drmicha.warpmail.net","subject":"Re: branch versioning","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-10-04T14:10:31Z","receivedAt":"2010-10-04T14:10:31Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Oct 04, 2010 at 03:44:24PM +0200, Michael J Gruber wrote:\n> That way my branch namespace is reasonably clean, and the graph view on\n> github, e.g., is somewhat meaningful. My tag name space is a bit crowded...\n\nThis might help you. I don't know. I think the idea is good, but you may\nneed a negative pattern, or multiple patterns... Just a starting point.\n\nIf I git-branch supported pattern matching and negative pattern, then\nmy \"attic/\" hidden namespace would be solved. Hmm..\n\n>From 461bd140c71fc242470c08523bc7becefb9aa2cf Mon Sep 17 00:00:00 2001\nFrom: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= <pclouds@gmail.com>\nDate: Mon, 4 Oct 2010 21:05:54 +0700\nSubject: [PATCH] tag: add core.taglist to let user customize \"git tag -l\"\n\nBe default \"git tag\" alone (or \"git tag -l\") will list all tags.\nLet user specify how they want to list in this case via core.taglist\n---\n Documentation/git-tag.txt |    3 ++-\n builtin/tag.c             |    7 ++++++-\n 2 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\nindex 31c78a8..770d1d8 100644\n--- a/Documentation/git-tag.txt\n+++ b/Documentation/git-tag.txt\n@@ -69,7 +69,8 @@ OPTIONS\n \n -l <pattern>::\n \tList tags with names that match the given pattern (or all if no pattern is given).\n-\tTyping \"git tag\" without arguments, also lists all tags.\n+\tTyping \"git tag\" without arguments, also lists all tags matched\n+\tby core.taglist ('*' if undefined)\n \n --contains <commit>::\n \tOnly list tags which contain the specified commit.\ndiff --git a/builtin/tag.c b/builtin/tag.c\nindex d311491..33620f6 100644\n--- a/builtin/tag.c\n+++ b/builtin/tag.c\n@@ -22,6 +22,7 @@ static const char * const git_tag_usage[] = {\n };\n \n static char signingkey[1000];\n+static const char *default_pattern = \"*\";\n \n struct tag_filter {\n \tconst char *pattern;\n@@ -96,7 +97,7 @@ static int list_tags(const char *pattern, int lines,\n \tstruct tag_filter filter;\n \n \tif (pattern == NULL)\n-\t\tpattern = \"*\";\n+\t\tpattern = default_pattern;\n \n \tfilter.pattern = pattern;\n \tfilter.lines = lines;\n@@ -234,6 +235,10 @@ static int git_tag_config(const char *var, const char *value, void *cb)\n \t\tset_signingkey(value);\n \t\treturn 0;\n \t}\n+\tif (!strcmp(var, \"core.taglist\")) {\n+\t\tgit_config_string(&default_pattern, var, value);\n+\t\treturn 0;\n+\t}\n \n \treturn git_default_config(var, value, cb);\n }\n-- \n1.7.0.2.445.gcbdb3\n-- \nDuy\n"},{"id":"152532","messageId":"AANLkTikSpWhrtyAv73b=SQmUM0oTpVKWLgr16oUfrjXH@mail.gmail.com","threadId":"25336","inReplyTo":"AANLkTinR31x9NrsHoDt3UQ8w=hioPGtkQDkQ-5bSNW69@mail.gmail.com","subject":"Re: branch versioning","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-04T14:16:58Z","receivedAt":"2010-10-04T14:16:58Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Oct 4, 2010 at 13:50, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:\n\n> OK. Thanks for the information. I'll try my best to stay away from\n> your repo :-D. Seriously, how can you select a branch out of those 123\n> branches? Does git-branch support regex matching or.. (looked up\n> git-branch.txt, no it does not)\n\nI usually only have 1-4 branches active at any one point, so it\ndoesn't get too bad.\n\nI also have a special tag in my E-Mail folder for patches that Junio\nhasn't picked up yet or those that I need to work on. It's currently\nat around 200 patches :)\n\nI mostly select branches with Emacs's magit which has a fuzzy regex\nbased selector. \"git branch -a | grep ...\" also works.\n\nIt also helps to use long descriptive branch names, e.g.:\n\n  run-partial-expensive-git-notes-test-everywhere\n  run-partial-expensive-git-notes-test-everywhere-v2\n"},{"id":"152534","messageId":"4CA9E5C2.9040406@dbservice.com","threadId":"25336","inReplyTo":"AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com","subject":"Re: branch versioning","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-10-04T14:33:38Z","receivedAt":"2010-10-04T14:33:38Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 10/4/10 3:18 PM, Nguyen Thai Ngoc Duy wrote:\n> Hi,\n> \n> How do you guys manage versions of a topic branch? I usually end up\n> saving format-patch series somewhere or forget all old versions.\n> Although I really want to keep old versions around. reflog to me   is\n> polluted with every kind of branch updates. And it's local\n> information. It can't be transferred to another repo (or can it?)\n> \n> On the same subject, I have quite a few old topic branches that I\n> rarely touch. I don't want to remove them. I just want to hide them\n> away from \"git branch\". I've been thinking of \"attic/\" namespace that\n> \"git branch\" by default will not show. Just wondering if other people\n> face the same problem..\n\nThere was a blog post from someone suggesting how to extend rebase to\ntrack the old and new commits so the old ones don't get lost (sadly I\ncan't find the blog post anymore). The idea was to add the old commit as\nthe second parent to the newly rebased commits. This way you can track\nthe evolution of commits across multiple iterations. You could do the\nsame with topic branches: after you create the new version of the topic\nbranch, add the old topic branch as the second parent of the new branch\nhead (use merge -s ours to discard changes made by the old topic\nbranch). And to submit the commits in a topic branch for review you'd\nuse --first-parent.\n\ntom\n"}]}