Junio C Hamano wrote:
> You can think of it this way.
> "git branch" can not only _create_ a new branch (or list existing
> ones, but that is another entirely different mode), but also can be
> used to set attributes to an existing branch. Imagine a new option,
> say --set-description, to replace branch.frotz.description, for
> example. It would be used like this:
> $ git branch --set-description='add frotz feature' frotz
That's the same question.
You say that it would be used like that. I say that it would be
more intuitive, given how "git remote", "git config", and other
commands other than "update-index --chmod" that set attributes already
work, for it to be used like this:
git branch --set-description frotz 'add frotz feature'
Notice how similar that is to "git remote set-head origin master".
It would just be the consistent thing to do.
The truth is that neither one of us is right. Both conventions
could work, and which one is more intuitive will vary from person
to person. The convention used for plain "git branch" is
That matches memcpy() and is the opposite of what "cp" uses. Oh
well. The convention used for "git remote add" is
It's generally pretty natural. The convention used for "git
update-index --chmod" is
That matches "chmod" so it was probably a good choice.
Hoping that clarifies,
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html