{"thread":{"id":"36368","subject":"git log for only certain branches","startedAt":"2014-04-08T13:43:45Z","lastAt":"2014-04-08T19:26:05Z","messageCount":5,"participants":["Robert Dailey","Matthieu Moy","Michal Sojka","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"238532","messageId":"CAHd499BSgxZ8EC1qKYRsF0hac6rQAegw9qTOoDjaiuh_UUVEng@mail.gmail.com","threadId":"36368","inReplyTo":null,"subject":"git log for only certain branches","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-04-08T13:43:45Z","receivedAt":"2014-04-08T13:43:45Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"I have more details about my inquiry on StackOverflow:\nhttp://stackoverflow.com/questions/22823768/view-git-log-with-merges-for-only-certain-branches\n\nBasically I'd like to know if it is possible to show the graph for\nONLY branches that I list. The key here is that the graph should also\nshow relationships between only those branches that I list. In other\nwords, any ancestors that I do not explicitly specify should not be\nrendered in the graph.\n\nI have an insanely huge number of branches in my git repo (we\ntransitioned from SVN so we haven't had a chance to clean them up\nyet). As a result, the git log graph I see has literally 10-20\nvertical lines and I have to scroll 20+ pages to follow a line to a\nparticular parent branch.\n"},{"id":"238541","messageId":"vpqioqjlpf7.fsf@anie.imag.fr","threadId":"36368","inReplyTo":"CAHd499BSgxZ8EC1qKYRsF0hac6rQAegw9qTOoDjaiuh_UUVEng@mail.gmail.com","subject":"Re: git log for only certain branches","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-04-08T17:08:28Z","receivedAt":"2014-04-08T17:08:28Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Robert Dailey <rcdailey.lists@gmail.com> writes:\n\n> I have more details about my inquiry on StackOverflow:\n> http://stackoverflow.com/questions/22823768/view-git-log-with-merges-for-only-certain-branches\n>\n> Basically I'd like to know if it is possible to show the graph for\n> ONLY branches that I list.\n\nNot sure it'll directly answer your question, but did you read the\n\"History Simplification\" part of \"git log --help\"?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"238542","messageId":"87bnwb4u5u.fsf@steelpick.2x.cz","threadId":"36368","inReplyTo":"CAHd499BSgxZ8EC1qKYRsF0hac6rQAegw9qTOoDjaiuh_UUVEng@mail.gmail.com","subject":"Re: git log for only certain branches","fromName":"Michal Sojka","fromEmail":"sojkam1@fel.cvut.cz","sentAt":"2014-04-08T17:18:05Z","receivedAt":"2014-04-08T17:18:05Z","isPatch":false,"sender":{"key":"sojkam1@fel.cvut.cz","avatar":"https://avatars.githubusercontent.com/u/140542?v=4"},"body":"On Tue, Apr 08 2014, Robert Dailey wrote:\n> I have more details about my inquiry on StackOverflow:\n> http://stackoverflow.com/questions/22823768/view-git-log-with-merges-for-only-certain-branches\n>\n> Basically I'd like to know if it is possible to show the graph for\n> ONLY branches that I list. The key here is that the graph should also\n> show relationships between only those branches that I list. In other\n> words, any ancestors that I do not explicitly specify should not be\n> rendered in the graph.\n\nWhat about using ^<branch> notation to exclude certain branches? See for\nexample SPECIFYING RANGES in git-rev-parse(1).\n\n-Michal\n"},{"id":"238556","messageId":"CAHd499B2QWrdi=NNH5r6QMf7PcduuW9QW=0mLohgXTViAb-2Hw@mail.gmail.com","threadId":"36368","inReplyTo":"vpqioqjlpf7.fsf@anie.imag.fr","subject":"Re: git log for only certain branches","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-04-08T19:15:05Z","receivedAt":"2014-04-08T19:15:05Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Tue, Apr 8, 2014 at 12:08 PM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Robert Dailey <rcdailey.lists@gmail.com> writes:\n>\n>> I have more details about my inquiry on StackOverflow:\n>> http://stackoverflow.com/questions/22823768/view-git-log-with-merges-for-only-certain-branches\n>>\n>> Basically I'd like to know if it is possible to show the graph for\n>> ONLY branches that I list.\n>\n> Not sure it'll directly answer your question, but did you read the\n> \"History Simplification\" part of \"git log --help\"?\n\nyes I did happen to read it but it makes my head spin. There's just\ntoo much information there for me. I don't really know what\ncombination of options would give me what I want. However, it does\nseem like the answer is in there somewhere.\n"},{"id":"238559","messageId":"xmqqvbuj39o2.fsf@gitster.dls.corp.google.com","threadId":"36368","inReplyTo":"CAHd499BSgxZ8EC1qKYRsF0hac6rQAegw9qTOoDjaiuh_UUVEng@mail.gmail.com","subject":"Re: git log for only certain branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-08T19:26:05Z","receivedAt":"2014-04-08T19:26:05Z","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> I have more details about my inquiry on StackOverflow:\n> http://stackoverflow.com/questions/22823768/view-git-log-with-merges-for-only-certain-branches\n>\n> Basically I'd like to know if it is possible to show the graph for\n> ONLY branches that I list. The key here is that the graph should also\n> show relationships between only those branches that I list. In other\n> words, any ancestors that I do not explicitly specify should not be\n> rendered in the graph.\n>\n> I have an insanely huge number of branches in my git repo (we\n> transitioned from SVN so we haven't had a chance to clean them up\n> yet). As a result, the git log graph I see has literally 10-20\n> vertical lines and I have to scroll 20+ pages to follow a line to a\n> particular parent branch.\n\nI do not quite get this part (note that it is impolite to ask people\nto go to stackoverflow or any external site to answer questions\nasked here, but I am making an exception today):\n\n  $ git log --oneline --graph origin/master origin/topic1\n\n  It will show all branches anyway, even though I've specified I only\n  want to see two of them.\n\nThese should show commits reachable from these two branches,\norigin/master and origin/topic1, and nothing else.\n\n  $ git log --oneline --graph \\\n    origin/master origin/topic1 \\\n    --not $(git merge-base --all origin/master origin/topic1)\n\nwould stop where the histories of these two branches meet (assuming\nthat you consider that the common ancestors of these two not\ninteresting when you say \"all branches anyway\", but these common\nancestors are still part of these two branches ;-).\n"}]}