Skip to content

plumbing to help fix git-gui

Jonathan Nieder git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add tests for git check-ref-formatt/t1402-check-ref-format.sh+44 -00 replies
2/4Documentation: describe check-ref-format --branchDocumentation/git-check-ref-format.txt+6 -30 replies
3/4git check-ref-format --printDocumentation/git-check-ref-format.txt builtin-check-ref-format.c t/t1402-check-ref-format.sh+46 -65 replies
4/4check-ref-format: simplify --print implementationbuiltin-check-ref-format.c+23 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/RFC 0/4] plumbing to help fix git-gui
Quoted 9 lines · Junio C Hamano
Quoted 6 lines · Jens Lehmann

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.

Quoted 6 lines

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