git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Uwe Brauer <oub@mat.ucm.es>, git <git@vger.kernel.org>
Subject: Re: I just pulled, and git log --graph does not show all
Date: Wed, 09 Oct 2019 16:36:26 +0300	[thread overview]
Message-ID: <87ftk2oxb9.fsf@mat.ucm.es> (raw)
In-Reply-To: 20191009132345.GH29845@szeder.dev

[-- Attachment #1: Type: text/plain, Size: 3258 bytes --]

>>> "SG" == SZEDER Gábor <szeder.dev@gmail.com> writes:

   > On Wed, Oct 09, 2019 at 09:13:56AM +0300, Uwe Brauer wrote:
   >> Could you please try out 
   >> git clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg

   > This repository contains two branches: 'master' and 'strings'.  From
   > these two 'master' is the default branch, so that is that 'git clone'
   > will check out for you; note the '*' in front of 'master':

Ok hg does the same, so I see the difference is in the git log --graph
command.


   >   $ git branch --all
   >   * master
   >     remotes/origin/HEAD -> origin/master
   >     remotes/origin/master
   >     remotes/origin/strings

   >> Then you will see
   >> 
   >> That 
   >> git log --graph
   >> and
   >> 
   >> git log --graph --all
   >> 
   >> Are giving two different results and I don't understand why the branch
   >> is not shown when using 
   >> 
   >> git log --graph

   > Without any ref parameter 'git log' shows the history starting at the
   > currently checked out commit (in this respect it behaves the same way
   > as 'hg log'), so it only shows the history of 'master'.  'git log
   > --all' means "show the history of all refs in the repository", so it
   > shows the history of the remote branch 'strings' as well.

This is the difference, hg log -G always show all the commit starting
with tip (basically the same as HEAD), the behavior you described would
be 

  hg log -G --follow

   > As far as I can tell all Git commands above behave as they should.

   >> Funny thing is when I use the hg-git plugin and run 
   >> 
   >> hg clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg
   >> 
   >> I see this branch, converted to a hg bookmark.

   > For some reason after cloning that repository with Mercurial and its
   > hg-git plugin it checks out the 'strings' branch:

   >   $ hg bookmarks 
   >      master                    170:6c03da83e522
   >    * strings                   195:b2396f3ceca3

   > Consequently, when you run 'hg log' without a branch/bookmark/whatever
   > parameter it shows the history of the 'strings' branch.

   > I'm not sure what to think about 'hg clone' checking out a branch
   > other than the default branch.  In Git this would definitely be a bug.
   > In Mercurial, I don't know; given my limited experience I don't want
   > to outright call it a bug.  I think it would be worth reporting it to
   > the 'hg-git' project.

No I think the point is not the checkout the point is the  hg log -G
command.

I am now not so sure that really the strings branch/bookmark was checked
out I rather think not.

   > Anyway, in your first email you asked how you can merge that branch
   > into 'master'.  The command 'git merge origin/strings' will "merge" it
   > without actually creating a merge commit, because 'strings' builds
   > entirely on top of 'master'; this is what Git calls a "fast-forward
   > merge".  If you do want a merge commit, then run 'git merge --no-ff
   > origin/strings'.


As this is what I was looking for. I actually don't like fast forward,
so I would use the --no-ff option.

That was very helpful, thanks

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

  reply	other threads:[~2019-10-09 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 10:22 I just pulled, and git log --graph does not show all Uwe Brauer
2019-10-08 23:01 ` SZEDER Gábor
2019-10-09  6:13   ` Uwe Brauer
2019-10-09 12:33     ` Derrick Stolee
2019-10-09 13:23     ` SZEDER Gábor
2019-10-09 13:36       ` Uwe Brauer [this message]
2019-10-09 14:06       ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftk2oxb9.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=git@vger.kernel.org \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).