1. 04 Sep, 2012 1 commit
  2. 09 Aug, 2012 1 commit
  3. 30 Jul, 2012 2 commits
  4. 24 Jul, 2012 1 commit
  5. 29 Jun, 2012 1 commit
  6. 19 Jun, 2012 1 commit
    • Make index add/append support core.filemode flag · da825c92
      This fixes git_index_add and git_index_append to behave more like
      core git, preserving old filemode data in the index when adding
      and/or appending with core.filemode = false.
      
      This also has placeholder support for core.symlinks and
      core.ignorecase, but those flags are not implemented (well,
      symlinks has partial support for preserving mode information in
      the same way that git does, but it isn't tested).
      Russell Belfer committed
  7. 17 May, 2012 2 commits
  8. 16 May, 2012 1 commit
  9. 15 May, 2012 1 commit
    • Ranged iterators and rewritten git_status_file · 41a82592
      The goal of this work is to rewrite git_status_file to use the
      same underlying code as git_status_foreach.
      
      This is done in 3 phases:
      
      1. Extend iterators to allow ranged iteration with start and
         end prefixes for the range of file names to be covered.
      2. Improve diff so that when there is a pathspec and there is
         a common non-wildcard prefix of the pathspec, it will use
         ranged iterators to minimize excess iteration.
      3. Rewrite git_status_file to call git_status_foreach_ext
         with a pathspec that covers just the one file being checked.
      
      Since ranged iterators underlie the status & diff implementation,
      this is actually fairly efficient.  The workdir iterator does
      end up loading the contents of all the directories down to the
      single file, which should ideally be avoided, but it is pretty
      good.
      Russell Belfer committed
  10. 19 Mar, 2012 1 commit
    • Migrate index, oid, and utils to new errors · 7c7ff7d1
      This includes a few cleanups that came up while converting
      these files.
      
      This commit introduces a could new git error classes, including
      the catchall class: GITERR_INVALID which I'm using as the class
      for invalid and out of range values which are detected at too low
      a level of library to use a higher level classification.  For
      example, an overflow error in parsing an integer or a bad letter
      in parsing an OID string would generate an error in this class.
      Russell Belfer committed
  11. 15 Mar, 2012 1 commit
    • Continue error conversion · deafee7b
      This converts blob.c, fileops.c, and all of the win32 files.
      Also, various minor cleanups throughout the code.  Plus, in
      testing the win32 build, I cleaned up a bunch (although not
      all) of the warnings with the 64-bit build.
      Russell Belfer committed
  12. 07 Mar, 2012 1 commit
  13. 05 Mar, 2012 1 commit
  14. 27 Feb, 2012 1 commit
    • buffer: Unify `git_fbuffer` and `git_buf` · 13224ea4
      This makes so much sense that I can't believe it hasn't been done
      before. Kill the old `git_fbuffer` and read files straight into
      `git_buf` objects.
      
      Also: In order to fully support 4GB files in 32-bit systems, the
      `git_buf` implementation has been changed from using `ssize_t` for
      storage and storing negative values on allocation failure, to using
      `size_t` and changing the buffer pointer to a magical pointer on
      allocation failure.
      
      Hopefully this won't break anything.
      Vicent Martí committed
  15. 13 Feb, 2012 1 commit
  16. 17 Jan, 2012 1 commit
    • Move path related functions from fileops to path · 1744fafe
      This takes all of the functions that look up simple data about
      paths (such as `git_futils_isdir`) and moves them over to path.h
      (becoming `git_path_isdir`).  This leaves fileops.h just with
      functions that actually manipulate the filesystem or look at
      the file contents in some way.
      
      As part of this, the dir.h header which is really just for win32
      support was moved into win32 (with some minor changes).
      Russell Belfer committed
  17. 05 Jan, 2012 1 commit
  18. 30 Dec, 2011 1 commit
  19. 18 Dec, 2011 1 commit
  20. 08 Dec, 2011 1 commit
    • Use git_buf for path storage instead of stack-based buffers · 97769280
      This converts virtually all of the places that allocate GIT_PATH_MAX
      buffers on the stack for manipulating paths to use git_buf objects
      instead.  The patch is pretty careful not to touch the public API
      for libgit2, so there are a few places that still use GIT_PATH_MAX.
      
      This extends and changes some details of the git_buf implementation
      to add a couple of extra functions and to make error handling easier.
      
      This includes serious alterations to all the path.c functions, and
      several of the fileops.c ones, too.  Also, there are a number of new
      functions that parallel existing ones except that use a git_buf
      instead of a stack-based buffer (such as git_config_find_global_r
      that exists alongsize git_config_find_global).
      
      This also modifies the win32 version of p_realpath to allocate whatever
      buffer size is needed to accommodate the realpath instead of hardcoding
      a GIT_PATH_MAX limit, but that change needs to be tested still.
      Russell Belfer committed
  21. 28 Nov, 2011 1 commit
  22. 26 Nov, 2011 1 commit
    • repository: Change ownership semantics · 9462c471
      The ownership semantics have been changed all over the library to be
      consistent. There are no more "borrowed" or duplicated references.
      
      Main changes:
      
      	- `git_repository_open2` and `3` have been dropped.
      
      	- Added setters and getters to hotswap all the repository owned
      	objects:
      
      		`git_repository_index`
      		`git_repository_set_index`
      		`git_repository_odb`
      		`git_repository_set_odb`
      		`git_repository_config`
      		`git_repository_set_config`
      		`git_repository_workdir`
      		`git_repository_set_workdir`
      
      	Now working directories/index files/ODBs and so on can be
      	hot-swapped after creating a repository and between operations.
      
      	- All these objects now have proper ownership semantics with
      	refcounting: they all require freeing after they are no longer
      	needed (the repository always keeps its internal reference).
      
      	- Repository open and initialization has been updated to keep in
      	mind the configuration files. Bare repositories are now always
      	detected, and a default config file is created on init.
      
      	- All the tests affected by these changes have been dropped from the
      	old test suite and ported to the new one.
      Vicent Marti committed
  23. 22 Nov, 2011 1 commit
  24. 29 Oct, 2011 1 commit
  25. 14 Oct, 2011 1 commit
    • *: correct and codify various file permissions · 01ad7b3a
      The following files now have 0444 permissions:
      
      - loose objects
      - pack indexes
      - pack files
      - packs downloaded by fetch
      - packs downloaded by the HTTP transport
      
      And the following files now have 0666 permissions:
      
      - config files
      - repository indexes
      - reflogs
      - refs
      
      This brings libgit2 more in line with Git.
      
      Note that git_filebuf_commit() and git_filebuf_commit_at() have both
      gained a new mode parameter.
      
      The latter change fixes an important issue where filebufs created with
      GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
      usage). Now we chmod() the file before renaming it into place.
      
      Tests have been added to confirm that new commit, tag, and tree
      objects are created with the right permissions. I don't have access to
      Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
      Brodie Rao committed
  26. 29 Sep, 2011 1 commit
  27. 27 Sep, 2011 3 commits
  28. 22 Sep, 2011 1 commit
  29. 19 Sep, 2011 1 commit
    • Tabify everything · 87d9869f
      There were quite a few places were spaces were being used instead of
      tabs. Try to catch them all. This should hopefully not break anything.
      Except for `git blame`. Oh well.
      Vicent Marti committed
  30. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  31. 31 Aug, 2011 1 commit
  32. 25 Jul, 2011 5 commits
    • index: rework index entry initialization routine · 76159921
      index_init_entry() renamed to index_entry_init(). Now it allocates entry
      on its own.
      
      git_index_add() and git_index_append() reworked accordingly.
      
      This commit fixes warning:
      
      /home/kas/git/public/libgit2/src/index.c: In function ‘index_init_entry’:
      /home/kas/git/public/libgit2/src/index.c:452:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: rework index_insert() · f939d39b
      Now index_insert() takes copy of index entry, not coping it by itself.
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: introduce index_entry_free() · b2dd6815
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: extract index_entry_dup() from index_insert() · 51917d9c
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: fix cast warnings · 7d9cc9f8
      /home/kas/git/public/libgit2/src/index.c: In function ‘git_index_clear’:
      /home/kas/git/public/libgit2/src/index.c:228:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c:235:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘index_insert’:
      /home/kas/git/public/libgit2/src/index.c:392:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c:399:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘read_unmerged’:
      /home/kas/git/public/libgit2/src/index.c:681:35: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘read_entry’:
      /home/kas/git/public/libgit2/src/index.c:716:33: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed