summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cfe21f0)
raw | patch | inline | side by side (parent: cfe21f0)
author | Jeff King <peff@peff.net> | |
Mon, 12 Dec 2011 07:51:24 +0000 (02:51 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Dec 2011 19:52:31 +0000 (11:52 -0800) |
The code for a verbose flag has been here since "git mv" was
converted to C many years ago, but actually getting the "-v"
flag from the command line was accidentally lost in the
transition.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
converted to C many years ago, but actually getting the "-v"
flag from the command line was accidentally lost in the
transition.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-mv.txt | patch | blob | history | |
builtin/mv.c | patch | blob | history |
index 4be7a718e6801c4fdf43f648565ab6bbdbaa09c7..e3c84486141685e2f128f64f46d24c36cc45e97f 100644 (file)
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
-----------
This script is used to move or rename a file, directory or symlink.
- git mv [-f] [-n] [-k] <source> <destination>
- git mv [-f] [-n] [-k] <source> ... <destination directory>
+ git mv [-v] [-f] [-n] [-k] <source> <destination>
+ git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
In the first form, it renames <source>, which must exist and be either
a file, symlink or directory, to <destination>.
--dry-run::
Do nothing; only show what would happen
+-v::
+--verbose::
+ Report the names of files as they are moved.
+
GIT
---
Part of the linkgit:git[1] suite
diff --git a/builtin/mv.c b/builtin/mv.c
index 40f33ca4d0e6d0bb1733e0544029c6f588d09b59..449f30aaca93c464af6e2bb947069e59a363932a 100644 (file)
--- a/builtin/mv.c
+++ b/builtin/mv.c
int i, newfd;
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
struct option builtin_mv_options[] = {
+ OPT__VERBOSE(&verbose, "be verbose"),
OPT__DRY_RUN(&show_only, "dry run"),
OPT__FORCE(&force, "force move/rename even if target exists"),
OPT_BOOLEAN('k', NULL, &ignore_errors, "skip move/rename errors"),