git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: "Uwe Brauer" <oub@mat.ucm.es>, "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: I just pulled, and git log --graph does not show all
Date: Wed, 9 Oct 2019 08:33:22 -0400	[thread overview]
Message-ID: <3a8158f4-03d6-820d-c7b1-ca27b5261863@gmail.com> (raw)
In-Reply-To: <871rvmsaxn.fsf@mat.ucm.es>

On 10/9/2019 2:13 AM, Uwe Brauer wrote:
> 
>    > On Tue, Sep 24, 2019 at 12:22:27PM +0200, Uwe Brauer wrote:
> 
>    > I hear you: I had a brief encounter with Mercurial not that long ago, 
>    > and there were several things that didn't work the way I expected (or 
>    > rather: the way I got used to with Git).  The subtle and sometimes
>    > not-so-subtle differences between the concepts and philosophy of the
>    > two systems might very well explain why Git didn't work the way you
>    > expected.
> 
>    > However, it's impossible to give any explanation or advice without
>    > knowing more about the situation, e.g. at least the exact commands
>    > that you run and what they outputted, if you still have them or at
>    > least if you can still reproduce the issue. (with potentially
>    > sensitive URLs and/or branchnames redacted, if necessary).
> 
> Thanks for your answer.
> 
> Could you please try out 
> git clone https://git.code.sf.net/p/matlab-emacs/src matlab-emacs-hg
> 
> 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
> 
> 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.

"git log --graph" has an implicit "HEAD" added on the end, to say
"start walking from my current commit". The "--all" says "walk from
all refs", so the set of commits to walk is larger.

"git log" defaults to showing history from your current position in
history, so you can look at the recent commits that you have created
or what changes led to your current state. Adding the "--all" gives
you a higher-level view of the repository, but can be very noisy
when trying to discover what has happened for your current state.

In particular, say you are trying to dig into a bug in Git 2.23.0.
A "git checkout v2.23.0" will change your HEAD to be at the commit
used to build that version. You can use "git log" to view the
history leading to that release, and see if you can determine recent
changes that would have caused a regression. If you use "git log --all",
then the commits in the "master" branch will appear before your
current HEAD, and you'll be looking at commits that "haven't happened
yet" according to your current place in history.

I hope this helps.

-Stolee


  reply	other threads:[~2019-10-09 12:33 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 [this message]
2019-10-09 13:23     ` SZEDER Gábor
2019-10-09 13:36       ` Uwe Brauer
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=3a8158f4-03d6-820d-c7b1-ca27b5261863@gmail.com \
    --to=stolee@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=oub@mat.ucm.es \
    --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).