threads / patch / 16949

patchDocumentation/gitcli.txt: dashed forms not allowed anymore

Subject: [PATCH] Documentation/gitcli.txt: dashed forms not allowed anymore

## tl;dr

3 messages between Jan 1, 2009 and Jan 1, 2009. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

jidanni@jidanni.org· Jan 1, 2009, 04:39 UTC · lore
Non dashed command forms now mandatory.
Signed-off-by: jidanni <jidanni@jidanni.org>
---
 Documentation/gitcli.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to Documentation/gitcli.txt +2 −2
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index 29e5929..9f582f6 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -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).
-- 
1.6.0.6
Miklos Vajna· Jan 1, 2009, 14:40 UTC · re: jidanni@jidanni.org · lore

Re: [PATCH] Documentation/gitcli.txt: dashed forms not allowed anymore

On Thu, Jan 01, 2009 at 12:39:39PM +0800, jidanni@jidanni.org wrote:
> - * 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.

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

Junio C Hamano· Jan 1, 2009, 21:00 UTC · re: Miklos Vajna · lore

Re: [PATCH] Documentation/gitcli.txt: dashed forms not allowed anymore

Miklos Vajna <vmiklos@frugalware.org> writes:
Show 8 quoted lines
> On Thu, Jan 01, 2009 at 12:39:39PM +0800, jidanni@jidanni.org wrote:
>> - * 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.
>
> 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.

← back to recent threads