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=-3.7 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 522862018E for ; Mon, 8 Aug 2016 19:55:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313AbcHHTzE (ORCPT ); Mon, 8 Aug 2016 15:55:04 -0400 Received: from cloud.peff.net ([104.130.231.41]:51395 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752521AbcHHTJy (ORCPT ); Mon, 8 Aug 2016 15:09:54 -0400 Received: (qmail 25293 invoked by uid 109); 8 Aug 2016 19:09:53 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Mon, 08 Aug 2016 19:09:53 +0000 Received: (qmail 8674 invoked by uid 111); 8 Aug 2016 19:09:52 -0000 Received: from Unknown (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Mon, 08 Aug 2016 15:09:52 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Mon, 08 Aug 2016 15:09:51 -0400 Date: Mon, 8 Aug 2016 15:09:51 -0400 From: Jeff King To: Junio C Hamano Cc: Kirill Smelkov , Vicent Marti , =?utf-8?Q?J=C3=A9rome?= Perrin , Isabelle Vallet , Kazuhiko Shiozaki , Julien Muchembled , git@vger.kernel.org Subject: Re: [PATCH 1/2] pack-objects: Teach --use-bitmap-index codepath to respect --local, --honor-pack-keep and --incremental Message-ID: <20160808190950.x7ld2r4n7id57nof@sigill.intra.peff.net> References: <20160729074051.GA5987@teco.navytux.spb.ru> <20160729074656.23813-1-kirr@nexedi.com> <20160808123734.GA3995@teco.navytux.spb.ru> <20160808135020.yggthtfekdiwq3lz@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 Mon, Aug 08, 2016 at 12:06:13PM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> + if grep -qFf nonlocal-loose 1.objects; then > >> + echo "Non-local object present in pack generated with --local" > >> + return 1 > >> + fi > >> +' > > > > grep -f isn't portable. However, I think: > > > > echo $objsha1 >expect && > > git show-index <1.pack | cut -d' ' -f2 >actual > > test_cmp expect actual > > > > would work (if you do stick with two entries, you might need to sort > > your "expect"). > > Hmph, are you sure? "grep -f pattern_file" is in POSIX.1. Hmm, you're right. I specifically checked my local grep.1posix manpage, but searching for "-f" didn't turn up anything, because it's formatted with a Unicode minus sign (U+2212). Bleh. -Peff