All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: v2.10.0: ls-tree exit status is always 0, this differs from ls(1)
Date: Wed, 21 Sep 2016 21:40:04 +0200	[thread overview]
Message-ID: <20160921194004.QOizfyGm8%steffen@sdaoden.eu> (raw)
In-Reply-To: <xmqqr38d9ova.fsf@gitster.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

Hello.

Junio C Hamano <gitster@pobox.com> wrote:
 |Steffen Nurpmeso <steffen@sdaoden.eu> writes:
 |> I think this behaviour contradicts the manual which strongly links
 |> ls-tree to ls(1):
 |
 |Patches to the documentation is very much welcomed.

The below could serve this purpose.

 |Somewhere the similarity must end, and actually it ends a lot
 |earlier, as "/bin/ls" takes exact paths while "ls-tree" (or any
 |other Git command for that matter) takes a pathspec pattern,
 |and not having a path that matches the pathspec pattern is not
 |an error condition.

I was just surprised to see nothing and get no feedback at all.
Ciao!

--steffen

[-- Attachment #2: git-ls-tree-doc.diff --]
[-- Type: text/x-diff, Size: 539 bytes --]

diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
index dbc91f9..8ebeced 100644
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -33,6 +33,10 @@ in the current working directory.  Note that:
    However, the current working directory can be ignored by passing
    --full-tree option.
 
+ - the behaviour is different to that of "/bin/ls" in sofar as non-existing
+   '<path>' arguments are silently ignored and not reflected in the exit
+   status code.
+
 OPTIONS
 -------
 <tree-ish>::

  reply	other threads:[~2016-09-21 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 13:26 v2.10.0: ls-tree exit status is always 0, this differs from ls(1) Steffen Nurpmeso
2016-09-21 16:52 ` Junio C Hamano
2016-09-21 19:40   ` Steffen Nurpmeso [this message]
2016-09-21 20:39     ` Junio C Hamano
2016-09-21 22:46       ` Steffen Nurpmeso
2016-09-22 11:36         ` Michael J Gruber
2016-09-22 12:57           ` Steffen Nurpmeso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160921194004.QOizfyGm8%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.