Scoop-extras: [Request] Add Git-extras

Created on 7 Jun 2016  路  11Comments  路  Source: lukesampson/scoop-extras

Hey luke,

How about git-extras?
https://github.com/tj/git-extras

it has a install.cmd, so it should be ~easy~.
I can probably do it this weekend

help-wanted request

Most helpful comment

Yes, please submit a pull request if you can get it working. Thanks.

All 11 comments

Yes, please submit a pull request if you can get it working. Thanks.

I was thinking about ways to implement this. Scoop does not seem well-suited for an app that basically installs over another app.

I can think of two possibilities how to implement this:

  1. Create git-with-extras manifest, which is the git manifest with git-extras installation step added. Would install alongside normal git and override its shim. Seems the most straightforward, but comes at the cost of having two full copies of gits installed, one clean and one with git-extras.
  2. Create a git-extras manifest that:

    • Depends on git

    • On installation, patches the current installed version of git

    • Overrides the git shim with one that first checks if the current version of git is patched, and if not, patches it. It then forwards everything to real git.

      This has the obvious disadvantage of patching git lazily in case git is newer than git-extras. Also seems rather complicated. But only one version of git is installed.

What do you think is better?

@JanPokorny, I ended up going with option 2 in my bucket while testing. Not sure what the best way to do the Git shim patching though. 馃

Overall option 1 seems easier to implement, but I think option 2 is better. Also, not sure to do on uninstall. ~Other than a scoop reset git maybe? Because there isn't an uninstaller.~ Scoop reset doesn't do what I expected...

@pxgamer Your solution also has a problem with updating -- updating git removes the extras. (That's why I mentioned the need for lazy patching.)

Looking at it now, keeping two copies of git does not really seem like a big deal, compared to patching it on demand. Scoop actually has direct support for two apps providing the same shims (that's what scoop reset is for). Thus, I believe that creating git-with-extras is the way to go.

Yeah, I think that makes the most sense. Would be good to see a PR if you want to do it. 馃憣

The only issue is for things that depend on the git package, then you'd end up with 2 lots of Git.

@pxgamer I plan on creating the package in the near future (it's the exam period now...).

As Scoop itself depends on git, you would need to have it installed alongside git-with-extras. As git-with-extras is a superset of git, it should not break anything even if some tool uses git-with-extras while expecting vanilla git.

@pxgamer Hello, the "near future" is here. I have created a PR for bit: https://github.com/ScoopInstaller/Main/pull/1501. It's actually more than you've been asking for, but it can be easily aliased to git.

@JanPokorny, thanks for this! Will take a look. (By the way, changed from @pxgamer to @owenvoke). 馃憤馃徎

@owenvoke My apologies, looks like it includes only a subset of git-extras commands

Oh well, still looks good. 馃憣馃徎

Ha, looking good guys, sorry, this one fell through my TODOs list, and work moved me off PC :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhoujin7 picture zhoujin7  路  4Comments

MichielVanwelsenaere picture MichielVanwelsenaere  路  6Comments

lepicsaintloup picture lepicsaintloup  路  10Comments

TangentFoxy picture TangentFoxy  路  5Comments

ggobbe picture ggobbe  路  3Comments