From: Junio C Hamano <gitster@pobox.com>
To: "Sebastian Thiel via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Sebastian Thiel <sebastian.thiel@icloud.com>
Subject: Re: [PATCH] fix `git mv existing-dir non-existing-dir`*
Date: Tue, 08 Aug 2023 12:00:53 -0700 [thread overview]
Message-ID: <xmqqttt9740q.fsf@gitster.g> (raw)
In-Reply-To: <xmqqy1il77wp.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 08 Aug 2023 10:36:54 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> What is curious is that dest_st.st_mode, after lstat on dst
> succeeds, is never checked, even though the error message claims
> that it detected an attempt to move directory over file. What
> should happen when the user did this then?
>
> $ git mv existing-dir another-existing-dir
>
> Shouldn't it do something similar to
>
> $ mv D1 D2
>
> which is to move the entire hierarchy of D1 and make it appear at
> D2/D1?
Ah, that case is handled in a different codepath, so this lstat of
dst needs to check only the existence. So there is no (unrelated)
bug there. Sorry for the noise.
next prev parent reply other threads:[~2023-08-08 19:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 14:53 [PATCH] fix `git mv existing-dir non-existing-dir`* Sebastian Thiel via GitGitGadget
2023-08-08 17:36 ` Junio C Hamano
2023-08-08 18:40 ` Torsten Bögershausen
2023-08-08 21:53 ` Junio C Hamano
2023-08-12 1:14 ` [PATCH] mv: fix error for moving directory to another Junio C Hamano
2023-08-08 19:00 ` Junio C Hamano [this message]
2023-08-09 7:47 ` [PATCH v2] fix `git mv existing-dir non-existing-dir` in some environments Sebastian Thiel via GitGitGadget
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqttt9740q.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=sebastian.thiel@icloud.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.