Extras icon indicating copy to clipboard operation
Extras copied to clipboard

[Request] Add Git-extras

Open jahead opened this issue 8 years ago • 13 comments

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

jahead avatar Jun 07 '16 11:06 jahead

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

lukesampson avatar Jun 07 '16 12:06 lukesampson

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 avatar Dec 14 '19 20:12 JanPokorny

@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...

owenvoke avatar Jan 10 '20 11:01 owenvoke

@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.

JanPokorny avatar Jan 11 '20 20:01 JanPokorny

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.

owenvoke avatar Jan 11 '20 21:01 owenvoke

@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.

JanPokorny avatar Jan 12 '20 01:01 JanPokorny

@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 avatar Oct 14 '20 11:10 JanPokorny

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

owenvoke avatar Oct 14 '20 11:10 owenvoke

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

JanPokorny avatar Oct 14 '20 12:10 JanPokorny

Oh well, still looks good. 👌🏻

owenvoke avatar Oct 14 '20 13:10 owenvoke

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

jahead avatar Oct 22 '20 06:10 jahead

Hello! Is git-extras or git-with-extras available somewhere?

7wells avatar Jan 12 '21 17:01 7wells

No sadly not in any official bucket, if you search here for 'git-extras': https://rasa.github.io/scoop-directory/search you can try installing one of those manifests from a personal bucket, they both install slightly differently so do read the manifests before installing.

tech189 avatar Dec 13 '21 09:12 tech189