git-grab icon indicating copy to clipboard operation
git-grab copied to clipboard

support passing args to clone command

Open notjedi opened this issue 2 years ago • 1 comments

it would be nice to pass args to the git clone command.

use case:

let's say i'm cloning a large repo and i want to pass in the --depth=1 arg, then the following command would come in handy: git grab --depth=1 URL

so prolly git-grab can pass all additional optional args to the git clone command?

notjedi avatar Jul 18 '22 05:07 notjedi

Good idea. Not sure when I'll get to it but I will try to implement it at some point.

wezm avatar Jul 18 '22 07:07 wezm

Hard-coding desired arguments is possibe like this.

Cloning this repo with that build yields:
$ git-grab github.com/ckuhtz/git-grab
$ cd ~/src/github.com/ckuhtz/git-grab
$ du -sh && git log --oneline
236K	.	# vs. 15M for the full clone

f6f6fa1 (HEAD -> main, tag: 2.0.0, upstream/main, upstream/HEAD) Version 2.0.0
7a2f6c2 Merge pull request #10 from wezm/update
3c1199a (grafted) ci: Build universal mac os binary
e311a55 (grafted) Update README for v1.0.1

katrinleinweber avatar Feb 17 '24 14:02 katrinleinweber