From: Yaroslav Halchenko <yoh@onerussian.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git submodule add spits unrelated to actual problem error msg about .gitignore
Date: Wed, 14 Sep 2016 16:23:56 -0400 [thread overview]
Message-ID: <6B9620C2-9459-497A-BDF7-7A58A22C687D@onerussian.com> (raw)
In-Reply-To: <CAGZ79kbdfWHDGzoe21LVqt6naMJPWGf45S1oknrAp6=Z-Qm8dQ@mail.gmail.com>
On September 14, 2016 3:32:11 PM EDT, Stefan Beller <sbeller@google.com> wrote:
!
>I think we could chop off "2>&1" as that would have exposed the
>underlying error.
>
>Another way to go would be to use verbose git-add and grep for
>the string "add '$sm_path'".
>
> if test -z "$force" && ! git add --verbose --dry-run
>--ignore-missing "$sm_path" |grep "add $sm_path"
>
>git-add already gives the correct (the same error message) for the
>ignored files, so maybe we'd just do:
>
> # no need for a if, but this single line will do:
> test -z "$force" && git add --dry-run git.o >/dev/null || exit 1
FWIW Imho exposing error is good but not sufficient alone, since custom gitignore message would still be confusing.
--
Sent from a phone which beats iPhone.
prev parent reply other threads:[~2016-09-14 20:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 22:19 git clone http:// fails some times with "Request for d53.. aborted" Yaroslav Halchenko
2016-09-10 0:21 ` Eric Wong
2016-09-13 0:25 ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Eric Wong
2016-09-13 0:25 ` [RFC 1/3] http: warn on curl_multi_add_handle failures Eric Wong
2016-09-13 0:25 ` [RFC 2/3] http: consolidate #ifdefs for curl_multi_remove_handle Eric Wong
2016-09-13 0:25 ` [RFC 3/3] http: always remove curl easy from curlm session on release Eric Wong
2016-09-13 20:32 ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Junio C Hamano
2016-09-21 21:46 ` [PATCH 4/3] http: check curl_multi_remove_handle error code Eric Wong
2016-09-21 22:22 ` Jeff King
2016-09-21 22:29 ` Eric Wong
2016-09-21 22:31 ` Jeff King
2016-09-14 11:59 ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Yaroslav Halchenko
2016-09-14 14:03 ` git submodule add spits unrelated to actual problem error msg about .gitignore Yaroslav Halchenko
2016-09-14 19:32 ` Stefan Beller
2016-09-14 20:23 ` Yaroslav Halchenko [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6B9620C2-9459-497A-BDF7-7A58A22C687D@onerussian.com \
--to=yoh@onerussian.com \
--cc=git@vger.kernel.org \
--cc=sbeller@google.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).