git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fatal from submodule status --recursive when used with grep -q
@ 2024-09-16 15:08 Matt Liberty
  2024-09-18 10:05 ` Phillip Wood
  0 siblings, 1 reply; 11+ messages in thread
From: Matt Liberty @ 2024-09-16 15:08 UTC (permalink / raw)
  To: git

Hi

I have a repo with submodule, like:

% git submodule status --recursive
+834b7a0fb6de03c8e584256af2ecb7889b568343 tools/OpenROAD (v2.0-15587-g834b7a0fb)
 aafee90f8a21bf7867cef2e159929440cf45b2e5 tools/OpenROAD/src/sta
(v2.2.0-1106-gaafee90)
 ef5389d31526003c2ebd7e6d6d6fe3848a20f0a2
tools/OpenROAD/third-party/abc (remotes/origin/HEAD)
 80ba43d26264738c93900129dc0aab7fab36c53f tools/yosys (yosys-0.44)
 28d955ca97a1c4be3aed4062aec0241a734fac5d tools/yosys/abc (yosys-0.44)

If I try to grep the output I get a fatal error:

% git submodule status --recursive | grep -q "^+"
fatal: failed to recurse into submodule 'tools/OpenROAD'

I didn't expect any output but did want the return status (0).  I'm
guessing git is unhappy that grep -q exits on the first occurrence of
the pattern.  I don't feel fatal is appropriate here.

I can work around this by writing to a tmpfile but would like to see
this addressed.

Thanks!
Matt

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-09-20 13:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 15:08 fatal from submodule status --recursive when used with grep -q Matt Liberty
2024-09-18 10:05 ` Phillip Wood
2024-09-18 14:45   ` Matt Liberty
2024-09-19  1:16   ` Junio C Hamano
2024-09-19 13:23     ` Matt Liberty
     [not found]   ` <CAKDm0rMsXUpFSWRWkW0J0FUpEbot6wQqdzYTT5CLZ=3TGbV-OA@mail.gmail.com>
2024-09-19 14:22     ` phillip.wood123
2024-09-19 15:17       ` Matt Liberty
2024-09-19 19:09         ` Junio C Hamano
2024-09-19 19:40           ` Eric Sunshine
2024-09-19 20:10             ` Matt Liberty
2024-09-20 13:12               ` phillip.wood123

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 NNTP newsgroup(s).