Skip to contentSkip to conversation

Documentation/gitcli.txt: dashed forms not allowed anymore

PATCH In review [email protected] 3 participants 3 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation/gitcli.txt: dashed forms not allowed anymore

Non dashed command forms now mandatory.

---
 Documentation/gitcli.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/gitcli.txt +2 -2
index 29e5929..9f582f6 100644
@@ -45,8 +45,8 @@ disambiguating `\--` at appropriate places.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting git:
 
- * it's preferred to use the non dashed form of git commands, which means that
-   you should prefer `"git foo"` to `"git-foo"`.
+ * it's required to use the non dashed form of git commands, which means that
+   you must use `"git foo"` and not `"git-foo"`. The latter no longer works.
 
  * splitting short options to separate words (prefer `"git foo -a -b"`
    to `"git foo -ab"`, the latter may not even work).
Signature · 1 line
1.6.0.6
#1 lore raw

Documentation/gitcli.txt disambiguating `\--` at appropriate places. · line 49

Quoted 4 lines · On Thu, Jan 01, 2009 at 12:39:39PM +0800, [email protected] wrote:

- * it's preferred to use the non dashed form of git commands, which means that

Documentation/gitcli.txt +2 -1
-   you should prefer `"git foo"` to `"git-foo"`.
+ * it's required to use the non dashed form of git commands, which means that
+   you must use `"git foo"` and not `"git-foo"`. The latter no longer works.

I would append: "unless you add the output of git --exec-path to your PATH."

#2 lore raw
Quoted 8 lines · Miklos Vajna

Documentation/gitcli.txt disambiguating `\--` at appropriate places. · line 49

Quoted 4 lines · On Thu, Jan 01, 2009 at 12:39:39PM +0800, [email protected] wrote:

- * it's preferred to use the non dashed form of git commands, which means that

Documentation/gitcli.txt +2 -1
-   you should prefer `"git foo"` to `"git-foo"`.
+ * it's required to use the non dashed form of git commands, which means that
+   you must use `"git foo"` and not `"git-foo"`. The latter no longer works.

I would append: "unless you add the output of git --exec-path to your PATH."

I actually wouldn't.

There needs to be a description about use of PATH=$(git --exec-path):$PATH if you choose to use the dashed forms in your script. Don't we already have that elsewhere more basic in the documentation set?

The quoted part of the documentation talks about the syntax and convention used while scripting, and what it wants to say with the sentence is that the dashless form is preferred, even with PATH=$(git --exec-path):$PATH (iow, it was preferred before 1.6.0, and it still is preferred with the $PATH adjustments after 1.6.0).

I think it muddies the point of the list if you talk about the necessity of $PATH adjustment, which is a irrelevant detail.