From: Denton Liu <liu.denton@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)
Date: Sun, 9 Dec 2018 22:52:38 -0500 [thread overview]
Message-ID: <20181210035238.GA2104@archbookpro.localdomain> (raw)
In-Reply-To: <xmqqo99u2hjy.fsf@gitster-ct.c.googlers.com>
On Mon, Dec 10, 2018 at 12:21:05PM +0900, Junio C Hamano wrote:
> I think v3 (which we see above) describes what it wants to do
> clearly enough and implements what it wants to do cleanly. I do not
> think the patch itself has much room for further improvement.
>
> When I re-read the final patch and all the earlier comments I made
> in the thread that began at [*1*], I still do not see in what
> practical workflow and usecase the users would find the feature this
> change adds useful.
>
> For each new feature, I want a story we can sell it to the users:
> "if your workflow is like this or that, you would find yourself
> wanting to do this, which was (impossible|cumbersome) to do before;
> with this new thing, you can".
>
> And the "story" is not "If you have remote.$name.url and want to
> move its value to remote.$name.pushurl while setting the former to a
> new value, then..." I want to know why the user gets in such a
> situation in the first place.
>
> To be helped by the feature, the user
>
> (1) must first have a remote.$name.url (but not remote.$name.pushurl)
>
> (2) that URL must also be usable for pushing
>
> (3) and then has another URL that can be used for fetching
>
> (4) and somehow that new URL is more suitable for fetching than the
> original one.
>
> When all of the above holds, then "set-url --save-to-push" can be
> used to move the original URL that can be used for both fetching and
> pushing to remote.$name.pushurl and set remote.$name.url to the new
> value with a single command. But is that a sensible situation to be
> in the first place?
The following is the story that led to me writing the feature in the
first place:
I have a project that's been developed on my own machine. I want to
deploy it onto a server to test, so I use SSH key forwarding and clone
the project with the SSH URL onto the server. After fixing some small
bugs, I'll push the changes directly from the server up.
Now that the server is running, I only touch the repo on the server
occasionally. I want to pull updates from the main repository without
necessarily having to use SSH key forwarding because I might be
forgetful and forget to start ssh-agent or I might have someone else
administer the server who doesn't have key-access to the repository.
However, I also don't want to get rid of my ability to push over SSH so,
in this case, I'd run
`git remote set-url --save-to-push origin <HTTPS_URL>`.
Although it's definitely not an every day activity, I've run into the
use case a few times where having this ability would definitely be
useful.
>
> I guess it would help the readers if the documentation (or proposed
> log message) were more explicit that this is to help the project
> originator more than the project followers, perhaps. My working
> assumption during the review discussion on this patch has been that
> there are orders-of-magnitude many project followers who start from
> fetching and locally tweaking without ever publishing than those who
> start to pushing to a project from day one of joining, or the day
> they themselves initiated the project. And for these majority
> "followers", the first URL is often the one to fetch, which may not
> necessarily be usable for pushing, and that URL is advertised for
> the wider general public as the most suitable URL for fetching the
> project's source. So to these people, neither (2) or (4) would
> hold.
>
> But for project initiators and those joining a project with write
> access from day one, the story may be a bit different. They may
> start with a single URL that can be used for both fetching and
> pushing, which means (2) would hold for them, unlike for the
> majority of users.
>
> I am still not sure what a good example situation is that makes (4)
> hold, though. Perhaps you originally had a R/W URL that always
> require authentication, but now you want to use an anonymous R/O URL
> for your fetch traffic without having to authenticate? If there is
> a model situation to make all of these four hold, perhaps it can be
> added somewhere to help users who would find the new feature useful
> discover it.
If the above makes sense to you, I can try to distill the use-case down
to its essence and include it documentation for the patch.
>
> Without that, I remain unconvinced.
>
> Thanks.
>
>
> [Reference]
>
> *1* https://public-inbox.org/git/1d1b0fe85ddd89cf8172e730e8886d5b4a9ea7eb.1540627720.git.liu.denton@gmail.com/
next prev parent reply other threads:[~2018-12-10 3:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-09 8:42 What's cooking in git.git (Dec 2018, #01; Sun, 9) Junio C Hamano
2018-12-09 9:03 ` Denton Liu
2018-12-10 3:21 ` Junio C Hamano
2018-12-10 3:52 ` Denton Liu [this message]
2018-12-10 10:26 ` Junio C Hamano
2018-12-09 20:31 ` pw/add-p-select, was " Johannes Schindelin
2018-12-10 10:42 ` Phillip Wood
2018-12-11 9:56 ` Johannes Schindelin
2018-12-11 14:48 ` Phillip Wood
2019-01-21 20:58 ` Johannes Schindelin
2019-01-22 20:27 ` Phillip Wood
2018-12-10 18:53 ` Josh Steadmon
2018-12-11 1:43 ` Junio C Hamano
2018-12-10 20:05 ` Elijah Newren
2018-12-10 21:50 ` Ævar Arnfjörð Bjarmason
2018-12-11 1:49 ` Junio C Hamano
2018-12-11 1:48 ` Junio C Hamano
2018-12-11 2:00 ` Stefan Beller
2018-12-11 6:17 ` Junio C Hamano
2018-12-16 21:48 ` Alban Gruin
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=20181210035238.GA2104@archbookpro.localdomain \
--to=liu.denton@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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).