Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751958AbdI0VGa (ORCPT ); Wed, 27 Sep 2017 17:06:30 -0400 Received: from mga04.intel.com ([192.55.52.120]:55971 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbdI0VG2 (ORCPT ); Wed, 27 Sep 2017 17:06:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,446,1500966000"; d="scan'208";a="132974054" Subject: Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index) From: Marc Herbert To: Junio C Hamano , Andy Lowry Cc: Jeff King , git , Christian Kujau , josh@joshtriplett.org, michael.w.mason@intel.com, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org References: <20160331140515.GA31116@sigill.intra.peff.net> <20160331142704.GC31116@sigill.intra.peff.net> <56FD7AE8.4090905@nglowry.com> Message-ID: <89d82c84-7a3b-9c4c-679e-a7a723669592@intel.com> Date: Wed, 27 Sep 2017 14:06:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 27 + linux-kbuild list which is not in the output of: ./scripts/get_maintainer.pl -f scripts/setlocalversion ... but seems relevant anyway. On 31/03/16 13:39, Junio C Hamano wrote: > Andy Lowry writes: > >> So I think now that the script should do "update-index --refresh" >> followed by "diff-index --quiet HEAD". Sound correct? > > Yes. That has always been one of the kosher ways for any script to > make sure that the files in the working tree that are tracked have > not been modified relative to HEAD (assuming that the index matches > HEAD). Too bad kernel/scripts/setlocalversion didn't get the memo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cdf2bc632ebc9ef51 > scripts/setlocalversion on write-protected source tree (2013) > I don't see how removing "git update-index" could do any harm. This causes a spurious "-dirty" suffix when building from a directory copy (as Mike learned the hard way) [...] https://public-inbox.org/git/1459432667.2124.2.camel@dwim.me