Bug 347349 - initBranchHash crashes on empty git repository
Summary: initBranchHash crashes on empty git repository
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: git (other bugs)
Version First Reported In: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2015-05-06 22:15 UTC by Milian Wolff
Modified: 2016-09-06 21:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2015-05-06 22:15:21 UTC
see e.g. https://build.kde.org/job/kdevplatform%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/55/testReport/(root)/TestSuite/test_kdevgit/

QDEBUG : GitInitTest::revHistory() kdevplatform.vcs: Execute dvcs command: "git symbolic-ref -q --short HEAD"
QDEBUG : GitInitTest::revHistory() kdevplatform.vcs: Execute dvcs command: "git rev-list master"
QDEBUG : GitInitTest::revHistory() kdevplatform.vcs: oops, found an error while running "git rev-list master" : "UnknownError" Exit code is: 128

this happens on a bare repository without any commits (due to another error). to reproduce try to run this e.g.:

cd /tmp
mkdir test
cd test
git init
git rev-list master
# fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
# Use '--' to separate paths from revisions, like this:
# 'git <command> [<revision>...] -- [<file>...]'

this will then lead to the assert in the kdevelop code base

Reproducible: Always
Comment 1 Aleix Pol 2016-09-06 21:24:19 UTC
Test is passing, can't see the error message when running the test.