From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: [PATCH 0/2] peel-ref optimization fixes Date: Sat, 16 Mar 2013 05:00:19 -0400 Message-ID: <20130316090018.GA26708@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Junio C Hamano , Michael Haggerty To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sat Mar 16 10:00:55 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UGmyz-0003PF-Jn for gcvg-git-2@plane.gmane.org; Sat, 16 Mar 2013 10:00:53 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661Ab3CPJA0 (ORCPT ); Sat, 16 Mar 2013 05:00:26 -0400 Received: from 75-15-5-89.uvs.iplsin.sbcglobal.net ([75.15.5.89]:53381 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751948Ab3CPJA0 (ORCPT ); Sat, 16 Mar 2013 05:00:26 -0400 Received: (qmail 32659 invoked by uid 107); 16 Mar 2013 09:02:07 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Sat, 16 Mar 2013 05:02:07 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Sat, 16 Mar 2013 05:00:19 -0400 Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: These patches fix the issue with peel-ref noticed recently by Michael (namely that we fail to correctly peel packed refs outside of refs/tags). The problem has been there since we added peeling support to pack-refs, but traditionally "show-ref -d" was the only caller that actually triggered the issue. Between that and the fact that most people only put annotated tags into refs/tags, nobody really noticed. Since my 435c833 (upload-pack: use peel_ref for ref advertisements, 2012-10-04), which is in v1.8.1, upload-pack can trigger the problem, too, but I haven't actually heard of any reports in the wild. I split it into two patches; the first one is the minimal fix that makes git work properly going forward. The second one helps git be more robust when reading packed-refs files generated by older git (or other implementations). The second one depends semantically but not textually on the first one; if you're worried about that, they can be squashed. [1/2]: pack-refs: write peeled entry for non-tags [2/2]: pack-refs: add fully-peeled trait I think Michael may be rewriting some of this code, but if we are going to go this direction with the fix (and I think we should), this is the change that should go to maint in the meantime. -Peff