git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Advertise the ability to abort a commit
@ 2008-07-29 19:32 Anders Melchiorsen
  2008-07-29 20:12 ` [PATCH v2] " Anders Melchiorsen
  0 siblings, 1 reply; 19+ messages in thread
From: Anders Melchiorsen @ 2008-07-29 19:32 UTC (permalink / raw)
  To: git; +Cc: Anders Melchiorsen

This treats aborting a commit more like a feature.

Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
---
 builtin-commit.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-commit.c b/builtin-commit.c
index 9a11ca0..75eeb4b 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -555,6 +555,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix)
 		fprintf(fp,
 			"\n"
 			"# Please enter the commit message for your changes.\n"
+			"# To abort the commit, use an empty commit message.\n"
 			"# (Comment lines starting with '#' will ");
 		if (cleanup_mode == CLEANUP_ALL)
 			fprintf(fp, "not be included)\n");
@@ -1003,7 +1004,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
 		stripspace(&sb, cleanup_mode == CLEANUP_ALL);
 	if (sb.len < header_len || message_is_empty(&sb, header_len)) {
 		rollback_index_files();
-		die("no commit message?  aborting commit.");
+		die("no commit message.  aborting commit.");
 	}
 	strbuf_addch(&sb, '\0');
 	if (is_encoding_utf8(git_commit_encoding) && !is_utf8(sb.buf))
-- 
1.5.6.4

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

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

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 19:32 [PATCH] Advertise the ability to abort a commit Anders Melchiorsen
2008-07-29 20:12 ` [PATCH v2] " Anders Melchiorsen
2008-07-29 20:51   ` Junio C Hamano
2008-07-29 21:19     ` Anders Melchiorsen
2008-07-30  5:07   ` Jeff King
2008-07-30  5:11     ` Jeff King
2008-07-30 17:53       ` [PATCH v3] " Anders Melchiorsen
2008-07-30 19:01         ` Brian Gernhardt
2008-07-30 21:09           ` Avery Pennarun
2008-07-30 21:16             ` Brian Gernhardt
2008-07-30 21:53             ` Anders Melchiorsen
2008-07-31  5:50         ` Jeff King
2008-07-31  5:58           ` Junio C Hamano
2008-07-31  6:36             ` [PATCH] " Jeff King
2008-07-31  7:36             ` [PATCH v3] " Jeff King
2008-07-31 10:55               ` Petr Baudis
2008-07-31 11:09                 ` Jeff King
2008-07-31  7:28           ` Anders Melchiorsen
2008-07-31  7:32             ` Jeff King

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