git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andy Whitcroft <apw@shadowen.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] mirror pushing
Date: Thu, 8 Nov 2007 15:03:31 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711081441260.4362@racer.site> (raw)
In-Reply-To: <1194531890.0@pinky>

Hi,

On Thu, 8 Nov 2007, Andy Whitcroft wrote:

> -		       nr_refspec, refspec, args.send_all))
> +		       nr_refspec, refspec, args.send_all | (args.send_mirror << 1)))

This line is too long.  But it needsmore love: it's all too magic to have 
a 1 for send_all, and a 2 for mirror.  Please introduce an enum for that 
in remote.h, and use those constants, so that this hunk and the following 
one cannot get out of sync that easily.

> +++ b/remote.c
> @@ -722,10 +722,12 @@ static const struct refspec *check_pattern_match(const struct refspec *rs,
>   * without thinking.
>   */
>  int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
> -	       int nr_refspec, const char **refspec, int all)
> +	       int nr_refspec, const char **refspec, int flags)
>  {
>  	struct refspec *rs =
>  		parse_ref_spec(nr_refspec, (const char **) refspec);
> +	int send_all = flags & 01;
> +	int send_mirror = flags & 02;
>  
>  	if (match_explicit_refs(src, dst, dst_tail, rs, nr_refspec))
>  		return -1;


Thanks,
Dscho

  reply	other threads:[~2007-11-08 15:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 12:11 git push mirror mode Andy Whitcroft
2007-11-08 12:12 ` [PATCH 1/2] mirror pushing Andy Whitcroft
2007-11-08 12:12 ` [PATCH 2/2] git-push: plumb in --mirror mode Andy Whitcroft
2007-11-08 12:19 ` git push mirror mode Johannes Schindelin
2007-11-08 12:44   ` Andy Whitcroft
2007-11-08 13:14     ` Andreas Ericsson
2007-11-08 13:44       ` Andy Whitcroft
2007-11-08 13:48         ` Andreas Ericsson
2007-11-08 12:49   ` Andy Whitcroft
2007-11-08 21:53   ` Junio C Hamano
2007-11-08 14:24 ` [PATCH 1/2] mirror pushing Andy Whitcroft
2007-11-08 15:03   ` Johannes Schindelin [this message]
2007-11-08 14:25 ` [PATCH 2/2] git-push: plumb in --mirror mode Andy Whitcroft
2007-11-08 16:58 ` git push mirror mode V3 Andy Whitcroft
2007-11-08 17:00   ` [PATCH 1/4] mirror pushing Andy Whitcroft
2007-11-08 17:01   ` [PATCH 2/4] mirror pushing -- clean up match_refs flags Andy Whitcroft
2007-11-08 17:01   ` [PATCH 3/4] git-push: plumb in --mirror mode Andy Whitcroft
2007-11-08 17:01   ` [PATCH 4/4] tests: git push mirror mode tests Andy Whitcroft
2007-11-09 10:21     ` [PATCH] tests: git push mirror mode tests V2 Andy Whitcroft
2007-11-09 14:45       ` [PATCH] tests: git push mirror mode tests V2 -- add tag tests Andy Whitcroft
2007-11-09 15:01         ` [PATCH] git-push: add documentation for the newly add --mirror mode Andy Whitcroft
2007-11-09 20:05       ` [PATCH] tests: git push mirror mode tests V2 Junio C Hamano
2007-11-12 15:25         ` Andy Whitcroft

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=Pine.LNX.4.64.0711081441260.4362@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=apw@shadowen.org \
    --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.
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 NNTP newsgroup(s).