On Sat, May 16, 2015 at 3:08 PM, Daniel Bünzli <[email protected]> wrote: > Le samedi, 16 mai 2015 à 15:40, David Sheets a écrit : >> > In fact if we wanted to be consistent with what a `git clone` would do >> > (the least surprising in my opinion), we should maybe rather take the >> > repository's current active branch whenever we `opam pin -k git $PATH`. >> >> Agreed. This is the same VCS reference semantic that the mixed mode >> VCS pins currently have. This does make the VCS mode dependent on >> local working tree state and divergent from a remote repository but I >> believe this state is so small and 'obvious' as to be acceptable. > > Note to be sure we understood the same: we pick up the branch that is current > whenever `opam pin -k git $PATH` is invoked and then sticks to that branch > (so that the pin is not subject to working directory changes, my obsession).
Ah, I had not understood that. To ensure clarity, here are the two options: 1. `opam pin -k git add $PKG $PATH` -> $PKG#$BRANCH 2. `opam pin -k git add $PKG $PATH` -> $PKG which tracks the currently checked out branch I believe you propose 1 which removes branch-less pins altogether and does not refer to local state. I like this design. Re-pinning can be used to switch branches. _______________________________________________ opam-devel mailing list [email protected] http://lists.ocaml.org/listinfo/opam-devel
