From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2] git-sh-setup: make require_clean_work_tree part of the interface
Date: Tue, 20 Dec 2011 21:29:54 +0100 [thread overview]
Message-ID: <23d761193dcf25f36206adc3d392e8578c566cd7.1324412815.git.trast@student.ethz.ch> (raw)
In-Reply-To: <7vwr9rjbaq.fsf@alter.siamese.dyndns.org>
92c62a3 (Porcelain scripts: Rewrite cryptic "needs update" error
message, 2010-10-19) refactored git's own checking to a function in
git-sh-setup. This is a very useful thing for script writers, so
document it.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
Documentation/git-sh-setup.txt | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt
index a2f346c..9a0e574 100644
--- a/Documentation/git-sh-setup.txt
+++ b/Documentation/git-sh-setup.txt
@@ -68,6 +68,16 @@ require_work_tree_exists::
cd_to_toplevel, which is impossible to do if there is no
working tree.
+require_clean_work_tree <action> [<hint>]::
+ checks that the working tree associated with the repository
+ has no uncommitted changes to tracked files. Otherwise it
+ emits an error message of the form `Cannot <action>:
+ <reason>. <hint>`, and dies. Example:
++
+----------------
+require_clean_work_tree rebase "Please commit or stash them."
+----------------
+
get_author_ident_from_commit::
outputs code for use with eval to set the GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.
--
1.7.8.484.gdad4270
next prev parent reply other threads:[~2011-12-20 20:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 11:09 [PATCH 1/2] git-sh-setup: make require_clean_work_tree part of the interface Thomas Rast
2011-12-20 11:09 ` [PATCH 2/2] Documentation: make git-sh-setup docs less scary Thomas Rast
2011-12-20 19:20 ` Junio C Hamano
2011-12-20 19:45 ` Ævar Arnfjörð Bjarmason
2011-12-20 20:27 ` Thomas Rast
2011-12-20 19:25 ` [PATCH 1/2] git-sh-setup: make require_clean_work_tree part of the interface Junio C Hamano
2011-12-20 20:29 ` Thomas Rast [this message]
2011-12-20 20:52 ` [PATCH v2] " Junio C Hamano
2011-12-20 21:42 ` [PATCH v3] " Thomas Rast
2011-12-20 22:05 ` Junio C Hamano
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=23d761193dcf25f36206adc3d392e8578c566cd7.1324412815.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).