git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index)

From
MHMarc Herbert <marc.herbert@intel.com>
Date
Sep 27, 2017, 21:06 UTC
Message-ID
<89d82c84-7a3b-9c4c-679e-a7a723669592@intel.com>
In-Reply-To
<d9b4725b-3204-03af-1bc2-6469bb815c63@intel.com>
+ 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:
Show 9 quoted lines
> Andy Lowry <andy.work@nglowry.com> 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 
Previous: Marc HerbertNext: Mike Mason
Message 11 of 13 in “BUG in git diff-index”
  1. Andy LowryMar 31, 2016
  2. Carlos Martín NietoMar 31, 2016
  3. Jeff KingMar 31, 2016
  4. Andy LowryMar 31, 2016
  5. Jeff KingMar 31, 2016
  6. Andy LowryMar 31, 2016
  7. Junio C HamanoMar 31, 2016
  8. Marc HerbertSep 26, 2017
  9. Eric WongSep 26, 2017
  10. Google indexing https://public-inbox.org/git (was: BUG in git diff-index)Marc Herbert, Sep 26, 2017
  11. Wrong -dirty suffix set by setlocalversion (was: BUG in git diff-index)Marc Herbert, Sep 27, 2017
  12. Mike MasonMay 24, 2018
  13. Marc HerbertMay 25, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.