You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've taken a quick peek at where the upcoming stash support is, and noticed there are a few differences with what I had wrote. It now requires a git_checkout_optionsstructure, and I noticed we're woefully under-equipped when it comes to that.
Right now we only support progress & notify callbacks, as well as strategy and notification "flags", but no "paths", and no "labels" (which I think are used for conflicts). And since this structure gets used by cherrypick, merge, reset, revert, stash and submodule, maybe it would be nicer to work on DRYing up those measly 4 parameters we have at the moment before it gets out of hand ;-).
Note that I'm throwing that out to see if you guys already have some plans on how to do that.
What I would do is add a GTCheckoutOptions (bike-shedding welcome) value-object with a nice and tasty API to wrap the current uses we have while shielding us from the need to change a bunch of places each time we have to convert users' need to libgit2 git_checkout_options.
So, for example, our checkout support would change to :
Activity
tiennou commentedon Apr 8, 2015
Note that I'm throwing that out to see if you guys already have some plans on how to do that.
What I would do is add a
GTCheckoutOptions(bike-shedding welcome) value-object with a nice and tasty API to wrap the current uses we have while shielding us from the need to change a bunch of places each time we have to convert users' need to libgit2git_checkout_options.So, for example, our checkout support would change to :
or you could customize them before handing those to whatever you're trying to do :
(obviously this last example is completely made up, because I don't think we're that far in handling merges yet).
tiennou commentedon Apr 8, 2015
Eeek. I don't think it's even sensible to ask for a merge with paths. Let's hope the point gets through anyway 😄.
jspahrsummers commentedon Apr 10, 2015
Sounds reasonable. We don't use libgit2 checkout ourselves, so I don't feel qualified to comment on the use of its API.
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions
Wrap all the various way of doing checkouts in GTCheckoutOptions