From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: git log doesn't allow %x00 in custom format anymore? Date: Thu, 7 Oct 2010 13:50:48 -0400 Message-ID: <20101007175048.GA18518@sigill.intra.peff.net> References: <20101007141015.GB8162@sigill.intra.peff.net> <5BA0D807-C5C0-4797-82CD-5D5087496D6F@jetbrains.com> <4CADE232.8030801@viscovery.net> <20101007172939.GA12130@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kirill Likhodedov , Johannes Sixt , git@vger.kernel.org To: Erik Faye-Lund X-From: git-owner@vger.kernel.org Thu Oct 07 19:51:09 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P3ucW-0000yV-W3 for gcvg-git-2@lo.gmane.org; Thu, 07 Oct 2010 19:51:09 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753898Ab0JGRuh convert rfc822-to-quoted-printable (ORCPT ); Thu, 7 Oct 2010 13:50:37 -0400 Received: from xen6.gtisc.gatech.edu ([143.215.130.70]:54534 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753872Ab0JGRug (ORCPT ); Thu, 7 Oct 2010 13:50:36 -0400 Received: (qmail 19456 invoked by uid 111); 7 Oct 2010 17:50:35 -0000 Received: from Unknown (HELO sigill.intra.peff.net) (129.79.255.184) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.40) with ESMTPA; Thu, 07 Oct 2010 17:50:35 +0000 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 07 Oct 2010 13:50:48 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Oct 07, 2010 at 07:41:01PM +0200, Erik Faye-Lund wrote: > > diff --git a/builtin/rev-list.c b/builtin/rev-list.c > > index efe9360..3b2dca0 100644 > > --- a/builtin/rev-list.c > > +++ b/builtin/rev-list.c > > @@ -147,8 +147,10 @@ static void show_commit(struct commit *commit,= void *data) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0} > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else { > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0if (revs->commit_format !=3D CMIT_FMT_USERFORMAT || > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 buf.len) > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("%s%c", buf.buf, info->hd= r_termination); > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 buf.len) { > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fwrite(buf.buf, 1, buf.len, stdo= ut); > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 putchar(info->hdr_termination); > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 } > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0strbuf_relea= se(&buf); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} else { >=20 > This gives me a bit of a deja-vu: 1fb5fdd >=20 > Also, fwriting like that to stdout might be a bit troublesome on > Windows because the string won't end up going through our > ANSI-emulation. I don't know enough about the Windows output code paths to comment on that. But this is almost identical to the fwrite in graph_show_commit that we use for the "rev-list --graph" show path. If there is a fix, it needs to be made to both places. -Peff