ish icon indicating copy to clipboard operation
ish copied to clipboard

Git Commands Stuck Forever

Open meherhowji opened this issue 3 years ago • 8 comments

I have been using ISH with Obsidian app to sync my iPhone 13 Pro notes to Git. Initially, git add used to get stuck then I tried git gc, git gc --aggressive, git gc --prune=now etc to cleanup blobs and dangling objects. It worked on some cases, but lately the complete git ecosystem is down for me. git status works, git add . and git commit gets stuck on random files.

I tried to run git fsck to check the status and there are no hints. I also tried to run GIT_TRACE2_PERF prefix set to 1 to see I could see pointers, but nothing shows up. My git repo has 1650 objects based on 'git fsck' output and number of uncommitted files are handful. And considering they are just markdown text noted and I am trying to even 'git add' single files and even that gets stuck. Lastly, I also added commit.verbose to true but I don't see any message.

I haven't tried re-installing the app yet because I would have to setup configurations etc. Any inputs?

meherhowji avatar Dec 03 '21 10:12 meherhowji

I have the same deal. git clone, git fetch etc., all get stuck during the “resolving delta” step. It may be a completely different issue as I find that ish is incredibly slow these days. I could compile a project in 10 minutes , yet the same project took about 4 hours to compile today. This could be related to iOS 15.

onatbas avatar Dec 28 '21 05:12 onatbas

You’re probably running into #943.

saagarjha avatar Dec 28 '21 05:12 saagarjha

Thanks @saagarjha for pointing to the thread.

I noticed an 'Upgrade Repositories' notification in the Settings and it upgraded my git from 2.26.3-r0 to 2.32.0-r0 I did little tests and didn't notice any issue yet, I will use iSH & Obsidian more frequently to come to a conclusion though.

In case, it occurs again, I will run git config --global pack.threads "1" as mentioned in the other thread to see if it resolves the issue. It seems to be working well for many.

meherhowji avatar Dec 28 '21 06:12 meherhowji

Just to say I'm having the same issue on my iPad Model A1709 (iPad Pro 10.5in 1st gen), git 2.34.1-r0. I activated single-threading and that worked for a while resolving deltas. But now I'm stuck forever even at a git commit, while a git add can take up to a minute or more.

DannyQuah avatar Jan 02 '22 14:01 DannyQuah

Confirming the same problem on iPad 12.9 inch (5th gen 2021) with iPadOS 15.3.1 and iSH 1.2.3 (build 298). git add or git commit stuck forever when underlying git repository resides on iPad file providers. Do not have the problem on iSH native file system.

slonik-az avatar Mar 27 '22 19:03 slonik-az

It stopped working for me again, once my unstaged and untracked files went high in number. Although previously I mentioned it worked for me momentarily. For me git add itself stays stuck endlessly, the app kind of freezes that even ctrl+c doesn't work.

meherhowji avatar Apr 05 '22 13:04 meherhowji

I am having the exact same issue, git add . just hangs and ctrl+c doesn't work. I also use it for Obsidian

MathiasSven avatar Apr 17 '22 20:04 MathiasSven

I am also having this issue, on ish 1.2.3. To work around it I had to apk add rsync and set up a script to rsync to a linux box and git add && git commit from there.

nate-johnston avatar Aug 05 '22 15:08 nate-johnston

Over a year later and this issue persists... i'm on iSH 1.2.3 running iOS 15.6.1

Alex23rodriguez avatar Dec 19 '22 18:12 Alex23rodriguez

As mentioned in the comment above, simply run git config --global pack.threads "1" and it should work. I am on iPadOS12.5.5 (1st Generation iPad Air) with ish version 1.2.3

AzlanCoding avatar Jan 27 '23 08:01 AzlanCoding

As mentioned in the comment above, simply run git config --global pack.threads "1" and it should work. I am on iPadOS12.5.5 (1st Generation iPad Air) with the version downloaded from App Store

Usually, if after this if it still gets stuck, just restart ish. It may still get stuck sometimes.

AzlanCoding avatar Jan 28 '23 11:01 AzlanCoding

Instead of cloning on the URL (which defaults on main branch), I cloned on a second branch which is named DEV. git clone -b <branchname> <remote-repo-url>

It finished without problem . Then I fetched from master branch and switch it to main branch, all work. So I deleted the Dev branch.

Hope this can help.

Dolphins22 avatar Mar 31 '23 20:03 Dolphins22

iSH 1.3 is out, which has fixes for this issue. Please try it out and file new issues with what you encounter!

saagarjha avatar Apr 24 '23 20:04 saagarjha

can confirm that it does appear to be stable. Need further experimentation to be sure, but thanks for the update!

Alex23rodriguez avatar Apr 25 '23 16:04 Alex23rodriguez

iSH 1.3 is out, which has fixes for this issue. Please try it out and file new issues with what you encounter!

Still have the same issue with iSH 1.3. Anyone else?

huaibaowu avatar Jun 05 '23 06:06 huaibaowu

Yes, I still have this issue on iSH 1.3

geofflittle avatar Jul 13 '23 16:07 geofflittle

still get issue on v1.3.2

peanut996 avatar Aug 26 '23 17:08 peanut996

Found a method to fix it, use mount -t ios-unsafe to mount folder:

eg:

mount -t ios-unsafe . obsidian

then you can run git command smoothly. 😄

reference here: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861/20

peanut996 avatar Aug 26 '23 17:08 peanut996

Found a method to fix it, use mount -t ios-unsafe to mount folder:

eg:

mount -t ios-unsafe . obsidian

then you can run git command smoothly. 😄

reference here: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861/20

This plus setting the thread count fixed the issue for me. Thanks for sharing.

nfoert avatar Oct 01 '23 12:10 nfoert

Found a method to fix it, use mount -t ios-unsafe to mount folder: eg:

mount -t ios-unsafe . obsidian

then you can run git command smoothly. 😄 reference here: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861/20

This plus setting the thread count fixed the issue for me. Thanks for sharing.

It only works in my iPhone 14 Pro (iOS 16.7) while iSH is not killed. Everytime I restart iSH, this issue will happen again.

After reading this issue: rsyncing into mount point from fileprovider doesn't quite work after iSH restart, I found a solution: mount again before handling git.

antsmallant avatar Nov 14 '23 08:11 antsmallant

Found a method to fix it, use mount -t ios-unsafe to mount folder:

eg:

mount -t ios-unsafe . obsidian

then you can run git command smoothly. 😄

reference here: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861/20

@peanut996 does it work permanently to you? after I restart ish the ios-unsafe mount is no longer there, ios mount stays however, so git pull for ex. is slow until I run mount -t ios-unsafe . obsidian again.

nikitakot avatar Feb 11 '24 17:02 nikitakot

Found a method to fix it, use mount -t ios-unsafe to mount folder: eg:

mount -t ios-unsafe . obsidian

then you can run git command smoothly. 😄 reference here: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/20861/20

@peanut996 does it work permanently to you? after I restart ish the ios-unsafe mount is no longer there, ios mount stays however, so git pull for ex. is slow until I run mount -t ios-unsafe . obsidian again.

no,it's temporary, i have to do it after reboot ish every time.

peanut996 avatar Feb 15 '24 08:02 peanut996