{"thread":{"id":"51909","subject":"I just pulled, and git log --graph does not show all","startedAt":"2019-09-24T10:22:34Z","lastAt":"2019-10-09T14:06:32Z","messageCount":7,"participants":["Uwe Brauer","SZEDER Gábor","Derrick Stolee"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"382842","messageId":"87sgomyows.fsf@mat.ucm.es","threadId":"51909","inReplyTo":null,"subject":"I just pulled, and git log --graph does not show all","fromName":"Uwe Brauer","fromEmail":"oub@mat.ucm.es","sentAt":"2019-09-24T10:22:27Z","receivedAt":"2019-09-24T10:22:34Z","isPatch":false,"sender":{"key":"oub@mat.ucm.es","avatar":null},"body":"\n\n\nHi \n\nI am confused, I just pulled \nbut git log --graph --decorate\ndid not show all commits, \n\nOnly \n\ngit log --graph --decorate --all\n\n and from the emails I received the commits shown by --all\n\nShould be on a new branch.\n\nI confess I am a mercurial user not a git user, \n\nWhat is the reason for this behavior.\n\nHow can I now merge the new branch into master?\n\nThanks\n\nUwe Brauer \n"},{"id":"383713","messageId":"20191008230130.GE29845@szeder.dev","threadId":"51909","inReplyTo":"87sgomyows.fsf@mat.ucm.es","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-10-08T23:01:30Z","receivedAt":"2019-10-08T23:01:36Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Sep 24, 2019 at 12:22:27PM +0200, Uwe Brauer wrote:\n> I am confused, I just pulled \n> but git log --graph --decorate\n> did not show all commits, \n> \n> Only \n> \n> git log --graph --decorate --all\n> \n>  and from the emails I received the commits shown by --all\n> \n> Should be on a new branch.\n> \n> I confess I am a mercurial user not a git user, \n> \n> What is the reason for this behavior.\n> \n> How can I now merge the new branch into master?\n\nI hear you: I had a brief encounter with Mercurial not that long ago, \nand there were several things that didn't work the way I expected (or \nrather: the way I got used to with Git).  The subtle and sometimes\nnot-so-subtle differences between the concepts and philosophy of the\ntwo systems might very well explain why Git didn't work the way you\nexpected.\n\nHowever, it's impossible to give any explanation or advice without\nknowing more about the situation, e.g. at least the exact commands\nthat you run and what they outputted, if you still have them or at\nleast if you can still reproduce the issue. (with potentially\nsensitive URLs and/or branchnames redacted, if necessary).\n\n"},{"id":"383733","messageId":"871rvmsaxn.fsf@mat.ucm.es","threadId":"51909","inReplyTo":"20191008230130.GE29845@szeder.dev","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"Uwe Brauer","fromEmail":"oub@mat.ucm.es","sentAt":"2019-10-09T06:13:56Z","receivedAt":"2019-10-09T06:14:11Z","isPatch":false,"sender":{"key":"oub@mat.ucm.es","avatar":null},"body":"\n   > On Tue, Sep 24, 2019 at 12:22:27PM +0200, Uwe Brauer wrote:\n\n   > I hear you: I had a brief encounter with Mercurial not that long ago, \n   > and there were several things that didn't work the way I expected (or \n   > rather: the way I got used to with Git).  The subtle and sometimes\n   > not-so-subtle differences between the concepts and philosophy of the\n   > two systems might very well explain why Git didn't work the way you\n   > expected.\n\n   > However, it's impossible to give any explanation or advice without\n   > knowing more about the situation, e.g. at least the exact commands\n   > that you run and what they outputted, if you still have them or at\n   > least if you can still reproduce the issue. (with potentially\n   > sensitive URLs and/or branchnames redacted, if necessary).\n\nThanks for your answer.\n\nCould you please try out \ngit clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n\nThen you will see\n\nThat \ngit log --graph\nand\n\ngit log --graph --all\n\nAre giving two different results and I don't understand why the branch\nis not shown when using \n\ngit log --graph\n\nFunny thing is when I use the hg-git plugin and run \n\nhg clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n\nI see this branch, converted to a hg bookmark.\n\n"},{"id":"383747","messageId":"3a8158f4-03d6-820d-c7b1-ca27b5261863@gmail.com","threadId":"51909","inReplyTo":"871rvmsaxn.fsf@mat.ucm.es","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2019-10-09T12:33:22Z","receivedAt":"2019-10-09T12:33:26Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 10/9/2019 2:13 AM, Uwe Brauer wrote:\n> \n>    > On Tue, Sep 24, 2019 at 12:22:27PM +0200, Uwe Brauer wrote:\n> \n>    > I hear you: I had a brief encounter with Mercurial not that long ago, \n>    > and there were several things that didn't work the way I expected (or \n>    > rather: the way I got used to with Git).  The subtle and sometimes\n>    > not-so-subtle differences between the concepts and philosophy of the\n>    > two systems might very well explain why Git didn't work the way you\n>    > expected.\n> \n>    > However, it's impossible to give any explanation or advice without\n>    > knowing more about the situation, e.g. at least the exact commands\n>    > that you run and what they outputted, if you still have them or at\n>    > least if you can still reproduce the issue. (with potentially\n>    > sensitive URLs and/or branchnames redacted, if necessary).\n> \n> Thanks for your answer.\n> \n> Could you please try out \n> git clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n> \n> Then you will see\n> \n> That \n> git log --graph\n> and\n> \n> git log --graph --all\n> \n> Are giving two different results and I don't understand why the branch\n> is not shown when using \n> \n> git log --graph\n> \n> Funny thing is when I use the hg-git plugin and run \n> \n> hg clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n> \n> I see this branch, converted to a hg bookmark.\n\n\"git log --graph\" has an implicit \"HEAD\" added on the end, to say\n\"start walking from my current commit\". The \"--all\" says \"walk from\nall refs\", so the set of commits to walk is larger.\n\n\"git log\" defaults to showing history from your current position in\nhistory, so you can look at the recent commits that you have created\nor what changes led to your current state. Adding the \"--all\" gives\nyou a higher-level view of the repository, but can be very noisy\nwhen trying to discover what has happened for your current state.\n\nIn particular, say you are trying to dig into a bug in Git 2.23.0.\nA \"git checkout v2.23.0\" will change your HEAD to be at the commit\nused to build that version. You can use \"git log\" to view the\nhistory leading to that release, and see if you can determine recent\nchanges that would have caused a regression. If you use \"git log --all\",\nthen the commits in the \"master\" branch will appear before your\ncurrent HEAD, and you'll be looking at commits that \"haven't happened\nyet\" according to your current place in history.\n\nI hope this helps.\n\n-Stolee\n\n"},{"id":"383749","messageId":"20191009132345.GH29845@szeder.dev","threadId":"51909","inReplyTo":"871rvmsaxn.fsf@mat.ucm.es","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-10-09T13:23:45Z","receivedAt":"2019-10-09T13:23:52Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Wed, Oct 09, 2019 at 09:13:56AM +0300, Uwe Brauer wrote:\n> Could you please try out \n> git clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n\nThis repository contains two branches: 'master' and 'strings'.  From\nthese two 'master' is the default branch, so that is that 'git clone'\nwill check out for you; note the '*' in front of 'master':\n\n  $ git branch --all\n  * master\n    remotes/origin/HEAD -> origin/master\n    remotes/origin/master\n    remotes/origin/strings\n\n> Then you will see\n> \n> That \n> git log --graph\n> and\n> \n> git log --graph --all\n> \n> Are giving two different results and I don't understand why the branch\n> is not shown when using \n> \n> git log --graph\n\nWithout any ref parameter 'git log' shows the history starting at the\ncurrently checked out commit (in this respect it behaves the same way\nas 'hg log'), so it only shows the history of 'master'.  'git log\n--all' means \"show the history of all refs in the repository\", so it\nshows the history of the remote branch 'strings' as well.\n\nAs far as I can tell all Git commands above behave as they should.\n\n> Funny thing is when I use the hg-git plugin and run \n> \n> hg clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n> \n> I see this branch, converted to a hg bookmark.\n\nFor some reason after cloning that repository with Mercurial and its\nhg-git plugin it checks out the 'strings' branch:\n\n  $ hg bookmarks \n     master                    170:6c03da83e522\n   * strings                   195:b2396f3ceca3\n\nConsequently, when you run 'hg log' without a branch/bookmark/whatever\nparameter it shows the history of the 'strings' branch.\n\nI'm not sure what to think about 'hg clone' checking out a branch\nother than the default branch.  In Git this would definitely be a bug.\nIn Mercurial, I don't know; given my limited experience I don't want\nto outright call it a bug.  I think it would be worth reporting it to\nthe 'hg-git' project.\n\nAnyway, in your first email you asked how you can merge that branch\ninto 'master'.  The command 'git merge origin/strings' will \"merge\" it\nwithout actually creating a merge commit, because 'strings' builds\nentirely on top of 'master'; this is what Git calls a \"fast-forward\nmerge\".  If you do want a merge commit, then run 'git merge --no-ff\norigin/strings'.\n\n"},{"id":"383750","messageId":"87ftk2oxb9.fsf@mat.ucm.es","threadId":"51909","inReplyTo":"20191009132345.GH29845@szeder.dev","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"Uwe Brauer","fromEmail":"oub@mat.ucm.es","sentAt":"2019-10-09T13:36:26Z","receivedAt":"2019-10-09T13:36:39Z","isPatch":false,"sender":{"key":"oub@mat.ucm.es","avatar":null},"body":">>> \"SG\" == SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n   > On Wed, Oct 09, 2019 at 09:13:56AM +0300, Uwe Brauer wrote:\n   >> Could you please try out \n   >> git clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n\n   > This repository contains two branches: 'master' and 'strings'.  From\n   > these two 'master' is the default branch, so that is that 'git clone'\n   > will check out for you; note the '*' in front of 'master':\n\nOk hg does the same, so I see the difference is in the git log --graph\ncommand.\n\n\n   >   $ git branch --all\n   >   * master\n   >     remotes/origin/HEAD -> origin/master\n   >     remotes/origin/master\n   >     remotes/origin/strings\n\n   >> Then you will see\n   >> \n   >> That \n   >> git log --graph\n   >> and\n   >> \n   >> git log --graph --all\n   >> \n   >> Are giving two different results and I don't understand why the branch\n   >> is not shown when using \n   >> \n   >> git log --graph\n\n   > Without any ref parameter 'git log' shows the history starting at the\n   > currently checked out commit (in this respect it behaves the same way\n   > as 'hg log'), so it only shows the history of 'master'.  'git log\n   > --all' means \"show the history of all refs in the repository\", so it\n   > shows the history of the remote branch 'strings' as well.\n\nThis is the difference, hg log -G always show all the commit starting\nwith tip (basically the same as HEAD), the behavior you described would\nbe \n\n  hg log -G --follow\n\n   > As far as I can tell all Git commands above behave as they should.\n\n   >> Funny thing is when I use the hg-git plugin and run \n   >> \n   >> hg clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg\n   >> \n   >> I see this branch, converted to a hg bookmark.\n\n   > For some reason after cloning that repository with Mercurial and its\n   > hg-git plugin it checks out the 'strings' branch:\n\n   >   $ hg bookmarks \n   >      master                    170:6c03da83e522\n   >    * strings                   195:b2396f3ceca3\n\n   > Consequently, when you run 'hg log' without a branch/bookmark/whatever\n   > parameter it shows the history of the 'strings' branch.\n\n   > I'm not sure what to think about 'hg clone' checking out a branch\n   > other than the default branch.  In Git this would definitely be a bug.\n   > In Mercurial, I don't know; given my limited experience I don't want\n   > to outright call it a bug.  I think it would be worth reporting it to\n   > the 'hg-git' project.\n\nNo I think the point is not the checkout the point is the  hg log -G\ncommand.\n\nI am now not so sure that really the strings branch/bookmark was checked\nout I rather think not.\n\n   > Anyway, in your first email you asked how you can merge that branch\n   > into 'master'.  The command 'git merge origin/strings' will \"merge\" it\n   > without actually creating a merge commit, because 'strings' builds\n   > entirely on top of 'master'; this is what Git calls a \"fast-forward\n   > merge\".  If you do want a merge commit, then run 'git merge --no-ff\n   > origin/strings'.\n\n\nAs this is what I was looking for. I actually don't like fast forward,\nso I would use the --no-ff option.\n\nThat was very helpful, thanks\n\nUwe \n"},{"id":"383752","messageId":"87a7aaovxg.fsf@mat.ucm.es","threadId":"51909","inReplyTo":"20191009132345.GH29845@szeder.dev","subject":"Re: I just pulled, and git log --graph does not show all","fromName":"Uwe Brauer","fromEmail":"oub@mat.ucm.es","sentAt":"2019-10-09T14:06:19Z","receivedAt":"2019-10-09T14:06:32Z","isPatch":false,"sender":{"key":"oub@mat.ucm.es","avatar":null},"body":"\n   > Anyway, in your first email you asked how you can merge that branch\n   > into 'master'.  The command 'git merge origin/strings' will \"merge\" it\n   > without actually creating a merge commit, because 'strings' builds\n   > entirely on top of 'master'; this is what Git calls a \"fast-forward\n   > merge\".  If you do want a merge commit, then run 'git merge --no-ff\n   > origin/strings'.\n\nInterestingly enough it is impossible in mercurial to have a (not ff)\nmerge in mercurial in this situation, because you have only one head\n(linear history) and two bookmarks. That is one thing I dislike in\nmercurial, but it can be easily avoided by using named branches or\ntopics, but any way this is off topic.\n"}]}