public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Command whose exit code indicates clean or dirty working directory
@ 2025-04-10 17:49 Ross Goldberg
  2025-04-10 19:24 ` Junio C Hamano
  2025-04-10 22:11 ` brian m. carlson
  0 siblings, 2 replies; 3+ messages in thread
From: Ross Goldberg @ 2025-04-10 17:49 UTC (permalink / raw)
  To: git@vger.kernel.org


[-- Attachment #1.1.1: Type: text/plain, Size: 530 bytes --]

What is the simplest git command that returns 0 if the working directory is completely clean, or nonzero if it is dirty in any way (staged diff, unstaged diff, file that is both untracked & not ignored, etc.), with nothing printed to stdout or to stderr?
If the simplest such command is complex, is there any feature request to create a simple command, possibly with options that specify what is considered dirty (staged diffs, unstaged diffs, untracked & not ignored, etc.)?

 
 
   Sent from   Proton Mail for iOS

[-- Attachment #1.1.2.1: Type: text/html, Size: 757 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

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

end of thread, other threads:[~2025-04-10 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 17:49 Command whose exit code indicates clean or dirty working directory Ross Goldberg
2025-04-10 19:24 ` Junio C Hamano
2025-04-10 22:11 ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox