aboutsummaryrefslogtreecommitdiff
path: root/git/repo
AgeCommit message (Collapse)Author
2017-11-19Merge pull request #692 from Dreamsorcerer/patch-1Sebastian Thiel
Fix broken progress in clone_from()
2017-11-02Merge pull request #686 from jeblair/issue-605Sebastian Thiel
Only gc.collect() under windows
2017-10-30Update base.pySam Bull
2017-10-30Update base.pySam Bull
2017-10-09Only gc.collect() under windowsJames E. Blair
Under Windows, tempfile objects are holding references to open files until the garbage collector closes them and frees them. Explicit calls to gc.collect() were added to the finalizer for the Repo class to force them to be closed synchronously. However, this is expensive, especially in large, long-running programs. As a temporary measure to alleviate the performance regression on other platforms, only perform these calls when running under Windows. Fixes #553
2017-10-07Converting path in clone and clone_from to str before any other operation in ↵Mikuláš Poul
case eg pathlib.Path is passed
2017-09-30Keeping env values passed to `clone_from`Piotr Babij
2017-09-28Merge pull request #654 from vathpela/worktreesSebastian Thiel
worktrees: make non-packed refs also work correctly.
2017-09-28Merge branch 'master' of https://github.com/Plazmaz/GitPython into ↵Sebastian Thiel
Plazmaz-master
2017-08-25util: move expand_path from repo/base and use it in Git class initAlexis Horgix Chotard
2017-08-24Fixed missing parameter and changed nameDylan Katz
2017-08-22worktrees: make non-packed refs also work correctly.Peter Jones
Turns out aec58a9 did the right thing for /packed/ refs, but didn't work correctly on /unpacked/ refs. So this patch gives unpacked refs the same treatment. Without the fix here, the test added will cause this traceback: ====================================================================== ERROR: Check that we find .git as a worktree file and find the worktree ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pjones/devel/github.com/GitPython/git/test/lib/helper.py", line 92, in wrapper return func(self, path) File "/home/pjones/devel/github.com/GitPython/git/test/test_repo.py", line 938, in test_git_work_tree_dotgit self.assertIsInstance(repo.heads['aaaaaaaa'], Head) File "/home/pjones/devel/github.com/GitPython/git/util.py", line 893, in __getitem__ raise IndexError("No item found with id %r" % (self._prefix + index)) IndexError: No item found with id 'aaaaaaaa' Woops. Things I've learned: - test_remote doesn't work currently if you start on a branch. I think it never did? - Because of 346424da, all *sorts* of stuff in the test suite doesn't work if you name your development branch "packed-refs" (This seems like a bug...) Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-21Fix leaking environment variablesDylan Katz
2017-07-01Repo: handle worktrees betterPeter Jones
This makes Repo("foo") work when foo/.git is a file of the form created by "git worktree add", i.e. it's a text file that says: gitdir: /home/me/project/.git/worktrees/bar and where /home/me/project/.git/ is the nominal gitdir, but /home/me/project/.git/worktrees/bar has this worktree's HEAD etc and a "gitdir" file that contains the path of foo/.git . Signed-off-by: Peter Jones <pjones@redhat.com>
2017-04-09Handle non-deterministic __del__ in RepoSebastian Thiel
Fixes #610
2017-04-04so minor that wasn't even worth my time typing this commentYaroslav Halchenko
2017-03-09Spelling fixesVille Skyttä
2017-03-07Document the use of next to throw an exception when hitting EOFGeorge Hickman
2017-03-07Ignore all lines of subsequent hunks until last one is foundGeorge Hickman
Git version 2.11.1+ introduced extra lines into the subsequent hunk sections for incremental blame output. The documentation notes that parsers of this output should ignore all lines between the start and end for robust parsing.
2017-02-25Merge branch 'git_work_tree' of https://github.com/tbhartman/GitPython into ↵Sebastian Thiel
tbhartman-git_work_tree
2017-02-25Merge pull request #555 from ankostis/cntxtmmanSebastian Thiel
Retrofit `repo` class as context-man to cleanup global mman on repo-delete
2017-02-24check for GIT_WORK_TREETimothy B. Hartman
2016-12-31DOC: minor typoRaphael Boidol
2016-12-08chore(repo): remove commentSebastian Thiel
As it does not appear to be the case. See https://github.com/gitpython-developers/GitPython/issues/547#issuecomment-257270026 [skip ci]
2016-12-08fix(leaks): repo context-man to cleanup global mman on repo-deleteKostis Anagnostopoulos
Improve API for problems like #553.
2016-10-22fix(repo): Use GIT_DIR only if no repo-path givenKostis Anagnostopoulos
FIX #535 according to Byron's comment: https://github.com/gitpython-developers/GitPython/issues/535#issuecomment-255522529
2016-10-22Merge remote-tracking branch 'origin/master' into exp_git_dirKostis Anagnostopoulos
2016-10-22Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-cygwin
2016-10-20Fix some typosSantiago Castro
2016-10-19Merge with latest branch 'exp_git_dir'Kostis Anagnostopoulos
Conflicts: git/repo/base.py git/repo/fun.py git/test/test_submodule.py
2016-10-19repo: minor code and doc correcions.Kostis Anagnostopoulos
+ Expansion of paths also `osp.normalize()` them. + Make Repo-fields --> class-fields to avoid initializations on construct. + Explain and rename `git.repo.fun.find_git_dir()` is for submodules (`find_submodule_git_dir()`).
2016-10-19FIX #535: expand also GIT_DIR var on Repo-constructKostis Anagnostopoulos
+ Ignore "empty" GIT_DIR vars. + Improve documentation on the constructor `path` parameter.
2016-10-16cygwin, #533: FIX submodules detection (~10TCs fixed)Kostis Anagnostopoulos
+ Decygpath sm's `.git` file contents. + Polish another path in `git add`; actually no main-code changes, just a replace \-->/ on a relative(!) path to make cygwin-git to work. - REGRESSION `test_git_submodules_and_add_sm_with_new_commit` asks for user/email settings. - Cygwin TCs failing: - PY2: err: 2, fail: 1 - PY3: err: 2, fail: 1
2016-10-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
2016-10-14cygwin, #533: Allow '/cygdrive/c/' paths on repo initKostis Anagnostopoulos
- Cygwin TCs failing: - PY2: err: 13, fail: 2 - PY3: err: 12, fail: 2
2016-10-14cygwin, #533: Polish also --git-separate-dirKostis Anagnostopoulos
- Cygwin TCs failing: - PY2: err: 13, fail: 3 - PY3: err: 12, fail: 3
2016-10-14cygwin, #533: Try to make it work with Cygwin's Git.Kostis Anagnostopoulos
+ Make `Git.polish_url()` convert paths into Cygwin-friendly paths. + Add utility and soe TCs for funcs for detecting cygwin and converting abs-paths to `/cygdrive/c/...`. - Cygwin TCs failing: - PY2: err: 14, fail: 3 - PY3: err: 13, fail: 3
2016-10-12daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos
+ Parse most remote & config-urls \-->/. + Used relative daemon-paths. + Use git-daemon PORT above 10k; on Windows all below need Admin rights. +FIXED git-daemon @with_rw_and_rw_remote_repo(): + test_base.test_with_rw_remote_and_rw_repo() PASS. + test_remote.test_base() now freezes! (so still hidden win_err) + repo_test: minor finally delete test-repos created inside this repo. + util: delete unused `absolute_project_path()`.
2016-10-12repo, cmd: DROP UNEEDED Win path for chcwd & check for '~' homedirKostis Anagnostopoulos
+ Do not abspath twice when contructing cloned repo. + Add `git.repo.base` logger.
2016-10-04io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos
2016-10-04src: No PyDev warningsKostis Anagnostopoulos
+ Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
2016-10-02FIX regression by #519 on reading stdout/stderr of cmdsKostis Anagnostopoulos
2016-10-01Win, #519: FIX repo TCs.Kostis Anagnostopoulos
+ FIX TestRepo.test_submodule_update(): + submod: del `.git` file prior overwrite; Windows denied otherwise! + FIX TestRepo.test_untracked_files(): + In the `git add <file>` case, it failed with unicode args on PY2. Had to encode them with `locale.getpreferredencoding()` AND use SHELL. + cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per command. + repo: replace blocky `communicate()` in `_clone()` with thread-pumps. + test_repo.py: unittestize (almost all) assertions. + Replace open --> with open for index (base and TC). + test_index.py: Enabled a dormant assertion.
2016-10-01repo-TCs, #519: FIX config resource leaksKostis Anagnostopoulos
+ Modify lock/read-config-file code to ensure files closed. + Use `with GitConfigarser()` more systematically in TCs. + Clear any locks left hanging from prev Tcs. + Util: mark lock-files as SHORT_LIVED; save some SSDs...
2016-09-28src: constify is_<platform>() callsKostis Anagnostopoulos
+ TCs: unittest-asserts for git-tests.
2016-09-27src, #519: collect all is_<platform>() callsKostis Anagnostopoulos
2016-09-11fix(repo): make it serializable with pickleSebastian Thiel
It's entirely untested if this repo still does the right thing, but I'd think it does. Fixes #504
2016-08-17use $GIT_DIR when setPiotr Gaczkowski
2016-08-02Merge pull request #496 from haizaar/masterSebastian Thiel
is_dirty supports path. Fixes #482.