| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Drop python 3.4, prep for adding types
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a replace method to git.Commit. The replace method returns a
copy of the Commit object with attributes replaced from keyword
arguments. For example:
>>> old = repo.head.commit
>>> new = old.replace(message='This is a test')
closes #1123
|
| |
|
|
|
|
|
|
|
| |
The iterator used to yield Commit() objects, which does not play well
with inheritance. Yield cls() instead.
Signed-off-by: Yuri Volchkov <yuri@volch.org>
|
|
|
|
| |
Fixes #1116
|
|
|
| |
Add __next__ method to git.cmd.Git.CatFileContentStream, so it can actually be used as an iterable
|
|
|
|
|
|
|
|
| |
FETCH_HEAD is one of the symbolic references local to the current
worktree and as such should _not_ be looked up in the 'common_dir'. But
instead of just hard coding the "right thing" (git_dir) lets defer this
to the SymbolicReference class which already contains this knowledge in
its 'abspath' property.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
However, the test asserts on the provided context to be correct,
which is hard to do in this branch while it's easy to doubt the value
of this.
Lastly, there seems to be no way to ignore errors in `git` without
muting all output, which is in fact parsed.
Maybe it's possible to ignore errors while parsing the new kind of
error message.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Authored based on
https://github.com/gitpython-developers/GitPython/issues/1099#issuecomment-754606044
Fixes #1099
|
| |
|
|
|
|
|
|
| |
There is a small typo in git/repo/base.py.
Should read `repository` rather than `repostory`.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
In c96476b, the new default_name nested function does not contain a
retun statement. This leads to an issue when the environment variables
are not present, where the actor name would not be set.
Signed-off-by: Athos Ribeiro <athos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling getpass.getuser may lead to breakage in environments where there
is no entries in the /etc/passwd file for the current user.
Setting the environment variables for the git user configurations should
prevents GitPython from using values from /etc/passwd. However, doing so
will not prevent reading /etc/passwd and looking for an entry with the
current user UID.
This patch changes the behavior described above so GitPython will
perform a lazy evaluation of /etc/passwd, only doing so when the
environment variables for the git user configuration are not available.
Signed-off-by: Athos Ribeiro <athos@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible to specify a pathspec (eg :!foo) to git diff/status/...
but it currently fails with:
git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128)
cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo
stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree.
Add missing '--' to the arguments to fix this ambiguity
Signed-off-by: Arnaud Patard <apatard@hupstream.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is necessary when working with conditional include
sections as it requires the git directory or active branch name.
https://git-scm.com/docs/git-config#_conditional_includes
|
| |
|
| |
|
|
|
|
|
|
| |
There's no easy way to re-create a commit (i.e. for rewriting purposes), because dates must be formatted as strings, passed, then parsed back.
This patch allows parse_date() to accept datetime instances, such as those produced by from_timestamp() above.
|
|
|
|
|
|
|
|
| |
Deleting a symbolic ref with e.g. the name 'refs/remotes/origin/mas'
would also delete 'refs/remotes/origin/master' if the ref had to be
deleted from the pack file.
In order to fix this the full ref is now checked for a match.
|
|
|
|
| |
as errors.
|
|
|
|
|
|
|
|
|
| |
This should ensure that tests are NOT packaged into
release package by setuptools, as tests are development
only
+ fixtures after moving
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This should ensure that tests are NOT packaged into
release package by setuptools, as tests are development
only
+ fixtures after moving
Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
|
| |
|
| |
|
| |
|