Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing options to curl when using git push

Tags:

git

curl

As I understand, git relies on curl when doing http transfers (at least when using http, I'm sure ssh is different).

Given this, is there a way to make git pass specific flags to curl? e.g. I'd like to pass something like --limit-rate 100k to test a git push command under throttled conditions. Is this possible?

like image 464
David Ebbo Avatar asked Oct 16 '12 22:10

David Ebbo


1 Answers

This is not an answer to your specific question, but it can help you to get the same results.

You can use netbrake, for instance:

$ netbrake --limit 100k git push

The benefit of netbrake is that you can use it with any other command. The downside is that is Linux specific.

Another alternative, is to set a environment variable. I am not sure if git honour those variable (although other programs do). Check the connection options for Curl.

like image 125
gpoo Avatar answered Nov 03 '22 04:11

gpoo