aboutsummaryrefslogtreecommitdiff
path: root/git
AgeCommit message (Collapse)Author
2015-08-20fix(test): update to changes.Marcos Dione
2015-08-20fix(cmd): make short options with arguments become two separate arguments ↵Marcos Dione
for the executable.
2015-08-17fix(test_index): fix encodingSebastian Thiel
I really never want to touch python again, and never deal with py2/3 unicode handling anymore. By now, it seems pretty much anything is better. Is python to be blamed for it entirely ? Probably not, but there are better alternatives. Nim ? Rust ? Ruby ? Totally
2015-08-17fix(commit): serialization timezone handlingSebastian Thiel
Previously timezones which were not divisable by 3600s would be parsed correctly, but would serialize into a full hour, rounded up. Now floating point computation is used which fixes the issue. Related to #336
2015-08-08fix(tests): remove dependency on sort orderSebastian Thiel
Now we select the submodule by name, not by index. The latter is not deterministic. Closes #335
2015-08-08tests(submodule): add new submodule commitsSebastian Thiel
It's somewhat more complex to add new commits in submodules to the parent repository. The new test shows how to do that in a 'GitPythonic' way. Related to #335
2015-07-29fix(index):allow adding non-unicode paths to indexSebastian Thiel
This issue only surfaced in python 2, in case paths containing unicode characters were not actual unicode objects. In python 3, this was never the issue. Closes #331
2015-07-29fix(diff): mode-assertions now deal with 0Sebastian Thiel
If the file was not present, the mode seen in a diff can be legally '0', which previously caused an assertion to fail for no good reason. Now the assertion tests for None instead. Closes #323
2015-07-28don't 'log' to stderr in `RemoteProgress`Sebastian Thiel
There is simply no excuse to doing that. Closes #330
2015-07-26Ensure file resources are releasedDavid García Garzón
2015-07-22gic {init,clone} --separate-git-dir is supported only since 1.7.5Julien Pivotto
Without this commit the update() function of a submodule does not work in CentOS 6.
2015-07-21Implement is_ancestorSandy Carter
Wrap `git merge-base --is-ancestor` into its own function because it acts as a boolean check unlike base `git merge-base call`
2015-07-20fix(flake8): remove unused importSebastian Thiel
I knew that flake would eventually get me, especially when least suspected. This time it's even useful, as it is a non-whitespace related issue.
2015-07-20fix(index): remove invalid keyword argumentSebastian Thiel
It was a left-over of some prior hacking that was not removed by accident.
2015-07-20fix(encoding): in `untracked_files()`Sebastian Thiel
I have no idea why PY3 requires such a mess of encoding/decoding statements, but let's just be happy it works. Also let's be sure I never ever write python code again ... EVER.
2015-07-20fix(encoding): in untracked_files() and indexSebastian Thiel
* untracked_files could, if there were spaces in the path returned, re-rencode the previously decoded unicode string thanks to a `decode("string_escape")` call. Now re-encode into utf-8 afterwards - added test to assure this works indeed * IndexFile.add() didn't handle unicode correctly and would write broken index files. The solution was to compute the path length after encoding it into utf-8 bytes, not before ... . Closes #320
2015-07-18Merge pull request #319 from jeblair/fixheadSebastian Thiel
Always add '--' to git reset
2015-07-17Always add '--' to git resetJames E. Blair
If a git repo has the misfortune to have a file with the name "HEAD" at the root level of the repo, git will return an error because it is unsure whether the file or ref is meant: File "/usr/local/lib/python2.7/dist-packages/git/refs/head.py", line 81, in reset self.repo.git.reset(mode, commit, add_arg, paths, **kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 440, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 834, in _call_process return self.execute(make_call(), **_kwargs) File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 627, in execute raise GitCommandError(command, status, stderr_value) GitCommandError: 'git reset --hard HEAD' returned with exit code 128 stderr: 'fatal: ambiguous argument 'HEAD': both revision and filename Use '--' to separate filenames from revisions' Implement its suggested fix by always passing '--' as an argument to "git reset". It is fine to pass it with no file specifiers afterwords. In that case, git knows that "HEAD" is always meant as the ref.
2015-07-17typo in submodules api documentationJulien Pivotto
2015-07-17added tests for commits with datesavi
2015-07-17Added two extra paramaters for commit to take author date and commit dateavi
2015-07-16Correct doc errorsMarian Wieczorek
revA..revB &rarr; revA...revB (three instead of two dots) [base.py, line 467](https://github.com/gitpython-developers/GitPython/blob/master/git/repo/base.py#L467) rorepo is a ~~a~~ Repo instance [test_docs.py, line 21](https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py#L21) closes #314
2015-07-15Fix typoTanner Netterville
2015-07-06fix(config): use `str.startswith('~')` instead of `'~' in str`Mihyaeru
2015-07-06fix(config): care tilde in include.path configMihyaeru
2015-07-03fix(travis): get py2.6 to workSebastian Thiel
Seems like OSX is somewhat special here ... .
2015-07-03fix(cmd): work with py3Sebastian Thiel
Fixed additional test which seems to have different outcomes depending on the interpreter. This just makes it work withouth attempting to find the root cause of the issue.
2015-07-03fix(cmd): don't open stdout when fetchingSebastian Thiel
This allows us to use the main thread to parse stderr to get progress, and resolve assertion failures hopefully once and for all. Relates to #301
2015-07-03test(git): remove unnecessary fixtureSebastian Thiel
Test was adjusted as well to parse only a single file which simulates stderr output.
2015-07-03test(remote): make assertion less verboseSebastian Thiel
2015-07-03fix(cmd): line parsingSebastian Thiel
* Previously we could fail to parse the last line within a read buffer, which is now fixed. * Added a test to verify our *slow* line parsing works as expected.
2015-06-30Add env parameter to Repo.clone_from() for setting environment variablesJon Lund Steffensen
Adds the optional keyword parameter env to Repo.clone_from(). The parameter is a dictionary containing the desired environment variables for the git clone invocation. The environment is applied to the temporary Git instance before calling Repo._clone().
2015-06-29Fix docstring of Repo.clone_from()Jon Lund Steffensen
2015-06-26fix(git-test): assure test does works on linuxSebastian Thiel
It shows that the previous implementation was never really working on linux, and thus failed on travis as well for good reason. Closes #303
2015-06-26fix(index): handle adding symlinks to dirsSebastian Thiel
When expanding directories, check if it is a symlink and don't expand them at all. Previously, we followed symlinks and expanded their contents, which could lead to weird index files. Fixes #302
2015-06-26fix(logging): monkeypatch logging with NullHandlerSebastian Thiel
This will make usage of the `NullHandler` possible in python 2.6 and below.
2015-06-25Added NullHandlers to all loggers to preven "No handler" messagesJames Nowell
When the code is run without setting up loggers, the loggers have no handlers for the emitted messages. The logging module displays: `No handlers could be found for logger "git.cmd"` on the console. By adding a NullHandler (a no-op) the message disappears, and doesn't affect logging when other handlers are configured.
2015-06-10Merge pull request #291 from hvnsweeting/support-init-choosing-backendSebastian Thiel
support passing odbt for using with Repo
2015-06-10fix(remote): assert fetch respec is setSebastian Thiel
It turns out we can't deal do fetches if no refspec is set as git will change the format of the fetch return values, providing less information than usual. A test was added to show that such a case will fail, and an assertion will assure we don't attempt to fetch/pull if there is no refspec for 'fetch'. Closes #296
2015-06-10fix(test_git): handle `select.poll()` missingSebastian Thiel
In that case, the handler for processing stdout and stderr of the git process is offloaded to threads. These currently don't return any exception they raise. We could easily fix this using an approach as shown [here](http://goo.gl/hnVax6).
2015-06-10fix(remote): don't close stdout on fetch/pullSebastian Thiel
Reverted changes of `fe2fbc5~2`. This caused `git-pull` to error, which now actually results in a fatal error while fetching or pulling. Previously we simply didn't check for this issue. Now we are back to a `poll` based or threaded concurrent reading from stdout and stderr to prevent a git process deadlock, and the aforementioned error. Related to #297
2015-06-10Merge branch 'master' of https://github.com/victorgp/GitPython into ↵Sebastian Thiel
victorgp-master
2015-06-10refactor(repo): parameter renaming and cleanupSebastian Thiel
* renamed `consider_submodules` to `submodules` to be in line with the existing parameters. Nowadays I would prefer the `consider_` prefix, but can't change the existing API and thus stick to the current naming scheme. * reduced amount of code in one portion to make it more maintainable. Related to #294
2015-06-10Merge branch 'submodule_fix' of https://github.com/Javex/GitPython into ↵Sebastian Thiel
Javex-submodule_fix
2015-06-08While parsing errors, also detecting lines starting with error:Victor Garcia
2015-06-05Allow submodules to be ignored in is_dirtyjavex
There are cases when might not consider a directory dirty when a submodule has changes. Particular case was git-up stashing changes where submodules are irrelevant.
2015-06-01add docstring for new argHung Nguyen Viet
2015-06-01support passing odbt for using with RepoHung Nguyen Viet
2015-05-31fix(git-cmd): set LANGUAGE as wellSebastian Thiel
This is a pre-emptive measure based on http://goo.gl/l74GC8 . Related to #290
2015-05-31fix(git-cmd): use LC_ALL instead of LC_MESSAGESSebastian Thiel
Previously, only program messages where forced to the C-locale, now we force the entire program. That way, we should assure a remote will not provide us with branch information in any other language but english. Related to #290