List for cgit developers and users
 help / color / mirror / Atom feed
From: list at eworm.de (Christian Hesse)
Subject: [PATCH 1/1] git: update to v2.2.0
Date: Thu, 27 Nov 2014 21:35:50 +0100	[thread overview]
Message-ID: <20141127213550.77eb0a0d@leda.localdomain> (raw)
In-Reply-To: <20141127090551.GA1278@serenity.lan>

John Keeping <john at keeping.me.uk> on Thu, 2014/11/27 09:05:
> On Thu, Nov 27, 2014 at 01:30:56AM +0100, Christian Hesse wrote:
> > Update to git version v2.2.0, including API changes.
> > ---
> [...]
> > diff --git a/ui-repolist.c b/ui-repolist.c
> > index c2bcce1..0e57c53 100644
> > --- a/ui-repolist.c
> > +++ b/ui-repolist.c
> > @@ -17,16 +17,18 @@ static time_t read_agefile(char *path)
> >  	time_t result;
> >  	size_t size;
> >  	char *buf;
> > -	static char buf2[64];
> > +	struct strbuf date_buf = STRBUF_INIT;
> >  
> >  	if (readfile(path, &buf, &size))
> >  		return -1;
> >  
> > -	if (parse_date(buf, buf2, sizeof(buf2)) > 0)
> > -		result = strtoul(buf2, NULL, 10);
> > +	strbuf_reset(&date_buf);
> 
> Why is this necessary?  date_buf hasn't been used since it was
> initialized.

Good point. Probably it is not necessary. ;)
I will reply with an updated patch.

> > +	if (parse_date(buf, &date_buf) == 0)
> > +		result = strtoul(date_buf.buf, NULL, 10);
> >  	else
> >  		result = 0;
> >  	free(buf);
> > +	strbuf_release(&date_buf);
> >  	return result;
> >  }
> >  

-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20141127/ed9571be/attachment.asc>


  reply	other threads:[~2014-11-27 20:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  0:30 list
2014-11-27  9:05 ` john
2014-11-27 20:35   ` list [this message]
2014-11-27 20:41     ` list

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=20141127213550.77eb0a0d@leda.localdomain \
    --to=cgit@lists.zx2c4.com \
    /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).