All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Bernhard Reiter <ockham@raz.or.at>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] imap-send.c: imap_folder -> imap_server_conf.folder
Date: Wed, 20 Aug 2014 12:16:34 -0700	[thread overview]
Message-ID: <xmqqvbpnt1il.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <53F3C12F.3020606@raz.or.at> (Bernhard Reiter's message of "Tue, 19 Aug 2014 23:27:11 +0200")

Bernhard Reiter <ockham@raz.or.at> writes:

> Rename the imap_folder variable to folder and make it a member
> of struct imap_server_conf.
>
> Signed-off-by: Bernhard Reiter <ockham@raz.or.at>
> ---
> As discussed in
> http://www.mail-archive.com/git@vger.kernel.org/msg57019.html
>
> Bernhard
>
>  imap-send.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/imap-send.c b/imap-send.c
> index fb01a9c..05a02b5 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -69,6 +69,7 @@ struct imap_server_conf {
>  	char *tunnel;
>  	char *host;
>  	int port;
> +	char *folder;
>  	char *user;
>  	char *pass;
>  	int use_ssl;
> @@ -82,6 +83,7 @@ static struct imap_server_conf server = {
>  	NULL,	/* tunnel */
>  	NULL,	/* host */
>  	0,	/* port */
> +	NULL,	/* folder */
>  	NULL,	/* user */
>  	NULL,	/* pass */
>  	0,   	/* use_ssl */
> @@ -1323,8 +1325,6 @@ static int split_msg(struct strbuf *all_msgs,
> struct strbuf *msg, int *ofs)
>  	return 1;
>  }
>  -static char *imap_folder;
> -
>  static int git_imap_config(const char *key, const char *val, void *cb)
>  {
>  	if (!skip_prefix(key, "imap.", &key))

The patch is corrupt; even though it claims to be text/plain, it
smells like some sort of text/flawed, but it is even worse.  Even
the line counts on @@ lines do not match what is in the patch text.

I wiggled it in so there is no need to resend, but please double
check your outgoing mail toolchain (sending the patch first to
yourself in exactly the same way as you would later send it to the
list and checking what comes out would be one good way to check).

Thanks.

> @@ -1339,7 +1339,7 @@ static int git_imap_config(const char *key, const
> char *val, void *cb)
>  		return config_error_nonbool(key);
>   	if (!strcmp("folder", key)) {
> -		imap_folder = xstrdup(val);
> +		server.folder = xstrdup(val);
>  	} else if (!strcmp("host", key)) {
>  		if (starts_with(val, "imap:"))
>  			val += 5;
> @@ -1387,7 +1387,7 @@ int main(int argc, char **argv)
>  	if (!server.port)
>  		server.port = server.use_ssl ? 993 : 143;
>  -	if (!imap_folder) {
> +	if (!server.folder) {
>  		fprintf(stderr, "no imap store specified\n");
>  		return 1;
>  	}
> @@ -1424,7 +1424,7 @@ int main(int argc, char **argv)
>  	}
>   	fprintf(stderr, "sending %d message%s\n", total, (total != 1) ? "s" :
> "");
> -	ctx->name = imap_folder;
> +	ctx->name = server.folder;
>  	while (1) {
>  		unsigned percent = n * 100 / total;
>  -- 2.1.0.3.g63c96dd

      reply	other threads:[~2014-08-20 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 21:27 [PATCH] imap-send.c: imap_folder -> imap_server_conf.folder Bernhard Reiter
2014-08-20 19:16 ` Junio C Hamano [this message]

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=xmqqvbpnt1il.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ockham@raz.or.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.