{"thread":{"id":"10101","subject":"[PATCH] mv: allow verbosity to be enabled using -v","startedAt":"2007-10-01T10:27:34Z","lastAt":"2007-10-01T10:27:34Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"54467","messageId":"20071001102734.GB8315@diku.dk","threadId":"10101","inReplyTo":null,"subject":"[PATCH] mv: allow verbosity to be enabled using -v","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2007-10-01T10:27:34Z","receivedAt":"2007-10-01T10:27:34Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"The infrastructure was already there but the option parsing for it was\nmissing. Also, move full command line documentation to synopsis section.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n Documentation/git-mv.txt |   10 +++++-----\n builtin-mv.c             |    6 +++++-\n 2 files changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt\nindex 2c9cf74..9cd1177 100644\n--- a/Documentation/git-mv.txt\n+++ b/Documentation/git-mv.txt\n@@ -8,15 +8,14 @@ git-mv - Move or rename a file, a directory, or a symlink\n \n SYNOPSIS\n --------\n-'git-mv' <options>... <args>...\n+[verse]\n+'git-mv' [-f] [-n] [-v] <source> <destination>\n+'git-mv' [-f] [-n] [-v] [-k] <source> ... <destination directory>\n \n DESCRIPTION\n -----------\n This script is used to move or rename a file, directory or symlink.\n \n- git-mv [-f] [-n] <source> <destination>\n- git-mv [-f] [-n] [-k] <source> ... <destination directory>\n-\n In the first form, it renames <source>, which must exist and be either\n a file, symlink or directory, to <destination>.\n In the second form, the last argument has to be an existing\n@@ -36,7 +35,8 @@ OPTIONS\n         file unless '-f' is given.\n -n::\n \tDo nothing; only show what would happen\n-\n+-v::\n+\tBe verbose.\n \n Author\n ------\ndiff --git a/builtin-mv.c b/builtin-mv.c\nindex b944651..620998e 100644\n--- a/builtin-mv.c\n+++ b/builtin-mv.c\n@@ -10,7 +10,7 @@\n #include \"path-list.h\"\n \n static const char builtin_mv_usage[] =\n-\"git-mv [-n] [-f] (<source> <destination> | [-k] <source>... <destination>)\";\n+\"git-mv [-n] [-f] [-v] (<source> <destination> | [-k] <source>... <destination>)\";\n \n static const char **copy_pathspec(const char *prefix, const char **pathspec,\n \t\t\t\t  int count, int base_name)\n@@ -99,6 +99,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \t\t\tignore_errors = 1;\n \t\t\tcontinue;\n \t\t}\n+\t\tif (!strcmp(arg, \"-v\")) {\n+\t\t\tverbose = 1;\n+\t\t\tcontinue;\n+\t\t}\n \t\tusage(builtin_mv_usage);\n \t}\n \tcount = argc - i - 1;\n-- \n1.5.3.2.1029.gc1d178\n\n-- \nJonas Fonseca\n"}]}