Thread (3 messages) flat view 3 messages, 2 authors, 2017-10-17

Re: [PATCH] check-ref-format: require a repository for --branch

From: Jonathan Nieder <hidden>
Date: 2017-10-17 07:25:59

Junio C Hamano wrote:
Jonathan Nieder [off-list ref] writes:
quoted
And in that spirit, I think the patch you replied with aims to go in
the right direction, by providing the core functionality when in a
repository while avoiding breaking such a script outside of one
(though I do not understand it fully yet).
Given that, is it safe for me to ignore this earlier one
quoted
For what it's worth, I don't agree with this repurposing of
"check-ref-format --branch" at all.
as reacting to the patch without reading what it does?
Are you saying I should have ignored the commit message?  Recording
future plans via the commit message is part of what the patch does,
after all.
quoted
Junio C Hamano wrote:
quoted
quoted
                                       (e.g. a wrapper to "git
clone" that wants to verify the name it is going to give to the "-b"
option), and a check desired in such a context is different from
(and is stricter than) feeding refs/heads/$name to the same command
without the "--branch" option.
Can you say more about this example?  E.g. why is this hypothetical
wrapper unable to rely on "git clone -b"'s own error handling?
If I have to guess what you meant, perhaps the Porcelain wanted to
diagnose bad parameter that would be rejected _before_ letting clone
spend cycles and possibly network bandwidth?

But this was my way of rephrasing an earlier example you used while
objecting to Peff's change
[...]
so my answer to the question in the message I am directly responding
to would be "You tell me." ;-)
Hm.  Does the example in
https://public-inbox.org/git/20171017070808.plddffhzdobyekmo@aiede.mtv.corp.google.com/
make it clearer?

The goal of such a script is *not* error handling --- that is just a
pleasant side-benefit.  It is to be able to handle all branch
specifiers from the user (and even a default branch that is not from
the user) uniformly.

Thanks,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help