# Bug report - git fetch will hang if connection is lost

1 messages from 2025-05-26 to 2025-05-26. Participants: Parker Killion.
Thread: https://gitlist.dev/t/63527

## Parker Killion, 2025-05-26 21:02

Subject: Bug report - git fetch will hang if connection is lost
Message-ID: <CAOVte6r1OgCoH=yy73-xki2eMu9tFxKOi94C8QuHZHnosDN_tg@mail.gmail.com>
URL: https://gitlist.dev/e/CAOVte6r1OgCoH%3Dyy73-xki2eMu9tFxKOi94C8QuHZHnosDN_tg%40mail.gmail.com

```
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

*What did you do before the bug happened? (Steps to reproduce your issue)*
1) Run git fetch --prune --tags --prune-tags
2) Lose internet connection (in the MRE video below we turn it off via
nmcli)
3) See that git fetch does not return while internet is lost
4) Regain internet connection
5) Git fetch does not return after connection has been regained. Can hang
indefinitely.

*What did you expect to happen? (Expected behavior)*
The behavior with the --prune --tags and --prune-tags flags differs from
git fetch with no flags.
Running the same process with `git fetch` we see that it will return
quickly after the internet has been restored.

I expect the git fetch --tags --prune --prune-tags to return quickly when
internet is restored and not hang indefinitely.

*What happened instead? (Actual behavior)*
The git fetch process will hang indefinitely.

*What's different between what you expected and what actually happened?*
One can hang forever and one has expected return behavior.

[System Info]
git version:
git version 2.43.0
cpu: x86_64
uname: Linux 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu
Apr 17 19:20:47 UTC 2 x86_64
compiler info: gnuc: 13.3
libc info: glibc: 2.39
$SHELL (typically, interactive shell): /bin/bash
-- 

Parker Killion

Robotics Engineer

(949) 274-5853
[image: Built Robotics] <https://www.builtrobotics.com/>

Built Robotics

Robots that build the world

This email and any attachments may contain confidential material for the
sole use of the intended recipient(s). If you are not an intended
recipient, please immediately delete this email and any attachments.

```
