All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: git <git@vger.kernel.org>
Subject: BUG? git log --no-merges shows grafted merges in shallow clones
Date: Fri, 26 Feb 2016 20:49:45 +0100	[thread overview]
Message-ID: <vpq4mcvs146.fsf@anie.imag.fr> (raw)

Hi,

I don't think that's intended. When running "git log --no-merges" in a
shallow clone, and the last commit in the history is a merge commit,
"git log --no-merges" still shows it.

I've just hit this in a test running on a --depth=50 clone on Travis-CI
on git-multimail:

$ git cat-file -p c3c1cc25b27d448e9ef67b265a11be8735ff2df4
tree c341dd60c4b639eac1d6dcc3caffb5d7201c2245
parent b312e3f90dfef73ba0288999981694b09affdf6b
parent 842ac6e867885af041499723dc46f2197705204c
author Matthieu Moy <Matthieu.Moy@imag.fr> 1441031540 +0200
committer Matthieu Moy <Matthieu.Moy@imag.fr> 1441031540 +0200

Merge remote-tracking branch 'edward/utf-8-email-support4'

$ git log --no-merges c3c1cc25b27d448e9ef67b265a11be8735ff2df4
commit c3c1cc25b27d448e9ef67b265a11be8735ff2df4 (grafted)
Author: Matthieu Moy <Matthieu.Moy@imag.fr>
Date:   Mon Aug 31 16:32:20 2015 +0200

    Merge remote-tracking branch 'edward/utf-8-email-support4'

I guess Git counts the number of parents that are actually in the
repository, but it could check the number of "parents" field in the
object (cat-file -p was still able to show 2).

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

             reply	other threads:[~2016-02-26 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 19:49 Matthieu Moy [this message]
2016-02-26 20:00 ` BUG? git log --no-merges shows grafted merges in shallow clones Junio C Hamano
2016-02-26 20:05   ` Matthieu Moy
2016-02-26 20:13     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=vpq4mcvs146.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.