From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1BE1D28D for ; Tue, 31 Oct 2023 04:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="pbpwTh70" Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15EA4A9 for ; Mon, 30 Oct 2023 21:30:19 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 7419A37860; Tue, 31 Oct 2023 00:30:18 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=w24e86oYz8Bkqs+Z5CskegZH933Qp7rTTjl6EL VT8/0=; b=pbpwTh705AQfBiHHrofhGMHt0Onhay/1VuMwesUaT3OAGKoWxCHjMe 5ggRWl/b27AQf2W7tuzQ3SvZHvov+y6QcHBH0VYwAlzpg8dTYVw7RiGrfdc5zfYj ySDSlZyEb0o3+rF3JaV5ZoFk9N2q3eMAAXBmuPVAZKXtzJFNyX1r0= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 6C6053785F; Tue, 31 Oct 2023 00:30:18 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.125.198.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 886833785E; Tue, 31 Oct 2023 00:30:15 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Hugo Sales Cc: git@vger.kernel.org, Derrick Stolee , Shaoxuan Yuan Subject: Re: [PATCH 0/3] Add `-p' option to `git-mv', inspired by `mkdir' In-Reply-To: <1384513657.119681.1697027599941@office.mailbox.org> (Hugo Sales's message of "Wed, 11 Oct 2023 13:33:19 +0100 (WEST)") References: <20231009233458.1371351-1-hugo@hsal.es> <1384513657.119681.1697027599941@office.mailbox.org> Date: Tue, 31 Oct 2023 13:30:14 +0900 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 306C6B44-77A6-11EE-A598-A19503B9AAD1-77302942!pb-smtp21.pobox.com Hugo Sales writes: >> 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 think the ambiguity is resolved by the inclusion of lack thereof > of a trailing `/`. The question is not if we can come up with a rule that the user can use to disambiguate. It is if the user will find that such a rule is a naturally acceptable way to disambiguate. When both of git mv file there/exists/such/a/directory git mv file there/exists/such/a/directory/ create "there/exists/such/a/directory/file" and removes "file", with or without a trailing slash, "you should add a slash if you want a directory, and otherwise you should not add a slash" is a rather arbitrary rule. Let's not go there. I still view the downside more grave than having to occasionally do "mkdir".