{"thread":{"id":"3332","subject":"[PATCH] git-commit: Now --only semantics is the default.","startedAt":"2006-02-14T07:53:12Z","lastAt":"2006-02-14T07:53:12Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16106","messageId":"7v7j7ytlzr.fsf@assigned-by-dhcp.cox.net","threadId":"3332","inReplyTo":null,"subject":"[PATCH] git-commit: Now --only semantics is the default.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-14T07:53:12Z","receivedAt":"2006-02-14T07:53:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This changes the \"git commit paths...\" to default to --only\nsemantics from traditional --include semantics, as agreed on the\nlist.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n * This will be part of the post 1.2.0 \"master\" updates, towards\n   1.3.0 development track.\n\n Documentation/git-commit.txt |   17 +++++++++++------\n git-commit.sh                |    9 +++------\n 2 files changed, 14 insertions(+), 12 deletions(-)\n\n4170a19587280eeb3663a47a6fd993910de78076\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex 53b64fa..214ed23 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -8,8 +8,8 @@ git-commit - Record your changes\n SYNOPSIS\n --------\n [verse]\n-'git-commit' [-a] [-i] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]\n-\t   [-e] [--author <author>] [--] <file>...\n+'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]\n+\t   [-e] [--author <author>] [--] [[-i | -o ]<file>...]\n \n DESCRIPTION\n -----------\n@@ -73,15 +73,20 @@ OPTIONS\n \tcommit the whole index.  This is the traditional\n \tbehaviour.\n \n---::\n-\tDo not interpret any more arguments as options.\n-\n-<file>...::\n+-o|--only::\n \tCommit only the files specified on the command line.\n \tThis format cannot be used during a merge, nor when the\n \tindex and the latest commit does not match on the\n \tspecified paths to avoid confusion.\n \n+--::\n+\tDo not interpret any more arguments as options.\n+\n+<file>...::\n+\tFiles to be committed.  The meaning of these is\n+\tdifferent between `--include` and `--only`.  Without\n+\teither, it defaults `--only` semantics.\n+\n If you make a commit and then found a mistake immediately after\n that, you can recover from it with gitlink:git-reset[1].\n \ndiff --git a/git-commit.sh b/git-commit.sh\nindex 59551d9..ab5e6bc 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] [-i] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [--author <author>] [<path>...]'\n+USAGE='[-a] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [--author <author>] [[-i | -o] <path>...]'\n SUBDIRECTORY_OK=Yes\n . git-sh-setup\n \n@@ -340,11 +340,8 @@ case \"$#,$also$only\" in\n 0,)\n   ;;\n *,)\n-  echo >&2 \"assuming --include paths...\"\n-  also=t\n-  # Later when switch the defaults, we will replace them with these:\n-  # echo >&2 \"assuming --only paths...\"\n-  # also=\n+  echo >&2 \"assuming --only paths...\"\n+  also=\n \n   # If we are going to launch an editor, the message won't be\n   # shown without this...\n-- \n1.2.0.g45dc\n"}]}