{"thread":{"id":"50637","subject":"Git log print commits between a revision range (inclusive)","startedAt":"2019-03-04T07:28:32Z","lastAt":"2019-03-05T23:52:22Z","messageCount":5,"participants":["wuzhouhui","Junio C Hamano","Rafael Ascensão"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"370575","messageId":"62307e7b.399f4.169479a611e.Coremail.wuzhouhui14@mails.ucas.ac.cn","threadId":"50637","inReplyTo":null,"subject":"Git log print commits between a revision range (inclusive)","fromName":"wuzhouhui","fromEmail":"wuzhouhui14@mails.ucas.ac.cn","sentAt":"2019-03-04T07:28:13Z","receivedAt":"2019-03-04T07:28:32Z","isPatch":false,"sender":{"key":"wuzhouhui14@mails.ucas.ac.cn","avatar":null},"body":"Hi,\n\nI want to know how to display logs between a revision range (both\nstart and end are inclusive). I searched it and only found[1],\nwhich doesn't resolve my problem completely, because\n\n  git log <older hash>..<newer hash>\n\ndoesn't contains the log of <older hash>. So, how to display\nlogs between a revision range that both start and end are\ninclusive?\n\nPlease CC me, thanks."},{"id":"370576","messageId":"762fc5a4.39a30.169479c8834.Coremail.wuzhouhui14@mails.ucas.ac.cn","threadId":"50637","inReplyTo":"62307e7b.399f4.169479a611e.Coremail.wuzhouhui14@mails.ucas.ac.cn","subject":"Re: Git log print commits between a revision range (inclusive)","fromName":"wuzhouhui","fromEmail":"wuzhouhui14@mails.ucas.ac.cn","sentAt":"2019-03-04T07:30:34Z","receivedAt":"2019-03-04T07:30:47Z","isPatch":false,"sender":{"key":"wuzhouhui14@mails.ucas.ac.cn","avatar":null},"body":"> -----Original Messages-----\n> From: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>\n> Sent Time: 2019-03-04 15:28:13 (Monday)\n> To: git@vger.kernel.org\n> Cc: \n> Subject: Git log print commits between a revision range (inclusive)\n> \n> Hi,\n> \n> I want to know how to display logs between a revision range (both\n> start and end are inclusive). I searched it and only found [1],\n\nSorry for forgetting paste the link of [1]:\n[1] https://stackoverflow.com/questions/18595305/git-log-outputs-in-a-specific-revision-range\n\n> which doesn't resolve my problem completely, because\n> \n>   git log <older hash>..<newer hash>\n> \n> doesn't contains the log of <older hash>. So, how to display\n> logs between a revision range that both start and end are\n> inclusive?\n> \n> Please CC me, thanks.\n"},{"id":"370579","messageId":"xmqq8sxvvzvg.fsf@gitster-ct.c.googlers.com","threadId":"50637","inReplyTo":"62307e7b.399f4.169479a611e.Coremail.wuzhouhui14@mails.ucas.ac.cn","subject":"Re: Git log print commits between a revision range (inclusive)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-04T07:54:11Z","receivedAt":"2019-03-04T07:54:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"wuzhouhui <wuzhouhui14@mails.ucas.ac.cn> writes:\n\n> I want to know how to display logs between a revision range (both\n> start and end are inclusive). I searched it and only found[1],\n> which doesn't resolve my problem completely, because\n>\n>   git log <older hash>..<newer hash>\n>\n> doesn't contains the log of <older hash>.\n\n $ git log maint --not v2.20.0^@\n\ngives you commits that are reachable from (i.e. ancestors of) maint,\nexcluding those that are reachable from the set of commits denoted\nby v2.20.0^@.\n\nv2.20.0^@ is how you spell the set of commits that are parents of\nthe commit v2.20.0.\n\nIf your \"range\" is simple and \"old\" is a single-parent commit,\n\n $ git log <old>~1..<new>\n\nis equivalent, because <old>~1 (i.e. the first parent of commit\n<old>) would be the same as <old>^@ for a single-parent commit, and\nbecause the short-hand \"git log A..B\" is the same as the long-hand\n\"git log B --not A\".\n\n\n\n\n\n\n\n"},{"id":"370767","messageId":"CACUQV5_VCYdBoi=Vz97KVSWipzf+tbi2wrkY1U2h4i78FxVY-w@mail.gmail.com","threadId":"50637","inReplyTo":"xmqq8sxvvzvg.fsf@gitster-ct.c.googlers.com","subject":"Re: Git log print commits between a revision range (inclusive)","fromName":"Rafael Ascensão","fromEmail":"rafa.almas@gmail.com","sentAt":"2019-03-05T23:42:22Z","receivedAt":"2019-03-05T23:43:02Z","isPatch":false,"sender":{"key":"rafa.almas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1923789?v=4"},"body":"As Junio mentioned, \"A..B\" means all commits reachable from B except those\nreachable from A. Understanding this is just a way to say \"B --not A\" is\nimportant to know you can take advantage of:\n\n`--boundary`\n    Output excluded boundary commits. Boundary commits are prefixed with -.\n\nIn other words, git log --boundary <older hash>..<newer hash> should give you\nexactly what you asked with the small caveat it marks excluded commits\ndifferently.\n\n\nCheers,\nRafael Ascensão\n"},{"id":"370772","messageId":"xmqqimwwswum.fsf@gitster-ct.c.googlers.com","threadId":"50637","inReplyTo":"CACUQV5_VCYdBoi=Vz97KVSWipzf+tbi2wrkY1U2h4i78FxVY-w@mail.gmail.com","subject":"Re: Git log print commits between a revision range (inclusive)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-05T23:52:17Z","receivedAt":"2019-03-05T23:52:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Rafael Ascensão <rafa.almas@gmail.com> writes:\n\n> As Junio mentioned, \"A..B\" means all commits reachable from B except those\n> reachable from A. Understanding this is just a way to say \"B --not A\" is\n> important to know you can take advantage of:\n>\n> `--boundary`\n>     Output excluded boundary commits. Boundary commits are prefixed with -.\n>\n> In other words, git log --boundary <older hash>..<newer hash> should give you\n> exactly what you asked with the small caveat it marks excluded commits\n> differently.\n\nYou are correct, but only when dealing with a single strand of\npearls.  If the history leading to <newer> is bushy with merges, the\nabove will give _far_ more than what was requested.  The fork points\nof the side branches that got merged during <old>..<new> will also\nbe shown, in addition to the <old>.\n\n"}]}