{"thread":{"id":"13948","subject":"[PATCH 2/2] bash: add more 'git add' options","startedAt":"2008-06-14T09:48:00Z","lastAt":"2008-06-15T21:23:29Z","messageCount":5,"participants":["SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"79844","messageId":"1213436881-2360-1-git-send-email-szeder@ira.uka.de","threadId":"13948","inReplyTo":null,"subject":"[PATCH 1/2] git add: add long equivalents of '-u' and '-f' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-06-14T09:48:00Z","receivedAt":"2008-06-14T09:48:00Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n Documentation/git-add.txt |    7 +++++--\n builtin-add.c             |    4 ++--\n 2 files changed, 7 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-add.txt b/Documentation/git-add.txt\nindex 9c6b081..b8e3fa6 100644\n--- a/Documentation/git-add.txt\n+++ b/Documentation/git-add.txt\n@@ -8,8 +8,9 @@ git-add - Add file contents to the index\n SYNOPSIS\n --------\n [verse]\n-'git-add' [-n] [-v] [-f] [--interactive | -i] [--patch | -p] [-u] [--refresh]\n-\t  [--ignore-errors] [--] <filepattern>...\n+'git-add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n+\t  [--update | -u] [--refresh] [--ignore-errors] [--]\n+\t  <filepattern>...\n \n DESCRIPTION\n -----------\n@@ -59,6 +60,7 @@ OPTIONS\n         Be verbose.\n \n -f::\n+--force::\n \tAllow adding otherwise ignored files.\n \n -i::\n@@ -75,6 +77,7 @@ OPTIONS\n \tthe specified filepatterns before exiting.\n \n -u::\n+--update::\n \tUpdate only files that git already knows about, staging modified\n \tcontent for commit and marking deleted files for removal. This\n \tis similar\ndiff --git a/builtin-add.c b/builtin-add.c\nindex 1da22ee..9930cf5 100644\n--- a/builtin-add.c\n+++ b/builtin-add.c\n@@ -200,8 +200,8 @@ static struct option builtin_add_options[] = {\n \tOPT_GROUP(\"\"),\n \tOPT_BOOLEAN('i', \"interactive\", &add_interactive, \"interactive picking\"),\n \tOPT_BOOLEAN('p', \"patch\", &patch_interactive, \"interactive patching\"),\n-\tOPT_BOOLEAN('f', NULL, &ignored_too, \"allow adding otherwise ignored files\"),\n-\tOPT_BOOLEAN('u', NULL, &take_worktree_changes, \"update tracked files\"),\n+\tOPT_BOOLEAN('f', \"force\", &ignored_too, \"allow adding otherwise ignored files\"),\n+\tOPT_BOOLEAN('u', \"update\", &take_worktree_changes, \"update tracked files\"),\n \tOPT_BOOLEAN( 0 , \"refresh\", &refresh_only, \"don't add, only refresh the index\"),\n \tOPT_BOOLEAN( 0 , \"ignore-errors\", &ignore_add_errors, \"just skip files which cannot be added because of errors\"),\n \tOPT_END(),\n-- \n1.5.6.rc2.55.g9b8c\n"},{"id":"79843","messageId":"1213436881-2360-2-git-send-email-szeder@ira.uka.de","threadId":"13948","inReplyTo":"1213436881-2360-1-git-send-email-szeder@ira.uka.de","subject":"[PATCH 2/2] bash: add more 'git add' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-06-14T09:48:01Z","receivedAt":"2008-06-14T09:48:01Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 1698463..2141b6b 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -500,7 +500,10 @@ _git_add ()\n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n \t--*)\n-\t\t__gitcomp \"--interactive --refresh\"\n+\t\t__gitcomp \"\n+\t\t\t--interactive --refresh --patch --update --dry-run\n+\t\t\t--ignore-errors\n+\t\t\t\"\n \t\treturn\n \tesac\n \tCOMPREPLY=()\n-- \n1.5.6.rc2.55.g9b8c\n"},{"id":"79912","messageId":"20080615085305.GA7003@neumann","threadId":"13948","inReplyTo":"200806142344.m5ENiLqk020529@mi0.bluebottle.com","subject":"Re: [PATCH 1/2] git add: add long equivalents of '-u' and '-f' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-06-15T08:53:05Z","receivedAt":"2008-06-15T08:53:05Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Jun 15, 2008 at 08:43:12AM +0900, しらいしななこ wrote:\n> Isn't this patch adding a new feature during the freezing period before\n> the release?  What is the policy of accepting such a patch in general?\nI think this patch is rather a bugfix in the user interface than a new\nfeature.\n\nRegards,\nGábor\n"},{"id":"79953","messageId":"7vlk16cuu2.fsf@gitster.siamese.dyndns.org","threadId":"13948","inReplyTo":"20080615085305.GA7003@neumann","subject":"Re: [PATCH 1/2] git add: add long equivalents of '-u' and '-f' options","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-15T20:21:57Z","receivedAt":"2008-06-15T20:21:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder@ira.uka.de> writes:\n\n> On Sun, Jun 15, 2008 at 08:43:12AM +0900, しらいしななこ wrote:\n>> Isn't this patch adding a new feature during the freezing period before\n>> the release?  What is the policy of accepting such a patch in general?\n\nThe policy during the freeze is \"bugfix only unless otherwise noted\",\nwhich is, admittedly, not saying much ;-)\n\n> I think this patch is rather a bugfix in the user interface than a new\n> feature.\n\nStrictly speaking, this is a new feature but I think the documentation\nvalue to clarify -u stands for \"update\" is great enough to make it an\nexception.  I've rewritten (from empty!  Szeder, next time please write\nsensible commit log message to defend your changes, instead of having _me_\nto defend your changes to others here, like this) the commit log message\nto clarify this point.\n"},{"id":"79961","messageId":"20080615212329.GB7003@neumann","threadId":"13948","inReplyTo":"7vlk16cuu2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 1/2] git add: add long equivalents of '-u' and '-f' options","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2008-06-15T21:23:29Z","receivedAt":"2008-06-15T21:23:29Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Jun 15, 2008 at 01:21:57PM -0700, Junio C Hamano wrote:\n> SZEDER Gábor <szeder@ira.uka.de> writes:\n> > I think this patch is rather a bugfix in the user interface than a new\n> > feature.\n> \n> Strictly speaking, this is a new feature but I think the documentation\n> value to clarify -u stands for \"update\" is great enough to make it an\n> exception.\nWell, my reasoning was that every short option must have a long\nequivalent, therefore the lack of long options is a bug (even if this\ndoes not lead to e.g. a runtime error).\n\n> I've rewritten (from empty!  Szeder, next time please write\n> sensible commit log message to defend your changes, instead of having _me_\n> to defend your changes to others here, like this) the commit log message\n> to clarify this point.\nSorry, I though the rationale behind the changes (i.e. \"why?\") is\ntrivial even from that one-liner:  add long options, because, well,\nthey do not exist.\nIn fact, I considered to write something like \"these long options are\n'--update' and '--force'\" in the commit message.  But I dropped it,\nbecause that explained _what_ the patch does, and I understood that\nthat should not go into the commit message.\n\nAnyway, I will take care next time.\n\nRegards,\nGábor\n"}]}