summaryrefslogtreecommitdiff
path: root/lib/git/objects
Commit message (Collapse)AuthorAgeFilesLines
* Submodule now only supports branches to be given as hint that will ↵Sebastian Thiel2010-11-162-49/+117
| | | | svn-external like behaviour. Implemented first version of update, which works for now, but probably needs to see more features
* Added partial implementation of update, but realized that using refs in ↵Sebastian Thiel2010-11-151-1/+59
| | | | general may be contradicting if a tag is given there, as well as a commit sha of the submodule. Hence it should really be only a branch
* Optimized test-decorators, by completely removing with_bare_rw_repo, which ↵Sebastian Thiel2010-11-151-1/+4
| | | | was mainly copy-paste from with_rw_repo, what a shame
* Repo: added submodule query and iteration methods similar to the ones ↵Sebastian Thiel2010-11-152-3/+51
| | | | provided for Remotes, including test
* Objects: Constructor now manually checks and sets the input arguments to the ↵Sebastian Thiel2010-11-154-49/+227
| | | | | | local cache - previously a procedural approach was used, which was less code, but slower too. Especially in case of CommitObjects unrolling the loop manually makes a difference. Submodule: Implemented query methods and did a bit of testing. More is to come, but the test works for now. As special addition, the submodule implementation uses the section name as submodule ID even though it seems to be just the path. This allows to make renames easier
* Improved GitConfigurationParser to better deal with streams and the ↵Sebastian Thiel2010-11-151-24/+46
| | | | corresponding locks. Submodule class now operates on parent_commits, the configuration is either streamed from the repository or written directly into a blob ( or file ) dependending on whether we have a working tree checkout or not which matches our parent_commit
* submodule: Fleshed out interface, and a partial test which is not yet ↵Sebastian Thiel2010-11-151-3/+112
| | | | usable. It showed that the ConfigParser needs some work. If the root is set, it also needs to refer to the root_commit instead of to the root-tree, as it will have to decide whether it works on the working tree's version of the .gitmodules file or the one in the repository
* Fixed bug that would cause the author's email to be a generic default one, ↵Sebastian Thiel2010-10-271-2/+2
| | | | | | instead of the existing and valid. The rest of the ConfigParser handling is correct, as it reads all configuration files available to git see http://github.com/Byron/GitPython/issues#issue/1
* Added unicode handling for author names. They will now be properly encoded ↵Sebastian Thiel2010-10-151-2/+14
| | | | into the byte stream, as well as decoded from it
* unicode handling in messages and trees was improved. Messages are now ↵Sebastian Thiel2010-08-132-1/+20
| | | | written according to the encoding of the commit object, and decoded using that information as well. Trees will encode and decode their names with utf8
* util.get_user_id(): Will try a windows environment variable as well, the ↵Sebastian Thiel2010-07-161-1/+1
| | | | method now yields good results on all tested platforms
* Unicode: tree_to_stream can now handle unicode names the way git would do ↵Sebastian Thiel2010-07-151-0/+7
| | | | it. Its can be assumed though that there are more bugs related to unicode hanging around in the system
* Adjusted previous object creators to use the rev_parse method directly. ↵Sebastian Thiel2010-07-071-4/+1
| | | | rev_parse could be adjusted not to return Objects anymore, providing better performance for those who just want a sha only. On the other hand, the method is high-level and should be convenient to use as well, its a starting point for more usually, hence its unlikely to call it in tight loops
* Initial version of the rev-parse routine, which doesn't work too bad, but ↵Sebastian Thiel2010-07-061-0/+11
| | | | its still rather slow and many tests are not yet implemented
* win32 compatability adjustmentsunknown2010-07-021-6/+5
|
* Removed blob.data property as there is no real reason for an exception to ↵Sebastian Thiel2010-06-291-11/+1
| | | | the rule of trying not to cache possibly heavy data. The data_stream method should be used instead
* Renamed modules utils to util, and errors to exc to be more conforming to ↵Sebastian Thiel2010-06-296-9/+9
| | | | the submodules's naming conventions
* Updated and fixed sphinx API docs, which included one quick skim-throughSebastian Thiel2010-06-294-12/+15
|
* Diff: fixed bug that caused a string to end up as a blob modeSebastian Thiel2010-06-293-1/+3
|
* All tests adjusted to work with the changed internal sha representationSebastian Thiel2010-06-284-25/+29
|
* Adjusted all files to (hopefully) deal with the fact that all objects now ↵Sebastian Thiel2010-06-258-404/+284
| | | | | | | use 20 byte sha's internally as it is closer to the GitDB implementation Switched all remaining files back to tabs Adjusted all remaining docstrings to suit the sphinx doc convention - its likely that there are many of docstring syntax errors though
* GitCmdStreamReader: fixed terrible bug which only kicked in if the stream ↵Sebastian Thiel2010-06-241-1/+2
| | | | | | was actually empty. This is a rare case that can happen during stream testing. Theoretically there shouldn't be any empty streams of course, but practically they do exist sometimes ;); fixed stream.seek implementation, which previously used seek on standard output Improved GitCmd error handling
* fixed critical bug in traverse_trees_recursive, implemented IndexFile.new ↵Sebastian Thiel2010-06-231-1/+1
| | | | including simple test, it may be simple as the methods it uses are throroughly tested
* Initial frame for implementing read_tree using pure python. As git-read-tree ↵Sebastian Thiel2010-06-221-0/+118
| | | | | | | can do much more than we can ( and faster assumably ), the .new method is used to create new index instances from up to 3 trees. Implemented multi-tree traversal to facilitate building a stage list more efficiently ( although I am not sure whether it could be faster to use a dictionary together with some intensive lookup ), including test Added performance to learn how fast certain operations are, and whether one should be preferred over another
* index.write_tree: initial version implemented, although its not yet working ↵Sebastian Thiel2010-06-223-93/+95
| | | | | | | correctly, a test to explicitly compare the git version with the python implementation is still missing Tree and Index internally use 20 byte shas, converting them only as needed to reduce memory footprint and processing time objects: started own 'fun' module containing the most important tree functions, more are likely to be added soon
* index: Entries are now using flags internally, instead of reducing the flag ↵Sebastian Thiel2010-06-211-1/+1
| | | | information to just the stage ( just to be closer to the git-original )
* Moved small types that had their own module into the utils moduleSebastian Thiel2010-06-143-7/+65
|
* tree: added TreeModifier, allowing to adjust existing trees safely and or ↵Sebastian Thiel2010-06-144-11/+94
| | | | fast, while staying compatible with serialization which requires it to be sorted
* tree now uses less memory for its cache as it stores the bare deserialized ↵Sebastian Thiel2010-06-141-55/+63
| | | | information - this also speeds up later serialization after changes. its clear though that retrieving actual objects is slower currently as these are not cached anymore. Its worth thinking about moving these encoding, decoding routines to gitdb
* Implemented initial version of tree serialization which appears to work ↵Sebastian Thiel2010-06-142-235/+281
| | | | | | | according to a simple test ( presort still needs implementation ) submodule: added stub to allow the tree to return something, its not implemented though
* Removed odb from project, it is now used as a submodule named gitdb, which ↵Sebastian Thiel2010-06-121-1/+1
| | | | | | was added instead Adjusted all imports to deal with the changed package names
* Fixed implementation after design change to deal with it - all tests run, ↵Sebastian Thiel2010-06-042-9/+12
| | | | but next there will have to be more through testing
* initial version of new odb design to facilitate a channel based ↵Sebastian Thiel2010-06-042-5/+5
| | | | multi-threading implementation of all odb functions
* db: implemented GitObjectDB using the git command to make sure we can lookup ↵Sebastian Thiel2010-06-041-19/+13
| | | | everything. Next is to implement pack-file reading, then alternates which should allow to resolve everything
* commit.create_from_tree now uses pure python implementation, fixed message ↵Sebastian Thiel2010-06-033-22/+49
| | | | | | parsing which truncated newlines although it was ilegitimate. Its up to the reader to truncate therse, nowhere in the git code I could find anyone adding newlines to commits where it is written Added performance tests for serialization, it does about 5k commits per second if writing to tmpfs
* odb: implemented loose object streaming, which is impossible to do ↵Sebastian Thiel2010-06-031-2/+2
| | | | efficiently considering that it copies string buffers all the time
* commit: redesigned revlist and commit parsing, commits are always retrieved ↵Sebastian Thiel2010-06-021-58/+40
| | | | | | from their object information directly. This is faster, and resolves issues with the rev-list format and empty commit messages Adjusted many tests to go with the changes, as they were still mocked. The mock was removed if necessary and replaced by code that actually executes
* commit: refactored existing code to decode commits from streams - ↵Sebastian Thiel2010-06-024-275/+301
| | | | | | | performance is slightly better git.cmd: added method to provide access to the content stream directly. This is more efficient if large objects are handled, if it is actually used test.helpers: removed unnecessary code
* commit: initial version of commit_from_tree which could create commit ↵Sebastian Thiel2010-06-023-510/+679
| | | | objects if it could serialize itself
* IndexFile.add: Fixed incorrect path handling if path rewriting was desired ↵Sebastian Thiel2010-05-111-2/+2
| | | | | | | | and absolute paths were given Commit.create_from_tree: fixed critical bug that would cause it to create a branch named master by default, instead of the reference actually set ( which is master in many, but not all cases ) - in fact it could be detached as well, we would fail ungracefully although we could assume master then ... although we cant really make the decision Repo.is_dirty: improved its abiility to deal with empty repositories and a missing head. Weird thing is that the test always worked fine with the previous code, but it didn't work for me in a similar situation without this change at least
* TODO: Removed all entries but left a mesage about where to find the issuee ↵Sebastian Thiel2010-05-041-1/+1
| | | | | | | on lighthouse. README/intro.rst: added information about the new repository at github tree: added marker to indicate that submodules would have to be returned there
* Add support for time zone information in tags and commits.Rick Copeland2010-04-273-15/+31
| | | | | | | This commit includes - an update to git.objects.utils:parse_actor_and_date to parse the timezone offset - updates to the git.objects.Commit and git.objects.Tag objects to support *_tz_offset attributes - updates to tests in test.git.test_commit and test.git.test_refs to check for appropriate *_tz_offset attributes
* Converted all tabs to 4 space characters each to comply with pep8Sebastian Thiel2010-03-047-1016/+1016
|
* Commit.iter_items: Will not restrict comits to the ones containing changes ↵Sebastian Thiel2010-02-281-1/+6
| | | | | | to paths anymore as it will only append '--' if paths are actually given. Added unittest to verify this
* git.Tree: Fixed critical issue when reading trees from binary data. The ↵Sebastian Thiel2010-02-241-8/+6
| | | | previous version was making assumptions that would only be true for old git repositories it sesms. The new version of the algorithm deals with this gracefully.
* Commit.create: now handles empty repositories correctlySebastian Thiel2010-02-131-2/+15
|
* tree: implemented recursive paths in __div__ and __getitem__ method, ↵Sebastian Thiel2009-12-301-6/+27
| | | | allowing the keys to contain slashes; adjusted test to check for this
* repo: renamed directories to more descriptive identifiers and made them ↵Sebastian Thiel2009-12-031-1/+1
| | | | safer to use in case of bare repositories
* commit.create_from_tree: head will not be advanced anymore as it feels ↵Sebastian Thiel2009-12-011-1/+1
| | | | non-natural when using it
* Traversable.traverse: Added as_edge option allowing to receive the source of ↵Sebastian Thiel2009-11-271-11/+19
| | | | the item as well to enable predicates to do more proper checking