You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fetch prune fails if HEAD ends up dangling. Given that the message appears more warning like in nature, as opposed to an error, should GitPython handle this/ignore it?
Thanks for making the issue so easy to follow!
Currently GitPython seems to be taking the stance of rejecting anything it does’t know, which seems like a dangerous choice when being dependent on another ever changing command-line program.
In order not to break code which might rely on this particular behaviour though, I would certainly prefer adding an option like ignore_dangling and default it to false even though defaulting it to true would probably be easier to use for most.
simu
added a commit
to projectsyn/commodore
that referenced
this issue
Jul 14, 2022
…es necessary
GitPython's fetch-info parsing chokes on lines like
```
(refs/remotes/origin/HEAD has become dangling)"
```
We handle this case by simply performing a second fetch which should
return fetch-infos with flags = 4 (HEAD_UPTODATE).
See also gitpython-developers/GitPython#962.
…es necessary
GitPython's fetch-info parsing chokes on lines like
```
(refs/remotes/origin/HEAD has become dangling)"
```
We handle this case by simply performing a second fetch which should
return fetch-infos with flags = 4 (HEAD_UPTODATE).
See also gitpython-developers/GitPython#962.
Fetch prune fails if HEAD ends up dangling. Given that the message appears more warning like in nature, as opposed to an error, should GitPython handle this/ignore it?
To reproduce with pure git:
The fetch returns something like this:
GitPython crashes here as it parses the FetchInfo:
GitPython/git/remote.py
Lines 290 to 292 in 85cf7e8
Should dangling just be ignored in general or should there be an option to
ignore_dangling
?The text was updated successfully, but these errors were encountered: