aboutsummaryrefslogtreecommitdiff
path: root/git
AgeCommit message (Collapse)Author
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
2015-05-13Fix type error (startswith expects bytes)John L. Walker
2015-04-22fix(config): selective cfg write;fix cfg parserSebastian Thiel
* 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
2015-04-21test: make git-daemon port configurable via envBenedikt Morbach
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.
2015-04-21test: Make git-daemon only listen on localhostBenedikt Morbach
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
2015-04-16fix(test_docs): we are at major version 1 nowSebastian Thiel
It expected to see major version 0 though.
2015-04-16fix(indent): flake-8 happynessSebastian Thiel
2015-04-15fix(util): Correct number of op codesMatt Jordan
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)
2015-04-15fix(util): Handle 'Finding sources' messages in RemoteProgressMatt Jordan
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.
2015-04-08Merge branch 'teeberg-master'Sebastian Thiel
2015-04-08fix(test_cmd): handle GitCommandNotFound in testSebastian Thiel
Related to #248
2015-04-08fix(cmd): throw GitCommandNotFoundError ...Sebastian Thiel
... if it is not found. Previously, especially on windows, this wasn't explicit. Fixes #248, affects #126
2015-04-08fix(remote): allow to raise during push/fetchSebastian Thiel
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
2015-04-08fix(docs): be clear about exit code handlingSebastian Thiel
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
2015-04-08fix(index): _store_path() now closes it's streamSebastian Thiel
This should prevent a resource warning given in py3 Fixes #263
2015-04-08fix(index): don't write extension data by defaultSebastian Thiel
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
2015-04-07fix(externals): init external in dev mode onlySebastian Thiel
Previously it would always adjust your system path, which is bad behaviour.
2015-04-07test(index): test for #265Sebastian Thiel
However, it doesn't reproduce on the latest version of GitPython. Maybe it's on an older one.
2015-04-07Fix problem with submodules on WindowsMarkus Siemens
On Windows, `repo.create_submodule(...)` failed because git didn't recognize the worktree path set in `.git/modules/sub/config` (`fatal: bad config file line 6 in ./config`). This commit makes `_write_git_file_and_module_config` convert the worktree path to the linux format (forward slashes) which git recognizes.
2015-03-27Fix typoKyle P. Johnson
2015-03-02Store path attribute on Diff objectJames E. Blair
If a file in a commit contains no changes (for example, if only the file mode is changed) there will be no blob attached. This is usually where the filename is stored, so without it, the calling context can not tell what file was changed. Instead, always store a_path and b_path on the Diff object so that information is available.
2015-03-02fix(iter-commit): ambiguous argument errorSebastian Thiel
In repositories like > git branch -a * test > ls test `repo.iter_commits` failed due to an ambigous argument (`'git rev-list test`). Now this cannot happen anymore. fixes #264
2015-02-23Improved documentation on IndexFile.add(...)Sebastian Thiel
Related to #224 [ci skip]
2015-02-21Fixed trailing white space!Sebastian Thiel
Think about how expensive this single invisible character was, with all the time and energy spent on it !
2015-02-21`stale_refs()` may now also handle other kinds of references, like tags.Sebastian Thiel
Fixes #260
2015-02-21Added 'insert_kwargs_after' flag for consumption by _call_process.Sebastian Thiel
While at it, all other invocations of .git in remote.py were reviewed Fixes #262
2015-02-20Apparently, git 1.7.9 supports git-files too, lets assume it's starting at 1.7.0Sebastian Thiel
2015-02-19Adjust minimum git version with git-file support.Sebastian Thiel
As I am pretty sure to have tested it with 1.7.0, I assume they added the git file feature somewhere between .0 .10. Fixes #252
2015-02-19Assure to not iterate packed-refs file, ever.Sebastian Thiel
Related to #252
2015-02-19Fix flake8 issue.Sebastian Thiel
It's new in the latest version of flake - thanks travis for letting me know.
2015-02-19Use uuid instead of tempfile.mkdtmp, which created an actual directory.Sebastian Thiel
That, over time, could have caused slow downs due to file-system hassle. Fixes #258
2015-02-09Replace GIT_SSH with GIT_SSH_COMMAND for SSH key management.Jonas Trappenberg
Also move untestable documentation out of test. Related: #234, #242
2015-02-09Added previously missing parameter documentation for Repo.__init__ .Sebastian Thiel
Related to #255
2015-02-09Merge branch 'bf/run_hooks_from_working_dir' of ↵Sebastian Thiel
https://github.com/yarikoptic/GitPython into yarikoptic-bf/run_hooks_from_working_dir
2015-02-09Minor Flake8 fixes.Sebastian Thiel
Latest version of it is required to show the issues travis shows as well
2015-02-08BF: run commit hook with repo.working_dir as cwdYaroslav Halchenko
Otherwise commit hook might rightfully fail, as happens if repository is e.g. git-annex repository. See e.g. now failing https://travis-ci.org/datalad/datalad/builds/49802394\#L1590 which seems to pass tests nicely with patch as this
2015-02-07BF: skip unicode filename test in env not supporting unicode encodingsYaroslav Halchenko
2015-02-07ENH: respect GIT_PYTHON_TEST_GIT_REPO_BASE env var in testsYaroslav Halchenko
2015-01-30This should fix the test failure on travisSebastian Thiel
2015-01-30Added test to verify we can handle fetch prunes.Sebastian Thiel
They are just skipped. Fixes #249
2015-01-30Remote.update() didn't pass kwargs along to git command.Sebastian Thiel
Fixes #250
2015-01-22Removed Git.sshkey() as it couldn't be distributed properly.0.3.6Sebastian Thiel
However, I kept information on how to achieve the same thing with `custom_environment()` in the test. Related to #234
2015-01-22Bumped version to 0.3.6Sebastian Thiel
Unfortunately, installation of a executable script has proven to be so difficult thanks setuptools gloriousness, which will force me to remove that feature
2015-01-22Improved performance of rev-parse test.Sebastian Thiel
Hoping to make this significantly faster on travis. Related to #245
2015-01-22Minor improvements to submodule test for windows portabilitySebastian Thiel
However, most tests fail for reasons unknown - SHA cannot be found. For now, I will wait until someone complains, as I doubt too many people will use it on windows. Related to #244
2015-01-22Added test for `sshkey` context manager.Sebastian Thiel
It verifies that the script is actually called. Interestingly, the shell script version works within an msysgit environment on windows. Fixes #234