{"thread":{"id":"9788","subject":"[PATCH 2/2] git-commit: Add --no-status option","startedAt":"2007-09-05T23:49:53Z","lastAt":"2007-09-06T22:15:57Z","messageCount":2,"participants":["Dmitry V. Levin","Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"52646","messageId":"20070905234953.GB643@nomad.office.altlinux.org","threadId":"9788","inReplyTo":null,"subject":"[PATCH 2/2] git-commit: Add --no-status option","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2007-09-05T23:49:53Z","receivedAt":"2007-09-05T23:49:53Z","isPatch":true,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"By default, git-commit runs git-runstatus to print changes between\nthe index and the working tree.  This operation is very costly and\nis not always necessary.  New option allows user to commit without\nrunning git-runstatus when appropriate.\n\nSigned-off-by: Dmitry V. Levin <ldv@altlinux.org>\n---\n Documentation/git-commit.txt |    7 ++++++-\n git-commit.sh                |   11 ++++++++++-\n 2 files changed, 16 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex e54fb12..177e7cd 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n [verse]\n 'git-commit' [-a | --interactive] [-s] [-v] [-u]\n \t   [(-c | -C) <commit> | -F <file> | -m <msg> | --amend]\n-\t   [--no-verify] [-e] [--author <author>]\n+\t   [--no-status] [--no-verify] [-e] [--author <author>]\n \t   [--] [[-i | -o ]<file>...]\n \n DESCRIPTION\n@@ -85,6 +85,11 @@ OPTIONS\n -s|--signoff::\n \tAdd Signed-off-by line at the end of the commit message.\n \n+--no-status::\n+\tDo not examine paths in the working tree that has changes\n+\tunrecorded to the index file, and changes between the\n+\tindex file and the current commit.\n+\n --no-verify::\n \tThis option bypasses the pre-commit hook.\n \tSee also link:hooks.html[hooks].\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 800f96c..75126f1 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -3,7 +3,7 @@\n # Copyright (c) 2005 Linus Torvalds\n # Copyright (c) 2006 Junio C Hamano\n \n-USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]'\n+USAGE='[-a | --interactive] [-s] [-v] [--no-status] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]'\n SUBDIRECTORY_OK=Yes\n . git-sh-setup\n require_work_tree\n@@ -54,6 +54,7 @@ run_status () {\n \telse\n \t\tcolor=--nocolor\n \tfi\n+\ttest t = \"$status\" || return 0\n \tgit runstatus ${color} \\\n \t\t${verbose:+--verbose} \\\n \t\t${amend:+--amend} \\\n@@ -81,6 +82,7 @@ edit_flag=\n no_edit=\n log_given=\n log_message=\n+status=t\n verify=t\n quiet=\n verbose=\n@@ -184,6 +186,13 @@ $1\"\n \t\tno_edit=t\n \t\tshift\n \t\t;;\n+\t--no-s|--no-st|--no-sta|--no-stat|--no-statu|\\\n+\t--no-status)\n+\t\ttest \"$status_only\" = t &&\n+\t\t\tdie \"Option $1 does not make sense with ${0##*/}.\"\n+\t\tstatus=\n+\t\tshift\n+\t\t;;\n \t-n|--n|--no|--no-|--no-v|--no-ve|--no-ver|--no-veri|--no-verif|\\\n \t--no-verify)\n \t\tverify=\n-- \nldv\n"},{"id":"52807","messageId":"20070906221557.GA20575@steel.home","threadId":"9788","inReplyTo":"20070905234953.GB643@nomad.office.altlinux.org","subject":"Re: [PATCH 2/2] git-commit: Add --no-status option","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-09-06T22:15:57Z","receivedAt":"2007-09-06T22:15:57Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Dmitry V. Levin, Thu, Sep 06, 2007 01:49:53 +0200:\n> By default, git-commit runs git-runstatus to print changes between\n> the index and the working tree.  This operation is very costly and\n> is not always necessary.  New option allows user to commit without\n> running git-runstatus when appropriate.\n\nNot a very good name for the option. Noone, except for a few, knows\nthat git-commit runs runstatus. The name makes no sense.\n\n\"git-commit --index\", perhaps (the current state of index to be\ncommited). Or \"git-commit --prepared\" (the commit is prepared and\nthere can be stored immediately). Even a dumb \"--fast\" would be\nbetter (because it is the purpose of the patch).\n\nBesides, now when you disabled runstatus, you better check for changes\nin the index with something like \"git diff --quiet --cached\".\n"}]}