git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Arnaud Morin <arnaud.morin@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: rev-list with multiple commits sharing same patch-id
Date: Mon, 11 Jan 2021 10:54:18 +0100	[thread overview]
Message-ID: <CAP8UFD3qt4xr4S1BgjPU-vm4qsb=+1JWc=LR_p1CUzTKaAcAoA@mail.gmail.com> (raw)
In-Reply-To: <20210109162440.GM31701@sync>

Hi,

On Sat, Jan 9, 2021 at 5:29 PM Arnaud Morin <arnaud.morin@gmail.com> wrote:

> I am struggling with a rev-list command, hope someone can give me a
> clue on what is going on.

[...]

> However, when using git rev-list to perform a symmetric difference, git
> is giving me a commit ID:
> $ git rev-list --left-right --cherry-pick B...master
> >dbf86d8aafc897a25a3093139b4237a62395041e

It looks like a bug. You might want to check the following test file
and let us know if a similar case is tested in it, or not:

t6007-rev-list-cherry-pick-file.sh

If not, it might be a good idea to add one using 'test_expect_failure'
instead of 'test_expect_success' to document the failure.

Thanks,
Christian.


> Note that this commit is not empty
> $ git show dbf86d8aafc897a25a3093139b4237a62395041e --stat
> commit dbf86d8aafc897a25a3093139b4237a62395041e (origin/master, master)
> Author: Arnaud Morin <hidden@mail>
> Date:   Sat Jan 9 10:30:10 2021 +0100
>
>     remove line2 and add line4 (bis)
>
>  a | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>
>
> So, from git rev-list perspective, there is a diff.
>
> After digging a little bit, the thing is that this commit is having the
> following patch-id:
> $ git show dbf86d8aafc897a25a3093139b4237a62395041e | git patch-id
> 20f4ace68e80a751b07d78a27c94e83d6c5314bc dbf86d8aafc897a25a3093139b4237a62395041e
>
> Which is also already existing in an other commit:
> $ for c in $(git rev-list HEAD) ; do git show $c |git patch-id |grep 20f4ace68e80a751b07d78a27c94e83d6c5314bc; done
> 20f4ace68e80a751b07d78a27c94e83d6c5314bc dbf86d8aafc897a25a3093139b4237a62395041e
> 20f4ace68e80a751b07d78a27c94e83d6c5314bc 8969d3fa9159730fd3b23199873bfb26e3d20027
>
> So, is it normal that rev-list is not able to figure out that a commit
> is existing in both branch when 2 commits share the same patch-id?
>
> Is there any way to prevent rev-list from showing this commit?
>
> Thanks for your help.
>
>
> PS. I have uploaded my test repo here:
> https://gitlab.com/arnaudmorin/git-rev-list
>
>
> --
> Arnaud Morin
>

  parent reply	other threads:[~2021-01-11  9:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09 16:24 rev-list with multiple commits sharing same patch-id Arnaud Morin
2021-01-11  7:59 ` Arnaud Morin
2021-01-11  9:54 ` Christian Couder [this message]
2021-01-11 18:25   ` Arnaud Morin
2021-01-12 14:17 ` Jeff King
2021-01-12 15:11   ` Jeff King
2021-01-12 15:34     ` Arnaud Morin
2021-01-12 15:52       ` [PATCH] patch-ids: handle duplicate hashmap entries Jeff King
2021-01-12 16:24         ` Arnaud Morin
2021-01-12 19:13         ` Junio C Hamano
2021-01-13  9:24           ` Arnaud Morin
2021-01-13 12:59             ` Jeff King
2021-01-13 20:21               ` Junio C Hamano
2021-01-13 20:33                 ` Jeff King
2021-01-13 19:28             ` 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

  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='CAP8UFD3qt4xr4S1BgjPU-vm4qsb=+1JWc=LR_p1CUzTKaAcAoA@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=arnaud.morin@gmail.com \
    --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.
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).