Skip to content

Commit 07b8738

Browse files
peffgitster
authored andcommitted
mv: honor --verbose flag
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cfe21f0 commit 07b8738

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Documentation/git-mv.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ DESCRIPTION
1515
-----------
1616
This script is used to move or rename a file, directory or symlink.
1717

18-
git mv [-f] [-n] [-k] <source> <destination>
19-
git mv [-f] [-n] [-k] <source> ... <destination directory>
18+
git mv [-v] [-f] [-n] [-k] <source> <destination>
19+
git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
2020

2121
In the first form, it renames <source>, which must exist and be either
2222
a file, symlink or directory, to <destination>.
@@ -40,6 +40,10 @@ OPTIONS
4040
--dry-run::
4141
Do nothing; only show what would happen
4242

43+
-v::
44+
--verbose::
45+
Report the names of files as they are moved.
46+
4347
GIT
4448
---
4549
Part of the linkgit:git[1] suite

builtin/mv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
5555
int i, newfd;
5656
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
5757
struct option builtin_mv_options[] = {
58+
OPT__VERBOSE(&verbose, "be verbose"),
5859
OPT__DRY_RUN(&show_only, "dry run"),
5960
OPT__FORCE(&force, "force move/rename even if target exists"),
6061
OPT_BOOLEAN('k', NULL, &ignore_errors, "skip move/rename errors"),

0 commit comments

Comments
 (0)