git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git working tree status
@ 2008-10-26 21:54 Mike Clarke
  2008-10-26 22:23 ` Miklos Vajna
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Clarke @ 2008-10-26 21:54 UTC (permalink / raw)
  To: git

Hi all,

I'd like a way of getting a simple summary of the status of a working
tree,  for consumption by other programs rather than humans.

Specifically, I'd like to know whether the working tree is:

a) fully 'clean' -- i.e., all changes checked in, no stashes;
b) all changes checked in, but there are some stashes; or
c) 'dirty' in some way -- new files, uncommitted changes, etc.

The logical way to do this seems to be via an exit code, but the exit
code of git status is not currently rich enough.  As a result, I'm
considering the addition of an option to git status -- perhaps
'--is-clean' -- that would provide the required information.

My questions are:

1) Is there already some way of doing this that I've overlooked?
2) Would the preferred approach be an option (git status --is-clean)
or a sub-command (git is-clean)?  A sub-command would probably result
in cleaner internal code, but would also clutter the interface.
3) Is a patch for such a feature likely to be accepted?

Thanks,

-- 
Mike Clarke

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

end of thread, other threads:[~2008-10-27 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 21:54 git working tree status Mike Clarke
2008-10-26 22:23 ` Miklos Vajna
2008-10-26 22:26   ` Miklos Vajna
     [not found]   ` <73f525b90810270412o234bc88by16c67df9df067649@mail.gmail.com>
2008-10-27 11:37     ` Mike Clarke

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).