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

[PATCH/RFC 0/4] plumbing to help fix git-gui

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 12, 2009, 05:25 UTC
Message-ID
<20091012052536.GA11106@progeny.tock>
In-Reply-To
<7vws327wbp.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 13 quoted lines
>> I became aware of this issue while looking into problems occuring
>> when a user created a branch starting with a '/' in git gui (e.g.
>> "/foo"). Strange things happen, while git gui shows the current
>> branch as "/foo" under the hood a branch "foo" (without the slash)
>> had been created. But then you can't delete "/foo" from git gui,
>> because a branch of that name doesn't exist.
> 
> Perhaps an interface to give a cleaned-up version, e.g.
> 
>     $ git check-ref-format --print refs/heads//foo/bar
>     refs/heads/foo/bar
> 
> is what you want in order to fix git-gui?  I dunno.

The following packages do exactly that. I tried to use it to fix git gui, but my Tcl-fu was not up to it, at least for tonight.

It is not obvious to me that this interface is the one that would be most helpful for git gui: probably a command to just munge the branch name would be more convenient, though less general.

Is the --print option useful? Right now, it seems that its main use is documentation. But in the future, it would be very nice if this command could be used to transform Unicode ref names to some appropriate normalization form, to make Unicode ref names usable in Mac OS X and less confusing everywhere.

I look forward to your thoughts.
Jonathan Nieder (4):
  Add tests for git check-ref-format
  Documentation: describe check-ref-format --branch in more detail
  check-ref-format: add option to print canonical name
  check-ref-format: Simplify --print implementation
 Documentation/git-check-ref-format.txt |   32 ++++++++++++----
 builtin-check-ref-format.c             |   31 ++++++++++++++++
 t/t1402-check-ref-format.sh            |   61 ++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+), 8 deletions(-)
 create mode 100644 t/t1402-check-ref-format.sh
Previous: Nanako ShiraishiNext: Jonathan Nieder
Message 7 of 17 in “disallow refs containing successive slashes”
  1. disallow refs containing successive slashesJens Lehmann, Oct 10, 2009
  2. Junio C HamanoOct 10, 2009
  3. Jens LehmannOct 11, 2009
  4. Junio C HamanoOct 11, 2009
  5. Jonathan NiederOct 12, 2009
  6. Nanako ShiraishiOct 12, 2009
  7. 0/4 plumbing to help fix git-guiJonathan Nieder, Oct 12, 2009
  8. 1/4 Add tests for git check-ref-formatJonathan Nieder, Oct 12, 2009
  9. 2/4 Documentation: describe check-ref-format --branchJonathan Nieder, Oct 12, 2009
  10. 3/4 git check-ref-format --printJonathan Nieder, Oct 12, 2009
  11. Shawn O. PearceOct 12, 2009
  12. Junio C HamanoOct 12, 2009
  13. Shawn O. PearceOct 12, 2009
  14. Junio C HamanoOct 12, 2009
  15. Jonathan NiederOct 13, 2009
  16. 4/4 check-ref-format: simplify --print implementationJonathan Nieder, Oct 12, 2009
  17. Jonathan NiederOct 12, 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.