-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update subpath display #5219
Update subpath display #5219
Conversation
Could we even avoid the square brackets in the display? |
We need to differentiate the main url and the subpath. We can use another separator. |
I was thinking we could kinda avoid it, but that would be inconsistent with The problem is that the notation is opam specific, but perhaps we can therefore make it more explicit that there's a subpath pin involved. Possibility: -root-a_p is now pinned to file://${BASEDIR}/pinnes (a) (version dev)
+root-a_p is now subpath-pinned to directory /a in file://${BASEDIR}/pinnes (version dev)
-root-a-i_g is now pinned to git+file://${BASEDIR}/pinnes#master (a/i) (version dev)
+root-a-i_g is now subpath-pinned to directory /a/i in git+file://${BASEDIR}/pinnes#master (version dev)
-root-a_p.dev rsync file://${BASEDIR}/pinnes (a)
-root-b_g.dev git git+file://${BASEDIR}/pinnes#master (b)
+root-a_p.dev rsync /a in file://${BASEDIR}/pinnes
+root-b_g.dev git /b in git+file://${BASEDIR}/pinnes#master
--> retrieved root-a-i_g.dev (git+file://${BASEDIR}/pinnes#master(a/i))
+-> retrieved root-a-i_g.dev (/a/i in git+file://${BASEDIR}/pinnes#master)
-[root-a-i_g.l1] synchronised (git+file://${BASEDIR}/pinnes#master(a/i))
-[root-a-k_p.l1] synchronised (file://${BASEDIR}/pinnes(a/k))
+[root-a-i_g.l1] synchronised (/a/i in git+file://${BASEDIR}/pinnes#master)
+[root-a-k_p.l1] synchronised (/a/k in file://${BASEDIR}/pinnes) ?? |
I like the idea, but i'm wondering if these two examples are explicit for user. I give it a quick try:
-> do we understand that
-> it is not clear if it is the subpath-pinning that is removed or the pinning |
Good point - perhaps:
When un-pinning, perhaps there's no need for status at all - the fundamental change is that we've un-pinned that repo, so it could be the same message for both sub-path and normal? |
It is possible, it will complicate API as in different function, it's `OpamPinCommand.string_of_pinned" that is called for printing. |
It's a local function 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that subpath-pinned to directory /<path> in ...
idea. LGTM
from 'git+https://url#hash (subpath)' to 'subpath in git+https://url#hash'
Some examples: