common/buildpackage: fix handling of empty tarball prefix

Previously empty prefix in tarball generation introduced a leading slash
in all filenames in the archive.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.diff: add 'ignore_submodules' option

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.list_tree: add 'paths' option

Change-Id: I9331fec6fcd0e58dad7cb4a571a683e09ce08011
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.push: Add 'force' option

Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.push: Add 'tags' option

Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.pull: Add 'all_remotes' option

Also changes the method to utilize the GitArgs class.

Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
git: new class and method for remote repositories

Add a new GitRemote class for representing git remote repositories.
The initial, very limited, version only contains information about the
fetch and push URLs of the remote repository.

Also, add a new GitRepository.get_remotes() method for getting remote
repositories as instances of the new GitRemote class.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.has_remote_repo: use get_remotes method

Use the new get_remotes() method

Change-Id: Ic34cf590a6f36e6fa0af2ffbe932c8ae3a198944
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: deprecate the get_remote_repos method

Superceded byt the get_remotes() method.

Change-Id: I34f9e8b8188b5a40ce21d2f74e6068f2aaec9e60
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: add test for archiving without git submodules

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: use eq_ and ok_ from nose tools in submodule tests

For consistency and better assert error messages.

Change-Id: Ie6502daac6cee0176db5f099b91803292c17ceea
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: add some docstrings to git submodule tests

Change-Id: I0ba9e6b59e2a819b5cde1be6fbb53b8ecbb67025
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: upper case global variables in submodule tests

Prevent some confusing name clashes.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: remove unused import in submodule tests

Change-Id: Ida67f9640624a92ffc1afd90dc33efe01b38db5c
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>