git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git submodule add spits unrelated to actual problem error msg about .gitignore

From
Yaroslav Halchenko <yoh@onerussian.com>
Date
Sep 14, 2016, 20:23 UTC
Message-ID
<6B9620C2-9459-497A-BDF7-7A58A22C687D@onerussian.com>
In-Reply-To
<CAGZ79kbdfWHDGzoe21LVqt6naMJPWGf45S1oknrAp6=Z-Qm8dQ@mail.gmail.com>

On September 14, 2016 3:32:11 PM EDT, Stefan Beller <sbeller@google.com> wrote: !

Show 14 quoted lines
>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.
Previous: Stefan Beller
Message 15 of 15 in “git clone http:// fails some times with "Request for d53.. aborted"”
  1. Yaroslav HalchenkoSep 9, 2016
  2. Eric WongSep 10, 2016
  3. 0/3 http: avoid repeatedly adding curl easy to curlmEric Wong, Sep 13, 2016
  4. 1/3 http: warn on curl_multi_add_handle failuresEric Wong, Sep 13, 2016
  5. 2/3 http: consolidate #ifdefs for curl_multi_remove_handleEric Wong, Sep 13, 2016
  6. 3/3 http: always remove curl easy from curlm session on releaseEric Wong, Sep 13, 2016
  7. Junio C HamanoSep 13, 2016
  8. 4/3 http: check curl_multi_remove_handle error codeEric Wong, Sep 21, 2016
  9. Jeff KingSep 21, 2016
  10. Eric WongSep 21, 2016
  11. Jeff KingSep 21, 2016
  12. Yaroslav HalchenkoSep 14, 2016
  13. git submodule add spits unrelated to actual problem error msg about .gitignoreYaroslav Halchenko, Sep 14, 2016
  14. Stefan BellerSep 14, 2016
  15. Yaroslav HalchenkoSep 14, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.