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

Re: [JGIT PATCH 2/2] Make Repository.isValidRefName compatible with Git 1.6.3

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 7, 2009, 23:29 UTC
Message-ID
<alpine.LFD.2.01.0905071620240.4983@localhost.localdomain>
In-Reply-To
<200905080102.44053.robin.rosenberg@dewire.com>
On Fri, 8 May 2009, Robin Rosenberg wrote:
> 
> In 3e262b95c509 I taught C Git to disallow refs whose names end in
> ".lock".

Btw, I think we should revert that, and instead change our naming for lock-files.

It's a silly limitation, and for a stupid reason, I think. I can well imagine people using a branch naming policy of using '.' instead of spaces, and then It makes perfect sense to call a branch "fix.vm.lock" when you have a VM locking issue you want to fix.

So I think we should remove that stupid "*.lock" rule from the C version (and then obviously from the JGIT one too).

Now, that leaves what we _should_ call the lock-files, and the only sane thing to do is to pick a sequence that is already invalid for other reasons. We could make the lockfile end in "..lock", for example (".." is not legal in names due to the confusion with the "a..b" range notation), or just end or begin with a "." (same issue, except "..." now).

Or just make it end in '~' which is also invalid for similar reasons.
		Linus
Previous: Robin RosenbergNext: Junio C Hamano
Message 4 of 18 in “Add support for boolean config values "yes", "no"”
  1. 1/2 Add support for boolean config values "yes", "no"Shawn O. Pearce, May 7, 2009
  2. 2/2 Make Repository.isValidRefName compatible with Git 1.6.3Shawn O. Pearce, May 7, 2009
  3. Robin RosenbergMay 7, 2009
  4. Linus TorvaldsMay 7, 2009
  5. Junio C HamanoMay 8, 2009
  6. Shawn O. PearceMay 8, 2009
  7. Alex RiesenMay 8, 2009
  8. Johannes SchindelinMay 8, 2009
  9. Junio C HamanoMay 8, 2009
  10. Johannes SchindelinMay 8, 2009
  11. Alex RiesenMay 8, 2009
  12. Shawn O. PearceMay 8, 2009
  13. Brandon CaseyMay 7, 2009
  14. 1/2 Add support for boolean config values "on", "off"Shawn O. Pearce, May 7, 2009
  15. Shawn O. PearceMay 8, 2009
  16. Junio C HamanoMay 8, 2009
  17. Shawn O. PearceMay 8, 2009
  18. Junio C HamanoMay 8, 2009

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.