From: Hugo Sales <hugo@hsal.es>
To: git@vger.kernel.org
Cc: Hugo Sales <hugo@hsal.es>,
Derrick Stolee <derrickstolee@github.com>,
Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir'
Date: Tue, 10 Oct 2023 00:34:55 +0100 [thread overview]
Message-ID: <20231009233458.1371351-1-hugo@hsal.es> (raw)
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
next reply other threads:[~2023-10-09 23:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 23:34 Hugo Sales [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231009233458.1371351-1-hugo@hsal.es \
--to=hugo@hsal.es \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=shaoxuan.yuan02@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).