git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] mv: Add documentation for new `-p' flag

From
HSHugo Sales <hugo@hsal.es>
Date
Oct 9, 2023, 23:34 UTC
Message-ID
<20231009233458.1371351-4-hugo@hsal.es>
In-Reply-To
<20231009233458.1371351-1-hugo@hsal.es>
Signed-off-by: Hugo Sales <hugo@hsal.es>
---
 Documentation/git-mv.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index fb0220fd18..70c1e9572c 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -15,13 +15,14 @@ DESCRIPTION
 -----------
 Move or rename a file, directory or symlink.
 
- git mv [-v] [-f] [-n] [-k] <source> <destination>
- git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
+ git mv [-v] [-f] [-n] [-k] [-p] <source> <destination>
+ git mv [-v] [-f] [-n] [-k] [-p] <source> ... <destination directory>
 
 In the first form, it renames <source>, which must exist and be either
 a file, symlink or directory, to <destination>.
-In the second form, the last argument has to be an existing
-directory; the given sources will be moved into this directory.
+In the second form, the last argument refers to a directory, which has
+to exist unless -p is specified, in which case it gets created; the
+given sources will be moved into this directory.
 
 The index is updated after successful completion, but the change must still be
 committed.
@@ -39,6 +40,9 @@ OPTIONS
 -n::
 --dry-run::
 	Do nothing; only show what would happen
+-p::
+--parents::
+	Create missing parent directories in the <destination> or <destination directory> path. Similar to `mkdir -p', all missing leading directories are created.
 
 -v::
 --verbose::
-- 
2.42.0
Previous: Hugo SalesNext: Hugo Sales
Message 3 of 11 in “Add `-p' option to `git-mv', inspired by `mkdir'”
  1. 0/3 Add `-p' option to `git-mv', inspired by `mkdir'Hugo Sales, Oct 9, 2023
  2. 2/3 mv: Add tests for new -p flagHugo Sales, Oct 9, 2023
  3. 3/3 mv: Add documentation for new `-p' flagHugo Sales, Oct 9, 2023
  4. 1/3 mv: Add -p option to create parent directoriesHugo Sales, Oct 9, 2023
  5. Junio C HamanoOct 10, 2023
  6. Junio C HamanoOct 10, 2023
  7. Hugo SalesOct 11, 2023
  8. Junio C HamanoOct 31, 2023
  9. Dragan SimicOct 31, 2023
  10. Junio C HamanoOct 31, 2023
  11. Dragan SimicOct 31, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.