bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils] Re: new branch in gnulib: coreutils-8.9


From: Eric Blake
Subject: Re: [coreutils] Re: new branch in gnulib: coreutils-8.9
Date: Tue, 04 Jan 2011 15:08:27 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/04/2011 03:01 PM, Eric Blake wrote:
> Found one, and it even works on libvirt (where the gnulib submodule is
> named .gnulib instead of gnulib).  It should also work on a repository
> with multiple submodules, although I have not yet tested it on bison.git.
> 
> gnulib-commit-check:
>       git submodule foreach test '$$(git merge-base --independent \
>         origin $$sha1 | wc -w)' = 1
> 
> This effectively runs the shell command:
> 
> git merge-base --independent origin $sha1
> 
> with $sha1 set to the value recorded in the superproject (identical to
> your computation of $commit), and outputs the minimal set of revisions
> not reachable from any other in the set of arguments.  If origin
> contains $sha1, the output is a single hash (it happens to be that of
> origin); if $sha1 is a local-only revision, the output is two hashes, so
> the test fails, which in turn lets 'make alpha' fail.

Not quite robust enough - if your superproject contains commits not
pushed upstream yet, then merge-base would still output a single
reference.  This should close that gap, by requiring that the least
reachable commit be exactly the upstream origin.

gnulib-commit-check:
        git submodule foreach test '$$(git rev-parse origin)' \
          = '"$$(git merge-base --independent origin $$sha1)"'

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]