[Python-Dev] git history conundrum
Chris Withers
chris at withers.org
Sun Apr 28 03:10:14 EDT 2019
On 28/04/2019 03:51, Martin Panter wrote:
> On Sat, 27 Apr 2019 at 19:07, Chris Withers <chris at withers.org> wrote:
>> Right, so I've merged up to 15f44ab043, what comes next?
>>
>> $ git log --oneline --no-merges 15f44ab043.. -- Lib/unittest/mock.py
>> Lib/unittest/test/testmock/ | tail -n 3
>
> This Git command line means list all the revisions except 15f44ab043
> and those leading up to it.
That seems at odds with what I've found searching online and with the
backporting instructions left in the mock backport docs.
My understanding is that 15f44ab043.. expands out to 15f44ab043..HEAD
and means "all revs between 15f44ab043 and master":
https://stackoverflow.com/a/7693298/216229
Can you explain what leads you to expect that to behave differently?
> The convention at the time was to keep the 3.5 branch merged into
> Default (Master). That is why my 3.5 backport appears in your history
> of Master.
Ah, okay.
> Because you are asked for all the revisions except my backport and its
> ancestors. As far as Git is concerned, the original spelling fixes are
> not an ancestor of my backport.
>
> I don’t have a copy of the Git repository to try, but I suggest the
> following command is what you want:
>
> git log --oneline --no-merges HEAD ^15f44ab043 ^0be894b2f6 --
> Lib/unittest/mock.py Lib/unittest/test/testmock/
What's the best way to spell "show me all the revisions on master that
affect {mock files} from commit x to HEAD, not including x"?
cheers,
Chris
More information about the Python-Dev
mailing list