git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Hugo Sales <hugo@hsal.es>
Cc: git@vger.kernel.org, Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Subject: Re: [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir'
Date: Mon, 09 Oct 2023 17:59:50 -0700	[thread overview]
Message-ID: <xmqqttqzuwah.fsf@gitster.g> (raw)
In-Reply-To: <xmqq1qe3wbt1.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 09 Oct 2023 17:39:22 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Regardless of the "do we require, or is it sifficient to imply, the
> '-p' option when we lack leading directories?" question, once we
> start "auto-creating" the leading directory hierarchy, one worrysome
> thing such a new feature introduces is an ambiguity and unexpected
> behaviour. ...
> Both are plausible, and "mkdir -p" does not have such a nasty
> ambiguity.  That is what makes me unsure about the new feature
> (again, either with required "-p" or with implied "-p").

I checked what POSIX, who does give "-p" to mkdir(1), has with
mv(1), and they do not have "-p".  Neither GNU, which tends to add
such "usability" enhancements on top of what everybody else has.

And I think they are being very sensible.  By not adding such an
option to "mv", they can sidestep the unnecessary ambiguity, and it
isn't too bad to do a "mkdir -p" separately before doing such a "mv"
into a (potential) new directory.

So, let's not do this patch.

Thanks.


  reply	other threads:[~2023-10-10  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=xmqqttqzuwah.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hugo@hsal.es \
    --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).