control: -1 tags -patch

Hi Ian,

Thanks!

On Fri, Aug 17, 2018 at 11:38:22AM +0100, Iain Lane wrote:
[..snip..]
> Don't let this stop you from merging the commit (I don't know if I'll
> have time to write this patch soon if it's the right idea and I have the
> other one already which works), but is there a reason why we don't use
> e.g. "git ls-tree -r --name-only pristine-tar" and look at the filenames
> in the branch directly?

We do that to get the last used compression type. If we do a ls-tree
or even `pristine-tar list` we have no ordering.

Patch is mostly good but we must not break other grep_log users so
changing the signature to

     def grep_log(self, regex, since=None, merges=True):

and calling it with False in your case would be the right thing. I try
to get around to add this before the next release (which is long overdue
too).
Cheers,
 -- Guido


> 
> Cheers,
> 
> -- 
> Iain Lane                                  [ i...@orangesquash.org.uk ]
> Debian Developer                                   [ la...@debian.org ]
> Ubuntu Developer                                   [ la...@ubuntu.com ]

> From 0e222c0591aec4d9b2644e951b2a07f6205d71c3 Mon Sep 17 00:00:00 2001
> From: Iain Lane <la...@debian.org>
> Date: Fri, 17 Aug 2018 11:22:01 +0100
> Subject: [PATCH] Ignore merge commits when looking at the pristine-tar branch
> 
> When there is a merge commit in this branch, we currently get the
> warning:
> 
>   gbp:warning: Unknown compression type of Merge branch 'pristine-tar' into 
> 'pristine-tar', assuming gzip
> 
> because we're grepping the commit logs to find out the compression type
> of the tarballs in there.
> 
> For now, we can just use `git log ... --no-merges' to not see these
> commits.
> ---
>  gbp/git/repository.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gbp/git/repository.py b/gbp/git/repository.py
> index 1fc92ee9..19778710 100644
> --- a/gbp/git/repository.py
> +++ b/gbp/git/repository.py
> @@ -1654,7 +1654,7 @@ class GitRepository(object):
>          @param since: where to start grepping (e.g. a branch)
>          @type since: C{str}
>          """
> -        args = ['--pretty=format:%H']
> +        args = ['--pretty=format:%H', '--no-merges']
>          args.append("--grep=%s" % regex)
>          if since:
>              args.append(since)
> -- 
> 2.17.1
> 

Reply via email to