git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Dario Bertini <berdario@gmail.com>
Cc: Tim Mazid <timmazid@hotmail.com>, git@vger.kernel.org
Subject: Re: commit --strict feature request
Date: Sat, 27 Mar 2010 19:50:52 +0800	[thread overview]
Message-ID: <be6fef0d1003270450s32ab997cmfe6f6b7e6e4a16a8@mail.gmail.com> (raw)
In-Reply-To: <4BA8FEA4.60504@gmail.com>

Hi

On Wed, Mar 24, 2010 at 1:47 AM, Dario Bertini <berdario@gmail.com> wrote:
> Hi, i usually use bzr, and today i was searching for a commit --strict
> equivalent in git... i asked around and it seems there isn't one, so i'm
> writing this.
>
> basically, by doing commit --strict it refuses to commit if there are
> untracked (and thus not ignored) files in the tree, this helps against
> forgetting to add new files (actually i find it so useful that i've even
> changed commit to be an alias to commit --strict in my bzr aliases )

check out the pre-commit hook:

  http://www.kernel.org/pub/software/scm/git/docs/githooks.html#_pre_commit

You could make it scan the directory, then veto the execution of
git-commit if any untracked files are found.

-- 
Cheers,
Ray Chuan

      parent reply	other threads:[~2010-03-27 11:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 17:47 commit --strict feature request Dario Bertini
2010-03-24  1:10 ` Tim Mazid
2010-03-24  1:14   ` Tim Mazid
2010-03-27 11:50 ` Tay Ray Chuan [this message]

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=be6fef0d1003270450s32ab997cmfe6f6b7e6e4a16a8@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=berdario@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=timmazid@hotmail.com \
    /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).