"repo forall -c 'git reset --hard ; git clean -fdx' " returns error status

469 views
Skip to first unread message

Vitaly Karasik

unread,
Sep 11, 2022, 5:54:14 AM9/11/22
to Repo and Gerrit Discussion
I noticed that 

repo forall -c 'git reset --hard ; git clean -fdx'

exit status is '1', even there is no error messages in command output. Any ideas?

Thanks,
Vitaly 

David Åkerman

unread,
Sep 13, 2022, 2:38:19 AM9/13/22
to Repo and Gerrit Discussion
Hi Vitaly,

I do not have much experience with the repo command.
But I think you should be able to run:

repo forall -c 'git reset --hard ; git clean -fdx || echo  "$REPO_PROJECT failed to clean" '

to get which projects fail to clean.

Best regards,
David
Reply all
Reply to author
Forward
0 new messages