git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir'
@ 2023-10-09 23:34 Hugo Sales
  2023-10-09 23:34 ` [PATCH 1/3] mv: Add -p option to create parent directories Hugo Sales
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Hugo Sales @ 2023-10-09 23:34 UTC (permalink / raw)
  To: git; +Cc: Hugo Sales, Derrick Stolee, Shaoxuan Yuan, Junio C Hamano

Allow passing a new `-p'/`--parents' option to `git-mv' making it so
missing directories in the given target path get created if they don't
exist. This allows running `git mv -p foo bar/quux/' to first create
the `bar/' and `bar/quux/' directories if they don't exist, and then
move `foo' to `bar/quux/foo'.

This is inspired by `mkdir -p foo/bar/quux/' which will create the
`foo/', `foo/bar/', and `foo/bar/quux/' directories if they don't
exist.

Hugo Sales (3):
  mv: Add -p option to create parent directories
  mv: Add tests for new -p flag
  mv: Add documentation for new `-p' flag

 Documentation/git-mv.txt | 12 ++++--
 builtin/mv.c             | 27 +++++++++-----
 t/t7009-mv-parents.sh    | 79 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 105 insertions(+), 13 deletions(-)
 create mode 100755 t/t7009-mv-parents.sh


base-commit: 3a06386e314565108ad56a9bdb8f7b80ac52fb69
-- 
2.42.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-10-31  6:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-09 23:34 [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir' Hugo Sales
2023-10-09 23:34 ` [PATCH 1/3] mv: Add -p option to create parent directories Hugo Sales
2023-10-09 23:34 ` [PATCH 2/3] mv: Add tests for new -p flag Hugo Sales
2023-10-09 23:34 ` [PATCH 3/3] mv: Add documentation for new `-p' flag Hugo Sales
2023-10-10  0:39 ` [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir' Junio C Hamano
2023-10-10  0:59   ` Junio C Hamano
2023-10-11 12:33   ` Hugo Sales
2023-10-31  4:30     ` Junio C Hamano
2023-10-31  4:54       ` Dragan Simic
2023-10-31  5:58         ` Junio C Hamano
2023-10-31  6:38           ` Dragan Simic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).