summaryrefslogtreecommitdiff
path: root/git
Commit message (Collapse)AuthorAgeFilesLines
...
| * Always add '--' to git resetJames E. Blair2015-07-171-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | typo in submodules api documentationJulien Pivotto2015-07-171-1/+1
|/
* added tests for commits with datesavi2015-07-172-1/+13
|
* Added two extra paramaters for commit to take author date and commit dateavi2015-07-172-5/+13
|
* Correct doc errorsMarian Wieczorek2015-07-162-2/+2
| | | | | | | | | 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
* Fix typoTanner Netterville2015-07-151-1/+1
|
* fix(config): use `str.startswith('~')` instead of `'~' in str`Mihyaeru2015-07-061-1/+1
|
* fix(config): care tilde in include.path configMihyaeru2015-07-061-0/+2
|
* fix(travis): get py2.6 to workSebastian Thiel2015-07-031-1/+1
| | | | Seems like OSX is somewhat special here ... .
* fix(cmd): work with py3Sebastian Thiel2015-07-032-2/+7
| | | | | | 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.
* fix(cmd): don't open stdout when fetchingSebastian Thiel2015-07-034-96/+105
| | | | | | | 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
* test(git): remove unnecessary fixtureSebastian Thiel2015-07-032-5015/+12
| | | | | Test was adjusted as well to parse only a single file which simulates stderr output.
* test(remote): make assertion less verboseSebastian Thiel2015-07-031-2/+3
|
* fix(cmd): line parsingSebastian Thiel2015-07-034-68/+10101
| | | | | | * 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.
* Add env parameter to Repo.clone_from() for setting environment variablesJon Lund Steffensen2015-06-301-2/+6
| | | | | | | 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().
* Fix docstring of Repo.clone_from()Jon Lund Steffensen2015-06-291-0/+1
|
* fix(git-test): assure test does works on linuxSebastian Thiel2015-06-261-1/+2
| | | | | | | It shows that the previous implementation was never really working on linux, and thus failed on travis as well for good reason. Closes #303
* fix(index): handle adding symlinks to dirsSebastian Thiel2015-06-262-12/+27
| | | | | | | | | | 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
* fix(logging): monkeypatch logging with NullHandlerSebastian Thiel2015-06-261-0/+10
| | | | | This will make usage of the `NullHandler` possible in python 2.6 and below.
* Added NullHandlers to all loggers to preven "No handler" messagesJames Nowell2015-06-255-0/+5
| | | | | | | | 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.
* Merge pull request #291 from hvnsweeting/support-init-choosing-backendSebastian Thiel2015-06-101-2/+7
|\ | | | | support passing odbt for using with Repo
| * add docstring for new argHung Nguyen Viet2015-06-011-0/+5
| |
| * support passing odbt for using with RepoHung Nguyen Viet2015-06-011-2/+2
| |
* | fix(remote): assert fetch respec is setSebastian Thiel2015-06-102-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | fix(test_git): handle `select.poll()` missingSebastian Thiel2015-06-101-6/+10
| | | | | | | | | | | | | | | | | | 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).
* | fix(remote): don't close stdout on fetch/pullSebastian Thiel2015-06-101-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch 'master' of https://github.com/victorgp/GitPython into ↵Sebastian Thiel2015-06-101-1/+1
|\ \ | | | | | | | | | victorgp-master
| * | While parsing errors, also detecting lines starting with error:Victor Garcia2015-06-081-1/+1
| |/
* | refactor(repo): parameter renaming and cleanupSebastian Thiel2015-06-101-6/+3
| | | | | | | | | | | | | | | | | | | | * 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
* | Merge branch 'submodule_fix' of https://github.com/Javex/GitPython into ↵Sebastian Thiel2015-06-101-4/+14
|\ \ | |/ |/| | | Javex-submodule_fix
| * Allow submodules to be ignored in is_dirtyjavex2015-06-051-4/+14
| | | | | | | | | | | | 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.
* | fix(git-cmd): set LANGUAGE as wellSebastian Thiel2015-05-311-0/+3
| | | | | | | | | | | | This is a pre-emptive measure based on http://goo.gl/l74GC8 . Related to #290
* | fix(git-cmd): use LC_ALL instead of LC_MESSAGESSebastian Thiel2015-05-311-2/+4
| | | | | | | | | | | | | | | | | | 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
* | Fix type error (startswith expects bytes)John L. Walker2015-05-131-1/+1
| |
* | fix(config): selective cfg write;fix cfg parserSebastian Thiel2015-04-223-7/+17
| | | | | | | | | | | | | | | | | | | | | | * config parser now handles quoted values correctly. This doesn't hamper multi-line support. * added regression test to travis to assure we will be warned if we rewrite and break the user's .gitconfig file * only rewrite configuration files if we actually called a mutating method on the writer. Previously it would always rewrite it. Fixes #285
* | test: make git-daemon port configurable via envBenedikt Morbach2015-04-212-5/+10
| | | | | | | | | | add a GIT_PYTHON_TEST_GIT_DAEMON_PORT to set a port other than 9418, for example for when you already have a daemon running on that port.
* | test: Make git-daemon only listen on localhostBenedikt Morbach2015-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | No reason to expose a daemon to all interfaces when it is only used for tests, which connect to localhost anyway. I'd love to use localhost here instead, but the git-daemon man page points out: If IPv6 is not supported, then --listen=hostname is also not supported and --listen must be given an IPv4 address. I don't know of a way to check if git has ipv6 support, but 127.0.0.1 should be around for the foreseeable future
* | fix(test_docs): we are at major version 1 nowSebastian Thiel2015-04-161-1/+1
| | | | | | | | It expected to see major version 0 though.
* | fix(indent): flake-8 happynessSebastian Thiel2015-04-161-1/+2
| |
* | fix(util): Correct number of op codesMatt Jordan2015-04-151-1/+1
| | | | | | | | | | | | | | The previous patch failed to update the expected number of op_codes, which would result in an exception when creating an instance of RemoteProgress. This patch corrects the value to the new expected number of op_codes (8)
* | fix(util): Handle 'Finding sources' messages in RemoteProgressMatt Jordan2015-04-151-1/+3
|/ | | | | | | | | | | When running a long running operation (such as a clone on a large repo), Git may return a message indicating that it is 'Finding sources'. Since there is no bit field value for this message, this causes a large amount of error messages to be emitted to stderr. This patch fixes this by adding another bit field value for this message, FINDING_SOURCES. Derived classes can look for this op_code and handle it appropriately.
* Merge branch 'teeberg-master'Sebastian Thiel2015-04-081-9/+0
|\
| * Replace GIT_SSH with GIT_SSH_COMMAND for SSH key management.Jonas Trappenberg2015-02-091-9/+0
| | | | | | | | | | | | Also move untestable documentation out of test. Related: #234, #242
* | fix(test_cmd): handle GitCommandNotFound in testSebastian Thiel2015-04-081-5/+2
| | | | | | | | Related to #248
* | fix(cmd): throw GitCommandNotFoundError ...Sebastian Thiel2015-04-082-13/+39
| | | | | | | | | | | | | | ... if it is not found. Previously, especially on windows, this wasn't explicit. Fixes #248, affects #126
* | fix(remote): allow to raise during push/fetchSebastian Thiel2015-04-083-34/+14
| | | | | | | | | | | | | | | | | | | | Do not swallow non-zero exit status during push and fetch unless we managed to parse head information. This behaviour will effetively handle cases were no work was done due to invalid refspecs or insufficient permissions. Fixes #271
* | fix(docs): be clear about exit code handlingSebastian Thiel2015-04-082-3/+28
| | | | | | | | | | | | | | | | When pushing/pulling, we ignore errors unless it's exit code 128. The reason for this is now made explicit to make clear that issues are handled by PushInfo flags accordingly. Related #271
* | fix(index): _store_path() now closes it's streamSebastian Thiel2015-04-081-0/+1
| | | | | | | | | | | | This should prevent a resource warning given in py3 Fixes #263
* | fix(index): don't write extension data by defaultSebastian Thiel2015-04-082-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turned out that the index is not actually corrupted, which is good news. What happens is that `git` writes `TREE` extension data into the index, which causes it to write out the given tree *as is* next time a `git commit` is executed. When using `git add`, this extension data is maintained automatically. However, GitPython doesn't do that ... . Usually this is no problem at all, as you are supposed to use `IndexFile.commit(...)` along with `IndexFile.add(...)`. Thanks to a shortcoming in the GitPython API, the index was automatically written out whenever files have been added, without providing control over whether or not *extension data* will be written along with it. My fix consists of an additional flag in `IndexFile.add(...)`, which causes extension data not to be written by default, so commits can be safely done via `git commit` or `IndexFile.commit(...)`. However, this might introduce new subtle bugs in case someone is relying on extension data to be written. As this can be controlled through the said flag though, a fix is easily done in that case. Fixes #265
* | fix(externals): init external in dev mode onlySebastian Thiel2015-04-071-1/+2
| | | | | | | | | | Previously it would always adjust your system path, which is bad behaviour.