public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Andrew Myrick <amyrick@apple•com>
Cc: git@vger•kernel.org, sam@vilain•net
Subject: Re: [PATCH 1/2] git-svn: ignore changeless commits when checking for a cherry-pick
Date: Wed, 6 Jan 2010 21:43:38 +0000	[thread overview]
Message-ID: <20100106214338.GA5115@dcvr.yhbt.net> (raw)
In-Reply-To: <1262808529-1575-1-git-send-email-amyrick@apple.com>

Andrew Myrick <amyrick@apple•com> wrote:
> diff --git a/git-svn.perl b/git-svn.perl
> index 650c9e5..8c7c034 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -3052,12 +3052,36 @@ sub check_cherry_pick {
>  	for my $range ( @ranges ) {
>  		delete @commits{_rev_list($range)};
>  	}
> +        for my $commit (keys %commits) {

Hi Andrew,

I'll again defer to Sam for Acks on these.  Test cases would be nice to
have, too.

A few notes:

The prevailing standard for indentation in git is with hard tabs and
that's certainly the case with the rest of git-svn.perl.

> +sub has_no_changes {
> +        my $commit = shift;
> +
> +        my @revs = split / /, command_oneline(
> +                qw(rev-list --parents -1 -m), $commit);
> +
> +        # Commits with no parents, e.g. the start of a partial branch,
> +        # have changes by definition.
> +        return 1 if (@revs < 2);
> +    

I've become very picky about trailing whitespace (from Junio :), too.
"git diff --check" is helpful for this, especially in the pre-commit
hook.

Thanks!

-- 
Eric Wong

  parent reply	other threads:[~2010-01-06 21:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 20:08 [PATCH 1/2] git-svn: ignore changeless commits when checking for a cherry-pick Andrew Myrick
2010-01-06 20:08 ` [PATCH 2/2] git-svn: handle merge-base failures Andrew Myrick
2010-01-06 21:43 ` Eric Wong [this message]
2010-01-06 22:38   ` [spf:guess] Re: [PATCH 1/2] git-svn: ignore changeless commits when checking for a cherry-pick Sam Vilain
2010-01-07  6:49     ` Eric Wong
2010-01-07  9:05       ` [spf:guess] " Sam Vilain
2010-01-06 22:52   ` Andrew Myrick
2010-01-07  0:25     ` Andrew Myrick
2010-01-07  0:25       ` [PATCH 2/2] git-svn: handle merge-base failures Andrew Myrick
2010-01-07  9:50       ` [PATCH 1/2] git-svn: ignore changeless commits when checking for a cherry-pick Eric Wong
2010-01-21 21:55     ` [PATCH] git-svn: update svn mergeinfo test suite Andrew Myrick

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=20100106214338.GA5115@dcvr.yhbt.net \
    --to=normalperson@yhbt$(echo .)net \
    --cc=amyrick@apple$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sam@vilain$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox