hashar added a comment.
Repro:
git --version # 2.20.1
pip2 install --user GitPython==2.1.11 gitdb2==2.0.5 smmap2==2.0.5
cd projects/pywikibot/core
python2
>>> import git
>>> repo = git.Repo('.')
>>> repo.remotes.origin.fetch(tags=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "git/remote.py", line 789, in fetch
res = self._get_fetch_info_from_stderr(proc, progress)
File "git/remote.py", line 675, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "git/cmd.py", line 415, in wait
raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git fetch --tags -v origin
Passing `force=True` works:
>>> repo.remotes.origin.fetch(tags=True, force=True)
[<git.remote.FetchInfo object at 0x7f48e75a5c58>, <git.remote.FetchInfo
object at 0x7f48e75a5d08>, <git.remote.FetchInfo object at 0x7f48e75a5d60>,
<git.remote.FetchInfo object at 0x7f48e75a5db8>, <git.remote.FetchInfo object
at 0x7f48e75a5e10>, <git.remote.FetchInfo object at 0x7f48e75a5e68>,
<git.remote.FetchInfo object at 0x7f48e75a5ec0>, <git.remote.FetchInfo object
at 0x7f48e75a5f18>, <git.remote.FetchInfo object at 0x7f48e75a5f70>,
<git.remote.FetchInfo object at 0x7f48e75a5fc8>, <git.remote.FetchInfo object
at 0x7f48e75b5050>, <git.remote.FetchInfo object at 0x7f48e75b50a8>,
<git.remote.FetchInfo object at 0x7f48e75b5100>, <git.remote.FetchInfo object
at 0x7f48e75b5158>, <git.remote.FetchInfo object at 0x7f48e75b51b0>,
<git.remote.FetchInfo object at 0x7f48e75b5208>, <git.remote.FetchInfo object
at 0x7f48e75b5260>, <git.remote.FetchInfo object at 0x7f48e75b52b8>,
<git.remote.FetchInfo object at 0x7f48e75b5310>, <git.remote.FetchInfo object
at 0x7f48e75b5368>, <git.remote.FetchInfo object at 0x7f48e75b53c0>,
<git.remote.FetchInfo object at 0x7f48e75b5418>, <git.remote.FetchInfo object
at 0x7f48e75b5470>, <git.remote.FetchInfo object at 0x7f48e75b54c8>,
<git.remote.FetchInfo object at 0x7f48e75b5520>, <git.remote.FetchInfo object
at 0x7f48e75b5578>, <git.remote.FetchInfo object at 0x7f48e75b55d0>,
<git.remote.FetchInfo object at 0x7f48e75b5628>, <git.remote.FetchInfo object
at 0x7f48e75b5680>, <git.remote.FetchInfo object at 0x7f48e75b56d8>]
TASK DETAIL
https://phabricator.wikimedia.org/T252310
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: hashar
Cc: zhuyifei1999, Jdforrester-WMF, Zoranzoki21, hashar, Urbanecm, Xqt,
Aklapper, pywikibot-bugs-list, Dvorapa, JohnsonLee01, SHEKH, Blissjay007,
Dijkstra, Oblanco79, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696,
Daryl-TTMG, RomaAmorRoma, E.S.A-Sheild, Kent7301, Meekrab2012, joker88john,
Viztor, CucyNoiD, NebulousIris, Wenyi, Gaboe420, Versusxo, Majesticalreaper22,
Giuliamocci, Adrian1985, Cpaulf30, Af420, Darkminds3113, Bsandipan, Lordiis,
Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, WSH1906,
Lewizho99, Mdupont, JJMC89, Maathavan, Altostratus, Avicennasis, Liudvikas,
Wong128hk, thcipriani, mys_721tx, jayvdb, Masti, Alchimista, Rxy, Jay8g
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs