git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mike Clarke" <clarkema@gmail.com>
To: git@vger.kernel.org
Subject: git working tree status
Date: Sun, 26 Oct 2008 21:54:03 +0000	[thread overview]
Message-ID: <73f525b90810261454wb902edfk3a696c06ef2148d1@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-10-26 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26 21:54 Mike Clarke [this message]
2008-10-26 22:23 ` git working tree status Miklos Vajna
2008-10-26 22:26   ` Miklos Vajna
     [not found]   ` <73f525b90810270412o234bc88by16c67df9df067649@mail.gmail.com>
2008-10-27 11:37     ` Mike Clarke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73f525b90810261454wb902edfk3a696c06ef2148d1@mail.gmail.com \
    --to=clarkema@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).