From patchwork Thu Nov 3 02:19:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Torvalds X-Patchwork-Id: 123387 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 39F1BB6F7C for ; Thu, 3 Nov 2011 13:20:27 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754955Ab1KCCUA (ORCPT ); Wed, 2 Nov 2011 22:20:00 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:33156 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754929Ab1KCCT6 (ORCPT ); Wed, 2 Nov 2011 22:19:58 -0400 Received: by wwi36 with SMTP id 36so1135466wwi.1 for ; Wed, 02 Nov 2011 19:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=e4wMZPWSqqjib2zwfekdTWTmLtYTX7ID6PV5JSU6yMk=; b=QGFJ8UPwI02UCc9NlmYD1euT64qtTnuY/BlXklnM5RlovgKMKVpyUBGG5Oi0vyBs0k 6cZGqS/uGc2yNQ3XCBK4m8MSyYKUa+Fjh9M5vmfnzzkWzfnv5k28U7zgSy3Yzi3FTNc3 DRlYlXlmzbh+dtGQvM1OKdn43fY7sFXLeU6S4= Received: by 10.216.193.212 with SMTP id k62mr2168748wen.67.1320286795181; Wed, 02 Nov 2011 19:19:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.166.3 with HTTP; Wed, 2 Nov 2011 19:19:34 -0700 (PDT) In-Reply-To: References: <20111026202235.GA20928@havoc.gtf.org> <1319969101.5215.20.camel@dabdike> <1320049150.8283.19.camel@dabdike> <7vy5w1ow90.fsf@alter.siamese.dyndns.org> <7vwrbjlj5r.fsf@alter.siamese.dyndns.org> <7vk47jld5s.fsf@alter.siamese.dyndns.org> From: Linus Torvalds Date: Wed, 2 Nov 2011 19:19:34 -0700 X-Google-Sender-Auth: c8vKjHN7EXcXXLSbTOuCdUh90I8 Message-ID: Subject: Re: [git patches] libata updates, GPG signed (but see admin notes) To: Shawn Pearce Cc: Junio C Hamano , git@vger.kernel.org, James Bottomley , Jeff Garzik , Andrew Morton , linux-ide@vger.kernel.org, LKML Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org On Wed, Nov 2, 2011 at 6:45 PM, Linus Torvalds wrote: > >   [torvalds@i5 linux]$ git fetch git://github.com/rustyrussell/linux.git refs/tags/rusty@rustcorp.com.au-v3.1-8068-g5087a50 So this trivial patch removes one line of code, and makes this actually work. However, it also makes us fail many tests that *test* that we peeled what we fetched. However, I think the tests are wrong. If the tag doesn't resolve into a commit, we happily output the SHA1 of the tag itself - and we say that it shouldn't be merged. And it the tag *does* resolve into a commit, why would we output the SHA1 of the commit? The tag should be peeled properly later when it gets used, so peeling it here seems to be just a misfeature that makes signed tags not work well. So I suspect we should just apply this patch, but I didn't check exacty what the failed tests are - except for the first one, that just compares against a canned response (and the canned response should just be changed). Maybe there was some reason for the peeling, although I suspect it was just a fairly mindless case of "make it a commit, because the merge needs the commit" - never mind that the merge would peel it anyway. Linus builtin/fetch.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 91731b909aeb..494a7f9976f8 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -436,8 +436,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, } note[note_len] = '\0'; fprintf(fp, "%s\t%s\t%s", - sha1_to_hex(commit ? commit->object.sha1 : - rm->old_sha1), + sha1_to_hex(rm->old_sha1), rm->merge ? "" : "not-for-merge", note); for (i = 0; i < url_len; ++i)