From: "Theodore Ts'o" <tytso@MIT.EDU>
To: jeffpc@josefsipek.net
Cc: git@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: [PATCH 1/2] must_commit_first: Make sure the index is up to date
Date: Mon, 7 Jul 2008 20:03:11 -0400 [thread overview]
Message-ID: <1215475392-26221-2-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1215475392-26221-1-git-send-email-tytso@mit.edu>
git diff-files can be confused if the index is not up to date, so make
sure it is updated first.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
guilt | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/guilt b/guilt
index 50414a4..cdf4e9b 100755
--- a/guilt
+++ b/guilt
@@ -495,6 +495,7 @@ s/^\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\) \([0-9]\{2\}\):\([0-9]\{2\}\):\(
# usage: must_commit_first
must_commit_first()
{
+ git update-index --refresh --unmerged -q > /dev/null
[ `git diff-files | wc -l` -eq 0 ]
return $?
}
--
1.5.6.1.205.ge2c7.dirty
next prev parent reply other threads:[~2008-07-08 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 0:03 Two quick patches for guilt v0.30 Theodore Ts'o
2008-07-08 0:03 ` Theodore Ts'o [this message]
2008-07-08 0:03 ` [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path Theodore Ts'o
2008-07-08 0:32 ` Josef 'Jeff' Sipek
2008-07-08 0:56 ` Junio C Hamano
2008-07-08 1:14 ` Josef 'Jeff' Sipek
2008-07-08 1:17 ` Junio C Hamano
2008-07-08 1:28 ` Josef 'Jeff' Sipek
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=1215475392-26221-2-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=git@vger.kernel.org \
--cc=jeffpc@josefsipek.net \
/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).