{"thread":{"id":"36475","subject":"How to trim the fat on my log graphs","startedAt":"2014-04-22T20:50:37Z","lastAt":"2014-04-23T21:02:11Z","messageCount":8,"participants":["Robert Dailey","Junio C Hamano","Jeff King","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"239380","messageId":"CAHd499Bq07mPTR=h-5Gj=NuEQ9WLnK2wL5nxTNMe=LFnKHmvzA@mail.gmail.com","threadId":"36475","inReplyTo":null,"subject":"How to trim the fat on my log graphs","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-04-22T20:50:37Z","receivedAt":"2014-04-22T20:50:37Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"My log graphs are pretty insane sometimes because we converted our\nrepo from SVN and haven't had a chance to delete all of the remote\nbranches. We still have quite a few (maybe 20).\n\nWhen I do `git log`, I am shown about 10-15 vertical lines and the\nbranch I currently have checked out isn't even at the top of the\ngraph, it's burried somewhere one or two pages down. I think this is\nreally confusing and makes my log virtually useless. Here is my log\ncommand:\n\ngit log log --graph --abbrev-commit --decorate --date=relative\n--format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\ngreen)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\nwhite)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n\nI realize the `git log` documentation has a whole section on trimming\nhistory so it is more useful, but after reading that section I am left\ncompletely confused and I have no idea which additional options I can\nadd to trim the fat on my logs.\n\nIdeally what I want, for starters:\n- The branch I'm on should be at the top of the graph (first commit in\nthe log graph should be the tip of my checked out branch).\n- Commits in other branches that are not ancestors of the current\nbranch should not be shown.\n- Merges *into* my branch from other branches should show the graph\nline for that branch but allow me to specify a \"depth\", meaning for\nexample that ancestors that are 3 \"parents\" away\n(great-grandchildren?) will not be rendered (the 3 is an example, I\ncould specify any number)\n\nThe goal is to weed out the really distant and irrelevant commits. I\nreally just want to see the commits that are closely related to my\ncurrent branch. Thanks in advance.\n"},{"id":"239387","messageId":"xmqqtx9l2ggp.fsf@gitster.dls.corp.google.com","threadId":"36475","inReplyTo":"CAHd499Bq07mPTR=h-5Gj=NuEQ9WLnK2wL5nxTNMe=LFnKHmvzA@mail.gmail.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-22T21:37:42Z","receivedAt":"2014-04-22T21:37:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Dailey <rcdailey.lists@gmail.com> writes:\n\n> git log log --graph --abbrev-commit --decorate --date=relative\n> --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\n> green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\n> white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n> ...\n> The goal is to weed out the really distant and irrelevant commits. I\n> really just want to see the commits that are closely related to my\n> current branch. Thanks in advance.\n\nFor a starter, how about dropping \"--branches --remotes\" from that\ncommand line?  A merge from elsewhere will show as \"Merge branch foo\"\nwhich should be sufficient without the decoration.\n"},{"id":"239445","messageId":"CAHd499AovROt2fVAvh-ST9Vb7Hq8LpUS68i4eXWZaNszuKeUfg@mail.gmail.com","threadId":"36475","inReplyTo":"xmqqtx9l2ggp.fsf@gitster.dls.corp.google.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-04-23T16:32:26Z","receivedAt":"2014-04-23T16:32:26Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"Thanks, removing those two options did help quite a bit already.\nHowever, the history can still get pretty crazy. Is there a way to\nhide all tags from the log graph? Really I just want the LABELS to be\nhidden.\n\nOn Tue, Apr 22, 2014 at 4:37 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>\n>> git log log --graph --abbrev-commit --decorate --date=relative\n>> --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\n>> green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\n>> white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n>> ...\n>> The goal is to weed out the really distant and irrelevant commits. I\n>> really just want to see the commits that are closely related to my\n>> current branch. Thanks in advance.\n>\n> For a starter, how about dropping \"--branches --remotes\" from that\n> command line?  A merge from elsewhere will show as \"Merge branch foo\"\n> which should be sufficient without the decoration.\n"},{"id":"239450","messageId":"xmqqha5k0x8c.fsf@gitster.dls.corp.google.com","threadId":"36475","inReplyTo":"CAHd499AovROt2fVAvh-ST9Vb7Hq8LpUS68i4eXWZaNszuKeUfg@mail.gmail.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-23T17:30:43Z","receivedAt":"2014-04-23T17:30:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Dailey <rcdailey.lists@gmail.com> writes:\n\n[Administrivia: because people read from top to bottom / why is it\nbad to top-post? / please do not top-post.]\n\n> On Tue, Apr 22, 2014 at 4:37 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>>\n>>> git log log --graph --abbrev-commit --decorate --date=relative\n>>> --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\n>>> green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\n>>> white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n>>> ...\n>>> The goal is to weed out the really distant and irrelevant commits. I\n>>> really just want to see the commits that are closely related to my\n>>> current branch. Thanks in advance.\n>>\n>> For a starter, how about dropping \"--branches --remotes\" from that\n>> command line?  A merge from elsewhere will show as \"Merge branch foo\"\n>> which should be sufficient without the decoration.\n>\n> Thanks, removing those two options did help quite a bit already.\n> However, the history can still get pretty crazy. Is there a way to\n> hide all tags from the log graph? Really I just want the LABELS to be\n> hidden.\n\nAs you had --decorate and a lot of %C(cruft), I was assuming that\nyou do want to see all the bells and whistles when I suggested to\nomit --branches and --remotes.\n\nIf you do not want --decorate, I think you can omit that from the\ncommand line without changing what the output means.\n"},{"id":"239476","messageId":"CAHd499Cw8=FMctRA49MUi+vP2gvMyXH9WgcfCKK_MrKDEOfvjw@mail.gmail.com","threadId":"36475","inReplyTo":"xmqqha5k0x8c.fsf@gitster.dls.corp.google.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-04-23T19:59:26Z","receivedAt":"2014-04-23T19:59:26Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Wed, Apr 23, 2014 at 12:30 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>\n> [Administrivia: because people read from top to bottom / why is it\n> bad to top-post? / please do not top-post.]\n>\n>> On Tue, Apr 22, 2014 at 4:37 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>>>\n>>>> git log log --graph --abbrev-commit --decorate --date=relative\n>>>> --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\n>>>> green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\n>>>> white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n>>>> ...\n>>>> The goal is to weed out the really distant and irrelevant commits. I\n>>>> really just want to see the commits that are closely related to my\n>>>> current branch. Thanks in advance.\n>>>\n>>> For a starter, how about dropping \"--branches --remotes\" from that\n>>> command line?  A merge from elsewhere will show as \"Merge branch foo\"\n>>> which should be sufficient without the decoration.\n>>\n>> Thanks, removing those two options did help quite a bit already.\n>> However, the history can still get pretty crazy. Is there a way to\n>> hide all tags from the log graph? Really I just want the LABELS to be\n>> hidden.\n>\n> As you had --decorate and a lot of %C(cruft), I was assuming that\n> you do want to see all the bells and whistles when I suggested to\n> omit --branches and --remotes.\n>\n> If you do not want --decorate, I think you can omit that from the\n> command line without changing what the output means.\n\nI referred back to the documentation for --decorate:\n\n--decorate[=short|full|no]\nPrint out the ref names of any commits that are shown. If short is\nspecified, the ref name prefixesrefs/heads/, refs/tags/ and\nrefs/remotes/ will not be printed. If full is specified, the full ref\nname (including prefix) will be printed. The default option is short.\n\nsince default is short, and its documented to exclude tag names, I\nwould expect them to not be there. I also tried removing it to test\nbut i saw no difference; tag names are still visible.\n"},{"id":"239482","messageId":"xmqq1twnztt4.fsf@gitster.dls.corp.google.com","threadId":"36475","inReplyTo":"CAHd499Cw8=FMctRA49MUi+vP2gvMyXH9WgcfCKK_MrKDEOfvjw@mail.gmail.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-23T20:15:18Z","receivedAt":"2014-04-23T20:15:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Dailey <rcdailey.lists@gmail.com> writes:\n\n> On Wed, Apr 23, 2014 at 12:30 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>>\n>> [Administrivia: because people read from top to bottom / why is it\n>> bad to top-post? / please do not top-post.]\n>>\n>>> On Tue, Apr 22, 2014 at 4:37 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>>> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>>>>\n>>>>> git log log --graph --abbrev-commit --decorate --date=relative\n>>>>> --format=format:'%C(bold blue)%h%C(reset)%x09%C(bold\n>>>>> green)(%ar)%C(reset)%C(bold yellow)%d%C(reset) %C(dim\n>>>>> white)%an%C(reset) - %C(white)%s%C(reset)' --branches --remotes\n>>>>> ...\n> ... I also tried removing it to test\n> but i saw no difference; tag names are still visible.\n\nI do not use these eye-candies myself (they are too distracting for\nme), but doesn't \"%d\" in the format string mean \"decorate\"?\n"},{"id":"239488","messageId":"20140423204443.GA20379@sigill.intra.peff.net","threadId":"36475","inReplyTo":"CAHd499Cw8=FMctRA49MUi+vP2gvMyXH9WgcfCKK_MrKDEOfvjw@mail.gmail.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-04-23T20:44:44Z","receivedAt":"2014-04-23T20:44:44Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 23, 2014 at 02:59:26PM -0500, Robert Dailey wrote:\n\n> I referred back to the documentation for --decorate:\n> \n> --decorate[=short|full|no]\n> Print out the ref names of any commits that are shown. If short is\n> specified, the ref name prefixesrefs/heads/, refs/tags/ and\n> refs/remotes/ will not be printed. If full is specified, the full ref\n> name (including prefix) will be printed. The default option is short.\n> \n> since default is short, and its documented to exclude tag names, I\n> would expect them to not be there. I also tried removing it to test\n> but i saw no difference; tag names are still visible.\n\nAre you reading that as \"if short is specified, then refs whose names\nare prefixed with refs/heads, refs/tags, etc will be omitted entirely\nfrom decoration\"?\n\nThe intent is \"if short is specified, then a ref whose names has the\nprefix of refs/heads, refs/tags, etc, will have that prefix removed when\nshowing it\".\n\nIOW, the options are:\n\n  $ git log -1 --no-decorate | head -1\n  commit 0bc85abb7aa9b24b093253018801a0fb43d01122\n\n  $ git log -1 --decorate=short | head -1\n  commit 0bc85abb7aa9b24b093253018801a0fb43d01122 (HEAD, tag: v1.9.2, origin/maint)\n\n  $ git log -1 --decorate=full | head -1\n  commit 0bc85abb7aa9b24b093253018801a0fb43d01122 (HEAD, tag: refs/tags/v1.9.2, refs/remotes/origin/maint)\n\nIf that's the confusion, feel free to suggest better wording for the\ndocumentation.\n\n-Peff\n"},{"id":"239495","messageId":"53582a537972f_24448772ec83@nysa.notmuch","threadId":"36475","inReplyTo":"xmqqha5k0x8c.fsf@gitster.dls.corp.google.com","subject":"Re: How to trim the fat on my log graphs","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-23T21:02:11Z","receivedAt":"2014-04-23T21:02:11Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Junio C Hamano wrote:\n> Robert Dailey <rcdailey.lists@gmail.com> writes:\n> \n> [Administrivia: because people read from top to bottom / why is it\n> bad to top-post? / please do not top-post.]\n\nhttps://en.wikipedia.org/wiki/Posting_style\n\n-- \nFelipe Contreras\n"}]}