From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id A24BE2070F for ; Thu, 15 Sep 2016 19:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755103AbcIOTiL (ORCPT ); Thu, 15 Sep 2016 15:38:11 -0400 Received: from cloud.peff.net ([104.130.231.41]:43894 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755084AbcIOTiJ (ORCPT ); Thu, 15 Sep 2016 15:38:09 -0400 Received: (qmail 24720 invoked by uid 109); 15 Sep 2016 19:38:08 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Thu, 15 Sep 2016 19:38:08 +0000 Received: (qmail 11930 invoked by uid 111); 15 Sep 2016 19:38:19 -0000 Received: from Unknown (HELO sigill.intra.peff.net) (10.0.1.3) by peff.net (qpsmtpd/0.84) with SMTP; Thu, 15 Sep 2016 15:38:19 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Thu, 15 Sep 2016 12:38:04 -0700 Date: Thu, 15 Sep 2016 12:38:04 -0700 From: Jeff King To: Junio C Hamano Cc: =?utf-8?B?UmVuw6k=?= Scharfe , Git List , "brian m. carlson" Subject: Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2 Message-ID: <20160915193804.d2mmmeard2rj6vye@sigill.intra.peff.net> References: <20160915184448.awipvg2kmlq7weei@sigill.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Sep 15, 2016 at 12:25:43PM -0700, Junio C Hamano wrote: > >> Silly question: Is there a natural language that uses percent signs > >> as letters or e.g. instead of commas? :) > > > > I don't know, but if they do, they'd better get used to escaping them. > > :) > > I do not know either, but I am curious where that question comes > from. I stared at this patch for a few minutes but couldn't guess. My initial thought is that the next step after picking this low-hanging fruit would be to find cases where the strings do not contain "%", and thus we do not have to care about formatting. But a case like: strbuf_addf(&buf, "this does not have any percents!", foo); is simply broken (albeit in a way that we ignore foo, so it's just ugly code, not a real bug). So I dunno. I too am curious. -Peff