1. 04 Aug, 2012 1 commit
    • Update iterators for consistency across library · 5dca2010
      This updates all the `foreach()` type functions across the library
      that take callbacks from the user to have a consistent behavior.
      The rules are:
      
      * A callback terminates the loop by returning any non-zero value
      * Once the callback returns non-zero, it will not be called again
        (i.e. the loop stops all iteration regardless of state)
      * If the callback returns non-zero, the parent fn returns GIT_EUSER
      * Although the parent returns GIT_EUSER, no error will be set in
        the library and `giterr_last()` will return NULL if called.
      
      This commit makes those changes across the library and adds tests
      for most of the iteration APIs to make sure that they follow the
      above rules.
      Russell Belfer committed
  2. 30 Jul, 2012 1 commit
  3. 02 Jun, 2012 1 commit
  4. 18 May, 2012 1 commit
  5. 17 May, 2012 1 commit
  6. 23 Apr, 2012 1 commit
  7. 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
  8. 12 Apr, 2012 1 commit
  9. 11 Apr, 2012 1 commit
  10. 10 Apr, 2012 1 commit
  11. 02 Mar, 2012 1 commit
    • Clean up GIT_UNUSED macros on all platforms · 854eccbb
      It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
      did not fix the GIT_USUSED behavior on all platforms.  This commit
      walks through and really cleans things up more thoroughly, getting
      rid of the unnecessary stuff.
      
      To remove the use of some GIT_UNUSED, I ended up adding a couple
      of new iterators for hashtables that allow you to iterator just
      over keys or just over values.
      
      In making this change, I found a bug in the clar tests (where we
      were doing *count++ but meant to do (*count)++ to increment the
      value).  I fixed that but then found the test failing because it
      was not really using an empty repo.  So, I took some of the code
      that I wrote for iterator testing and moved it to clar_helpers.c,
      then made use of that to make it easier to open fixtures on a
      per test basis even within a single test file.
      Russell Belfer committed
  12. 13 Feb, 2012 1 commit
  13. 28 Dec, 2011 1 commit
    • transport: make local transport accept a file Uri containing percent-encoded characters · e2580375
      This makes libgit2 compliant with the following scenario
      
      $ git ls-remote file:///d:/temp/dwm%20tinou
      732d790b702db4b8985f5104fc44642654f6a6b6        HEAD
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/heads/master
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/HEAD
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/master
      
      $ mv "/d/temp/dwm tinou" /d/temp/dwm+tinou
      
      $ git ls-remote file:///d:/temp/dwm%20tinou
      fatal: 'd:/temp/dwm tinou' does not appear to be a git repository
      fatal: The remote end hung up unexpectedly
      
      $ git ls-remote file:///d:/temp/dwm+tinou
      732d790b702db4b8985f5104fc44642654f6a6b6        HEAD
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/heads/master
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/HEAD
      732d790b702db4b8985f5104fc44642654f6a6b6        refs/remotes/origin/master
      nulltoken committed
  14. 24 Dec, 2011 1 commit
  15. 21 Dec, 2011 1 commit
  16. 29 Nov, 2011 1 commit
  17. 28 Nov, 2011 1 commit
  18. 26 Nov, 2011 1 commit
  19. 06 Nov, 2011 1 commit
  20. 29 Oct, 2011 1 commit
  21. 12 Oct, 2011 2 commits
  22. 30 Sep, 2011 1 commit
  23. 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
  24. 25 Aug, 2011 1 commit
  25. 18 Aug, 2011 3 commits
  26. 09 Aug, 2011 1 commit
  27. 08 Aug, 2011 1 commit
  28. 06 Aug, 2011 1 commit
  29. 25 Jul, 2011 1 commit
    • transport_local: fix cast warnings · ba1de1af
      home/kas/git/public/libgit2/src/transport_local.c: In function ‘cmp_refs’:
      /home/kas/git/public/libgit2/src/transport_local.c:19:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/transport_local.c:20:22: 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
  30. 05 Jul, 2011 1 commit
  31. 27 Jun, 2011 1 commit
    • Slim down git_transport · 0ac2726f
      Remove the unused repo and private pointers and make the direction a
      flag, as it can only have two states. Change the connect signature to
      use an int instead of git_net_direction and remove that enum.
      
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Carlos Martín Nieto committed
  32. 26 Jun, 2011 5 commits