1. 25 Oct, 2020 1 commit
  2. 03 Aug, 2020 1 commit
  3. 12 Jul, 2020 1 commit
  4. 09 Jun, 2020 1 commit
  5. 13 Dec, 2019 1 commit
    • refs: rename git_reference__set_name to git_reference__realloc · 97b8491b
      As git_reference__name will reallocate storage to account for longer
      names (it's actually allocator-dependent), it will cause all existing
      pointers to the old object to become dangling, as they now point to
      freed memory.
      
      Fix the issue by renaming to a more descriptive name, and pass a pointer
      to the actual reference that can safely be invalidated if the realloc
      succeeds.
      Etienne Samson committed
  6. 17 Jan, 2019 1 commit
  7. 19 Oct, 2018 1 commit
  8. 10 Apr, 2018 1 commit
  9. 12 Jan, 2018 1 commit
  10. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  11. 05 Apr, 2017 1 commit
    • refs: implement function to read references from file · 5b65ac25
      Currently, we only provide functions to read references directly from a
      repository's reference store via e.g. `git_reference_lookup`. But in
      some cases, we may want to read files not connected to the current
      repository, e.g. when looking up HEAD of connected work trees. This
      commit implements `git_reference__read_head`, which will read out and
      allocate a reference at an arbitrary path.
      Patrick Steinhardt committed
  12. 21 Jan, 2017 1 commit
  13. 27 Aug, 2016 1 commit
    • Make symbolic ref target validation optional · 452bf57c
      Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option.
      Setting this option to 0 allows
      validation of a symbolic ref's target to be bypassed.
      This option is enabled by default.
      
      This mechanism is added primarily to address a discrepancy between git
      behaviour and libgit2 behaviour, whereby the former allows the symbolic
      ref target to carry an arbitrary string and the latter does not, so:
      
          $ git symbolic-ref refs/heads/foo bar
          $ cat .git/refs/heads/foo
          ref: bar
      
      where as attempting the same via libgit2 raises an error:
      
          The given reference name 'bar' is not valid
      
      this mechanism also allows those that might want to make use of
      git's more lenient treatment of symbolic ref targets to do so.
      Richard Ipsum committed
  14. 20 Nov, 2015 1 commit
  15. 03 Mar, 2015 2 commits
  16. 27 Oct, 2014 1 commit
  17. 30 Sep, 2014 1 commit
    • Introduce reference transactions · ab8d9242
      A transaction allows you to lock multiple references and set up changes
      for them before applying the changes all at once (or as close as the
      backend supports).
      
      This can be used for replication purposes, or for making sure some
      operations run when the reference is locked and thus cannot be changed.
      Carlos Martín Nieto committed
  18. 22 Jul, 2014 1 commit
  19. 26 Jun, 2014 1 commit
  20. 30 May, 2014 2 commits
  21. 15 Jan, 2014 1 commit
  22. 09 Dec, 2013 1 commit
  23. 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
  24. 26 Aug, 2013 1 commit
  25. 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
  26. 02 May, 2013 2 commits
  27. 29 Apr, 2013 1 commit
  28. 17 Apr, 2013 2 commits
  29. 07 Mar, 2013 1 commit
  30. 22 Feb, 2013 1 commit
  31. 16 Jan, 2013 1 commit
  32. 08 Jan, 2013 1 commit
  33. 27 Oct, 2012 1 commit
  34. 26 Oct, 2012 1 commit
  35. 25 Oct, 2012 1 commit
  36. 25 Sep, 2012 1 commit