Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large git repo: "exceeds the OS argument length limit" #394

Closed
ftc2 opened this issue Mar 28, 2023 · 1 comment
Closed

Large git repo: "exceeds the OS argument length limit" #394

ftc2 opened this issue Mar 28, 2023 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@ftc2
Copy link

ftc2 commented Mar 28, 2023

Describe the bug

sparse clone a large git repo, cd into it, and enjoy the "exceeds the OS argument length limit" bug.

no, i don't have something like set -U foo $foo bar in my ~/.config/fish/config.fish.
every set is set -g ... or set -gx ....

Steps to reproduce

cd /tmp
git clone --filter=blob:none --no-checkout https://github.com/discourse/discourse.git
cd discourse

observe:

exec: Failed to execute process '/usr/bin/git': An argument or exported variable exceeds the OS argument length limit.
exec: Hint: Your exported variables take up over half the limit. Try erasing or unexporting variables.

Screenshots

image

Environment

Output of tide bug-report:

fish version: 3.6.0
tide version: 5.5.1
term: tmux-256color
os: Debian GNU/Linux 11 (bullseye)
terminal emulator: iTerm2 3.4.19
fish startup: 18.27 millis
fisher plugins: jorgebucaran/fisher patrickf1/fzf.fish ilancosman/tide@v5

Additional context

i looked at #372

i tried:

set -l minlen 2000
for var in (set -xn)
    set -l len (string length -- "$$var")
    test $len -gt $minlen; and echo -- $len $var
end

but i don't get any output except the error.

image

@ftc2 ftc2 added the 🐛 bug Something isn't working label Mar 28, 2023
@IlanCosman
Copy link
Owner

Yup, can reproduce, thanks for pointing this out.

The bug is caused by this line:

stat=(git $_set_dir_opt --no-optional-locks status --porcelain 2>/dev/null) \

git status just produces too much information. In the repo you mentioned, it's 33042 lines. That's ok for fish to deal with, but the OS doesn't want to export that to external processes. Will fix :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants