Age | Commit message (Collapse) | Author |
|
Simple wrapper to the git-status command.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This is a method of getting the filename and status information of a
diff. That is, a list of files that changed and their status, "added",
"modified" etc.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Change-Id: I9331fec6fcd0e58dad7cb4a571a683e09ce08011
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
For generating textual diffs. Useful for Pq - for example, the 'patch'
utility does not support git binary diffs.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
so set one in the tests before trying to set the upstream branch.
Found with git 1.8.3.2
|
|
This kills another _git_getoutput. Also deprecate the method since we
don't need to special case the subject.
|
|
Add a new 'patchname' field to the information returned by
get_commit_info. That is, the subject in a sanitized format, similar to
what git-format-patch uses.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
to avoid spurious output on the console and add the error message to the
exception intead.
|
|
None of the gbp script rely on the output being printed. In fact we
improve the exception by appending the stderr output.
|
|
Provides more output options than find_tag().
- longfmt: for getting the tag name in the long format (tag, number of
commits and sha1)
- always: for falling back to sha1 if no (matching) tag name is found
- abbrev: for defining the length of sha1 returned
Change GitRepository.find_tag() to use the the new method.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
so we don't have to expose all the details of Debian's different
files and conventions.
|
|
This puts test dirs below /tmp which often is a tmpfs.
All tests include the context module which consolidates tmpdir creation
and cleanup, undoes a chdir in teardown and silences log messages.
|
|
In order to initialize gbp logging properly. Fixes false positives when
the GitRepository tests are run alone.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
More intelligent parsing of the git output (man page). Try to
parse optional options like '--[no-]standard-notes' of git-show
correctly. In this example both 'no-standard-notes' and 'standard-notes'
would be available.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Support getting the complete history of an arbitrary commit-ish
(since=None, until=COMMIT-ISH). Formerly this was only possible for the
current git HEAD. Now, get_commits(since=None, until='COMMIT')
translates to 'git log COMMIT'.
Also, for consistency, add support for getting the history from an
arbitrary commit until the current HEAD (since=COMMIT-ISH, until=None).
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Makes the diff function more versatile. I.e. makes diffing only certain
paths possible. Also, add basic unittests for the diff() method.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This method is intended for checking if the local git (client) command
supports a certain feature. The "feature" is considered to be a
command line option. E.g. does "merge" command have the "edit" feature
translates to does git-merge support the '--edit' command line option.
To figure this out, _cmd_has_feature() parses through the "OPTIONS"
section of the man page of the git command.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
set_upstream_branch sets upstream branch for the local branch using
git branch --set-upstream
get_upstream_branch returns info about upstream branches
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
|
|
Add file status and name to the info returned by the get_commit_info()
method.
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add committer to the info returned by get_commit_info() method. Returns
committer name, email and timestamp as a GitModifier object.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add author timestamps to the info returned by get_commit_info() method.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add an option to ignore untracked files when checking if the repository
is clean.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
|
|
|
|
|
|
this make sure the number of return values doesn't stays sane when
also returning timestamps and committer information.
|
|
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>
|
|
|
|
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
|
|
Git-Dch: Ignore
|
|
Closes: #672642
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
get_obj_type() returns the type of a git repository object.
|
|
|
|
|
|
|
|
|
|
to check if a branch contains a specific commit
|
|
|
|
|