Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558494 - repoman -vdx --echangelog=n -a commit fails on empty git tree ('HEAD': unknown revision)
Summary: repoman -vdx --echangelog=n -a commit fails on empty git tree ('HEAD': unknow...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL: http://stackoverflow.com/questions/97...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 17:10 UTC by Justin Lecher (RETIRED)
Modified: 2022-07-12 03:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2015-08-23 17:10:02 UTC
repoman -vdx --echangelog=n -a -m "test commit" commit

RepoMan scours the neighborhood...
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[INFO] checking package dev-python/packaging
>>> Creating Manifest for /local/home/justin/tree/dev-python/packaging
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
RepoMan sez: "Doing nothing is not always good for QA."

(Didn't find any changed files...)
Comment 1 Zac Medico gentoo-dev 2015-08-23 20:33:11 UTC
As a workaround can initialize the repository, you can initialize the repository HEAD with an empty commit like this:

  git commit --allow-empty -m "initial empty commit"


We can fix repoman to use the empty tree hash when HEAD does not exist. The empty tree hash is 4b825dc642cb6eb9a060e54bf8d69288fbee4904 which can be derived from `git hash-object -t tree /dev/null`.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:18 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.