gbp.conf: Make config option printing more consistent
import-orig: move is_link_target() to common module

This change makes is_link_target() re-usable in the upcoming RPM-tools.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
common/pq: use strip in apply_and_commit_patch()

Use the strip information of the patch when applying patches. Also,
changes GitRepository.apply_patch() to accept integer values as 'strip'
argument.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
deb.git: Fixed typo in method name

the double underscore prefix was dropped ages ago.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Make TestDir testcase use a newly created directory

neeeded for the upcoming packagename/version parsing support
UpstreamSource: automatically detect package name and versions from directories

of the form packagename-<version>
PristineTar: move Debian-specific stuff to DebianPristineTar

Continuation to the PristineTar refactoring, makes the "common"
PristineTar independent of DebianPkgPolicy. This commit moves the
Debian-specific has_commit() and checkout() methods to DebianPristineTar
class and replaces them with more generic functions in the base class.
Also, drops the Debian-specific get_commit() method completely, as it
was not used outside the PristineTar class itself.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: fix process cwd in _git_inout()

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: test GitRepository.get_commit_info()
GitRepository: make get_commit_info() more robust

Now uses git-show instead of git-log. This is needed for further
enhancements (namely to get name-status for merge commits). Also, use
null-character as the field separator which makes parsing more reliable.

The method now returns 'body' of the commit message as is, without
stripping or splitting to lines.

In addition, get_commit_info() now uses GitArgs and _git_inout() instead
of the deprecated _git_getoutput().

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: return GitModifier object instead of separate fields

this make sure the number of return values doesn't stays sane when
also returning timestamps and committer information.
GitRepository: Add test that covers remote branches in has_branch()
Make exception syntax consistent
GitRepository/get_commit_info: check return value of git command correctly

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/rev_parse: add new argument 'short'

Adds a new argument to get abbreviated SHA1.

Also, modifies rev_parse() to use GitArgs class.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: Make rev_parse's short option an int everywhere
git.repository.GitRepository.add_remote_repo: use GitArgs
gbp.git.GitRepository: Add remove_remote
GitRepository/get_author_info: return user.name as name

Return users full name (user.name) instead of email (user.email) as the
'name' of the author when taking the value from git config.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: option to ignore untracked in is_clean()

Add an option to ignore untracked files when checking if the repository
is clean.

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