1. 15 Jan, 2014 1 commit
  2. 09 Dec, 2013 1 commit
  3. 08 Oct, 2013 1 commit
    • Make reference lookups apply precomposeunicode · 92dac975
      Before these changes, looking up a reference would return the
      same precomposed or decomposed form of the reference name that
      was used to look it up, so on MacOS which ignores the difference
      between the two, a single reference could be looked up either way
      and git_reference_name would return the form of the name that was
      used to look it up!  This change makes lookup always return the
      precomposed name if core.precomposeunicode is set regardless of
      which version was used to look it up.  The reference iterator was
      already returning the precomposed form from earlier work.
      
      This also updates the CMakeLists.txt rules for enabling iconv
      usage because the clar tests for this code were actually not being
      activated properly with the old version.
      
      Finally, this moves git_repository_reset_filesystem from include/
      git2/repository.h to include/git2/sys/repository.h since it is not
      really a function that normal library users should have to think
      about very often.
      Russell Belfer committed
  4. 26 Aug, 2013 1 commit
  5. 21 Aug, 2013 1 commit
    • Add internal ref set_name fn instead of realloc · 24c71f14
      The refdb_fs implementation calls realloc directly on a reference
      object when it wants to rename it.  It is not a public object, so
      this doesn't mess with the immutability of references, but it does
      assume certain constraints on the reference representation.  This
      commit wraps that assumption in an isolated API to isolate it.
      Russell Belfer committed
  6. 02 May, 2013 2 commits
  7. 29 Apr, 2013 1 commit
  8. 17 Apr, 2013 2 commits
  9. 07 Mar, 2013 1 commit
  10. 22 Feb, 2013 1 commit
  11. 16 Jan, 2013 1 commit
  12. 08 Jan, 2013 1 commit
  13. 27 Oct, 2012 1 commit
  14. 26 Oct, 2012 1 commit
  15. 25 Oct, 2012 1 commit
  16. 25 Sep, 2012 3 commits
  17. 07 Jun, 2012 1 commit
  18. 25 Apr, 2012 2 commits
    • Rename git_khash_str to git_strmap, etc. · c2b67043
      This renamed `git_khash_str` to `git_strmap`, `git_hash_oid` to
      `git_oidmap`, and deletes `git_hashtable` from the tree, plus
      adds unit tests for `git_strmap`.
      Russell Belfer committed
    • Convert hashtable usage over to khash · 01fed0a8
      This updates khash.h with some extra features (like error checking
      on allocations, ability to use wrapped malloc, foreach calls, etc),
      creates two high-level wrappers around khash: `git_khash_str` and
      `git_khash_oid` for string-to-void-ptr and oid-to-void-ptr tables,
      then converts all of the old usage of `git_hashtable` over to use
      these new hashtables.
      
      For `git_khash_str`, I've tried to create a set of macros that
      yield an API not too unlike the old `git_hashtable` API.  Since
      the oid hashtable is only used in one file, I haven't bother to
      set up all those macros and just use the khash APIs directly for
      now.
      Russell Belfer committed
  19. 17 Apr, 2012 1 commit
    • Add git_reference_lookup_oid and lookup_resolved · f201d613
      Adds a new public reference function `git_reference_lookup_oid`
      that directly resolved a reference name to an OID without returning
      the intermediate `git_reference` object (hence, no free needed).
      
      Internally, this adds a `git_reference_lookup_resolved` function
      that combines looking up and resolving a reference.  This allows
      us to be more efficient with memory reallocation.
      
      The existing `git_reference_lookup` and `git_reference_resolve`
      are reimplmented on top of the new utility and a few places in the
      code are changed to use one of the two new functions.
      Russell Belfer committed
  20. 13 Feb, 2012 1 commit
  21. 16 Nov, 2011 1 commit
  22. 06 Nov, 2011 2 commits
    • refs: Partial rewrite for read-only refs · d4a0b124
      This new version of the references code is significantly faster and
      hopefully easier to read.
      
      External API stays the same. A new method `git_reference_reload()` has
      been added to force updating a memory reference from disk. In-memory
      references are no longer updated automagically -- this was killing us.
      
      If a reference is deleted externally and the user doesn't reload the
      memory object, nothing critical happens: any functions using that
      reference should fail gracefully (e.g. deletion, renaming, and so on).
      
      All generated references from the API are read only and must be free'd
      by the user. There is no reference counting and no traces of generated
      references are kept in the library.
      
      There is no longer an internal representation for references. There is
      only one reference struct `git_reference`, and symbolic/oid targets are
      stored inside an union.
      
      Packfile references are stored using an optimized struct with flex array
      for reference names. This should significantly reduce the memory cost of
      loading the packfile from disk.
      Vicent Marti committed
    • refs: split internal and external references · a46ec457
      Currently libgit2 shares pointers to its internal reference cache with
      the user. This leads to several problems like invalidation of reference
      pointers when reordering the cache or manipulation of the cache from
      user side.
      
      Give each user its own git_reference instead of leaking the internal
      representation (struct reference).
      
      Add the following new API functions:
      
      	* git_reference_free
      	* git_reference_is_packed
      
      Signed-off-by: schu <schu-github@schulog.org>
      schu committed
  23. 14 Oct, 2011 2 commits
    • *: 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
    • fileops/repository: create (most) directories with 0777 permissions · ce8cd006
      To further match how Git behaves, this change makes most of the
      directories libgit2 creates in a git repo have a file mode of
      0777. Specifically:
      
      - Intermediate directories created with git_futils_mkpath2file() have
        0777 permissions. This affects odb_loose, reflog, and refs.
      
      - The top level folder for bare repos is created with 0777
        permissions.
      
      - The top level folder for non-bare repos is created with 0755
        permissions.
      
      - /objects/info/, /objects/pack/, /refs/heads/, and /refs/tags/ are
        created with 0777 permissions.
      
      Additionally, the following changes have been made:
      
      - fileops functions that create intermediate directories have grown a
        new dirmode parameter. The only exception to this is filebuf's
        lock_file(), which unconditionally creates intermediate directories
        with 0777 permissions when GIT_FILEBUF_FORCE is set.
      
      - The test runner now sets the umask to 0 before running any
        tests. This ensurses all file mode checks are consistent across
        systems.
      
      - t09-tree.c now does a directory permissions check. I've avoided
        adding this check to other tests that might reuse existing
        directories from the prefabricated test repos. Because they're
        checked into the repo, they have 0755 permissions.
      
      - Other assorted directories created by tests have 0777 permissions.
      Brodie Rao committed
  24. 08 Oct, 2011 1 commit
  25. 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
  26. 06 Jul, 2011 1 commit
    • reference_rename: git compliant reference renaming · 0ffcf78a
      So far libgit2 didn't handle the following scenarios:
      
      * Rename of reference m   -> m/m
      * Rename of reference n/n -> n
      
      Fixed.
      
      Since we don't write reflogs, we have to delete any old reflog for the
      renamed reference. Otherwise git.git will possibly fail when it finds
      invalid logs.
      
      Reported-by: nulltoken <emeric.fermas@gmail.com>
      Signed-off-by: schu <schu-github@schulog.org>
      schu committed
  27. 23 Jun, 2011 1 commit
  28. 21 Apr, 2011 1 commit
  29. 16 Mar, 2011 1 commit
  30. 03 Mar, 2011 4 commits