summaryrefslogtreecommitdiff
path: root/git-fat
Commit message (Collapse)AuthorAgeFilesLines
* Invalidate git index cache before smudgingTyler Cipriani2018-08-201-5/+12
| | | | | | | | | | | | | | | | | Occasionally we hit the problem where a git smudge filter is not triggered -- for instance, when a file in a working tree's lstat info matches the file in the git index cache. (see racy-git.txt in the git documentation) The previous work-around was touching the git-fat file; however, in cases where git fat checkout is automated there is a chance that touching the file will make no modification to the lstat information (when a touch happens in the same second as a git checkout). In those instances, git will not trigger the smudge filter and the file in the checkout will remain orphaned. We can work around this by ensuring that the timestamp on a file is modified by looking at its previous timestamp and adding 1 to it.
* Use '.' instead of '' to match any pathspec; needed by git >=2.16Jed Brown2018-01-211-0/+2
|
* Remove superfluous iteratorJed Brown2017-06-181-1/+0
|
* Fix sorted syntax for 'git fat find' with Python 2/3 [closes #74]Jed Brown2017-01-311-1/+1
| | | | Reported-by: Isuru Fernando
* Fix syntax and error cleanly on Python-3Jed Brown2014-08-261-1/+5
| | | | | | | | | Python-3 requires careful handling of unicode to avoid breaking Git semantics (which manages strings unencoded) or Python (which insists on processing encoded strings on Windows). This is not done yet, so error cleanly for now. See discussion in issue #42. Suggested-by: Christoph Buchner
* Exit without ugly stack trace when run from outside a Git repository (fixes #45)Jed Brown2014-07-191-1/+4
| | | | Reported-by: "Slavko"
* Merge branch 'upstream' into improve_referenced_objects_performanceJames Murty2014-06-261-1/+1
|\
| * Merge branch 'jmurty/improve-referenced-objects-performance'Jed Brown2014-06-021-9/+38
| |\ | | | | | | | | | | | | | | | | | | * jmurty/improve-referenced-objects-performance: referenced_objects: make comment more precise More sophisticated use of cat-file bulk revision processing in two stages Improve performance when looking up referenced objects.
| | * referenced_objects: make comment more preciseJed Brown2014-06-021-1/+1
| | |
* | | Merge branch 'upstream' into improve_referenced_objects_performanceJames Murty2014-05-311-2/+30
|\ \ \ | |/ /
| * | Move init diagnostics out of cmd_* sectionJed Brown2014-05-251-7/+7
| | |
| * | Merge branch 'add_verify_command' of github:jmurty/git-fat (PR #36)Jed Brown2014-05-251-1/+21
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'add_verify_command' of github:jmurty/git-fat: Add `verify` command to check git-fat object data matches hash filename. Conflicts: git-fat
| | * | Add `verify` command to check git-fat object data matches hash filename.James Murty2014-05-241-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While experimenting with using the --partial option with rsync I managed to corrupt one of my git-fat objects by truncating it. This caused some behaviour in git-fat which seemed odd until I worked out what had happened: it would check out the truncated data but git would see the file as modified and show the changed hash in a diff, while a re-checkout did not reset the file to its original data/hash. This commit adds a `verify` command that cross-checks git-fat object file names (the original SHA1) against the SHA1 of the object's actual data and prints any mismatches. So you can quickly find any dubious objects and decide what to do about them. A better solution might be to calcuate and verify objects' data hash during filter-smudge/checkout though this would likely hurt performance.
| * | | Print fatal error message to stderrJed Brown2014-05-251-1/+2
| | | |
| * | | Moved requirement for init to `checkout` operation.James Murty2014-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since `checkout` op is where the repo really needs to be init'ed for git-fat I moved the requirement to there. This way it is still triggered by a `pull` op, but only at the end after any files have been synced.
| * | | Fail with a clear error if 'git fat pull' is run on uninitialised repo.James Murty2014-05-231-1/+8
| |/ / | | | | | | | | | This fixes issue #25 in the original project.
* | | Avoid potential infinite loop if unexpected EOF received from cat-fileJames Murty2014-05-291-4/+11
| |/ |/| | | | | | | | | Use read() method more defensively to avoid any chance of an infinite loop in the (very unlikely) event an EOF is received mid-way through some `cat-file` data.
* | More sophisticated use of cat-file bulk revision processing in two stagesJames Murty2014-05-281-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | This change takes better advantage of the relative strengths of `cat-file --batch-check` and `cat-file --batch` and combines them. * Uses `cat-file --batch-check` to filter the set of all git objects in bulk, leaving only those that are candidate git-fat object references, based on the object being of type "blob" and of magic size(s) * Uses `cat-file --batch` to read the full contents of all the candidate objects in bulk, for fast processing of their data to find the actual git-fat references.
* | Improve performance when looking up referenced objects.James Murty2014-05-251-5/+16
|/ | | | | | | | | Avoid a cat-file subprocess call per fat object blob by doing slightly uglier parsing of "cat-file --batch" that includes object content, instead of "cat-file --batch-check" that doesn't. In my ad-hoc testing on a reasonable size repository (50k rev-list -objects) this speeds up 'git fat status' by almost 40%.
* Merge branch 'fix-OSError-on-removed-tracked-file' of github:cspurk/git-fat ↵Jed Brown2014-05-091-1/+4
|\ | | | | | | | | | | | | (PR #30) * 'fix-OSError-on-removed-tracked-file' of github:cspurk/git-fat: fix OSError on “git fat pull” with manually removed, tracked files in WC
| * fix OSError on “git fat pull” with manually removed, tracked files in WCChristian Spurk2014-05-091-1/+4
| | | | | | | | If there is any manually removed, tracked file in the working copy, then running “git fat pull” fails with an OSError without this fix.
* | return rsync's exit codes if non-zero in pull and pushNikola Kovacs2014-05-091-0/+4
|/
* allow fat settings to come from global git configurationChris Marinos2014-04-231-1/+3
|
* pull: fix --all to avoid limiting by patterns in current treejed/pull-allJed Brown2014-03-121-0/+2
| | | | | | | | | | | | Regression introduced in: commit c23422388b975f13867457c86c78361dfdf8036e Author: Tomas Herman <tomas.herman@wikidi.com> Date: Tue Apr 23 11:59:38 2013 +0200 Added support for pulling only a subset of files. Reported-by: Nikola Kovacs <nikola.kovacs@gmail.com>
* filter_objects: remove printing that doesn't belong in internal functionsJed Brown2014-03-121-2/+0
|
* filter_objects: files is already a setJed Brown2014-03-121-2/+1
|
* Supporting multiple space separated rsync optionsAndrew Otto2014-03-071-1/+1
|
* Adding support for extra rsync options via rsync.optionsAndrew Otto2014-03-071-2/+5
|
* fix handling of broken symlinksChristian Hitz2013-08-291-1/+4
| | | | | if a symlink has a length of self.magiclen git-fat would crash because it could not read the file
* Merge branch 'symlinks-in-index-filter' of github:chhitz/git-fat (PR #15)Jed Brown2013-08-201-0/+3
|\ | | | | | | | | * 'symlinks-in-index-filter' of github:chhitz/git-fat: ignore symbolic links during index-filter
| * ignore symbolic links during index-filterChristian Hitz2013-08-201-0/+3
| | | | | | | | | | symbolic links should not be handled by git-fat even if their name match the filelist
* | Emacs mode:pythonJed Brown2013-08-201-0/+1
| |
* | make compatible with python2.6Christian Hitz2013-08-201-0/+25
|/ | | | patch from https://gist.github.com/edufelipe/1027906
* Set permissions for object store using current umaskJed Brown2013-07-261-0/+8
| | | | | | | | | | tempfile.mkstemp() creates a file with mode 0600 by default, which after pushing, prevents others from accessing the shared object store. Instead, use 0444 (as with git-native objects) and respect umask so that pushed objects will be readable with default configuration. Noticed-by: Ashok Argent-Katwala <ashok@freshbooks.com> Comments-by: Owen Jacobson <owen.jacobson@grimoire.ca>
* Merge branch 'pull-with-unicode-filenames' of ↵Jed Brown2013-04-281-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/michaelcontento/git-fat (PR #12) This does not resolve all unicode file name issues. We have at least these issues: 1. Filenames sometimes become command-line arguments, which we'd rather avoid because it forces us to decode/encode (on Windows). This can be fixed by systematically using '--stdin' options. 2. We still use 'git ls-files -s' in cmd_index_filter. It should also learn to use the -z option, but unfortunately, Python doesn't have convenient line processing for NUL-delimited streams so we have to write something like difftreez_reader to do that properly. * 'pull-with-unicode-filenames' of https://github.com/michaelcontento/git-fat: fix "git fat pull" for fancy named files [Normalized quoting style in merge.]
| * fix "git fat pull" for fancy named filesMichael Contento2013-04-281-1/+1
|/ | | | | | just add "-z" to "git ls-files" and split the string at the null byte instead of newline. now we get the original name back from git and the os module should handle the communication with the filesystem (but I haven't checked this!).
* Added support for pulling only a subset of files.Tomas Herman2013-04-251-3/+24
|
* Fixed issue with decoding symlinksTomas Herman2013-04-041-1/+1
|
* Fix broken rsync pull, bug introduced in 309f63097aJed Brown2013-02-181-1/+6
|
* Add 'git fat index-filter .. --manage-gitattributes'Jed Brown2013-02-141-0/+12
| | | | | This writes a .gitattributes file for every commit in the history, appending rules for all the now-managed fat files.
* fix the pull case when using rsync with ssh optionsArnaud Gelas2013-01-291-14/+19
|
* Repair pipe handling in 6f1f0d65ba38, handle missing case, and de-duplicateJed Brown2013-01-281-10/+10
|
* add options rsync.sshuser and rsync.sshportArnaud Gelas2013-01-281-6/+17
|
* fat find: positively identify blobs, simplifying filterJed Brown2013-01-211-11/+13
| | | | | git rev-list --objects has a second field for objects other than blobs (like trees), so they cannot be filtered out a priori.
* find and filter-index: experimental features for retroactive cleanupJed Brown2013-01-211-1/+112
|
* Naming consistency, factor filter_clean to be callable from PythonJed Brown2013-01-211-13/+16
|
* filter-clean: fix for zero-length files causing early StopIterationJed Brown2013-01-201-9/+7
|
* Find git-dir so that git-fat can run within a git filter-branch or aJed Brown2013-01-201-1/+2
| | | | bare repository.
* Skip files matching magiclen that fail to decode (they are not managed by us)Jed Brown2012-12-241-2/+5
|
* Fix deadlock when filtering large rev-list, reported by Jozsef BakoskiJed Brown2012-12-241-3/+11
| | | | | | | subprocess.communicate() cannot be used with large files because it is a fully-synchronous interface. Since there is no stream/generator/coroutine support in subprocess.communicate, we have to roll the line iterator ourselves, putting the filter in its own thread.