1. 01 Nov, 2013 1 commit
  2. 03 Oct, 2013 3 commits
    • More cleanups to remove WIN assumptions · b8f9059d
      This cleans up more of the test suite to check actual filesystem
      behavior instead of relying on Windows vs. Mac vs. Linux to test.
      Russell Belfer committed
    • Update repo init with fewer platform assumptions · 840fb4fc
      The repo init code was assuming Windows == no filemode, and
      Mac or Windows == no case sensitivity.  Those assumptions are not
      consistently true depending on the mounted file system.  This is a
      first step to removing those assumptions.  It focuses on the repo
      init code and the tests of that code.  There are still many other
      tests that are broken when those assumptions don't hold true, but
      this clears up one area of the code.
      
      Also, this moves the core.precomposeunicode logic to be closer to
      the current logic in core Git where it will be set to true on any
      filesystem where composed unicode is decomposed when read back.
      Russell Belfer committed
    • Add check if we need to precompose unicode on Mac · 6b7991e2
      This adds initialization of core.precomposeunicode to repo init
      on Mac.  This is necessary because when a Mac accesses a repo on
      a VFAT or SAMBA file system, it will return directory entries in
      decomposed unicode even if the filesystem entry is precomposed.
      
      This also removes caching of a number of repo properties from the
      repo init pipeline because these are properties of the specific
      filesystem on which the repo is created, not of the system as a
      whole.
      Russell Belfer committed
  3. 24 Sep, 2013 1 commit
  4. 17 Sep, 2013 2 commits
    • Add clar helper to create new commit from index · 155fa234
      There were a lot of places in the test code base that were creating
      a commit from the index on the current branch.  This just adds a
      helper to handle that case pretty easily.  There was only one test
      where this change ended up tweaking the test data, so pretty easy
      and mostly just a cleanup.
      Russell Belfer committed
    • No such thing as an orphan branch · 605da51a
      Unfortunately git-core uses the term "unborn branch" and "orphan
      branch" interchangeably. However, "orphan" is only really there for
      the checkout command, which has the `--orphan` option so it doesn't
      actually create the branch.
      
      Branches never have parents, so the distinction of a branch with no
      parents is odd to begin with. Crucially, the error messages deal with
      unborn branches, so let's use that.
      Carlos Martín Nieto committed
  5. 05 Sep, 2013 3 commits
  6. 04 Sep, 2013 3 commits
  7. 16 Aug, 2013 2 commits
  8. 07 Aug, 2013 1 commit
  9. 10 Jul, 2013 2 commits
    • Add BARE option to git_repository_open_ext · 3fe046cf
      This adds a BARE option to git_repository_open_ext which allows
      a fast open path that still knows how to read gitlinks and to
      search for the actual .git directory from a subdirectory.
      
      `git_repository_open_bare` is still simpler and faster, but having
      a gitlink aware fast open is very useful for submodules where we
      want to quickly be able to peek at the HEAD and index data without
      doing any other meaningful repo operations.
      Russell Belfer committed
    • Add public API for pathspec matching · d2ce27dd
      This adds a new public API for compiling pathspecs and matching
      them against the working directory, the index, or a tree from the
      repository.  This also reworks the pathspec internals to allow the
      sharing of code between the existing internal usage of pathspec
      matching and the new external API.
      
      While this is working and the new API is ready for discussion, I
      think there is still an incorrect behavior in which patterns are
      always matched against the full path of an entry without taking
      the subdirectories into account (so "s*" will match "subdir/file"
      even though it wouldn't with core Git).  Further enhancements are
      coming, but this was a good place to take a functional snapshot.
      Russell Belfer committed
  10. 10 Jun, 2013 1 commit
    • Reorganize diff and add basic diff driver · 114f5a6c
      This is a significant reorganization of the diff code to break it
      into a set of more clearly distinct files and to document the new
      organization.  Hopefully this will make the diff code easier to
      understand and to extend.
      
      This adds a new `git_diff_driver` object that looks of diff driver
      information from the attributes and the config so that things like
      function content in diff headers can be provided.  The full driver
      spec is not implemented in the commit - this is focused on the
      reorganization of the code and putting the driver hooks in place.
      
      This also removes a few #includes from src/repository.h that were
      overbroad, but as a result required extra #includes in a variety
      of places since including src/repository.h no longer results in
      pulling in the whole world.
      Russell Belfer committed
  11. 31 May, 2013 1 commit
    • Make iterators use GIT_ITEROVER & smart advance · cee695ae
      1. internal iterators now return GIT_ITEROVER when you go past the
         last item in the iteration.
      2. git_iterator_advance will "advance" to the first item in the
         iteration if it is called immediately after creating the
         iterator, which allows a simpler idiom for basic iteration.
      3. if git_iterator_advance encounters an error reading data (e.g.
         a missing tree or an unreadable file), it returns the error
         but also attempts to advance past the invalid data to prevent
         an infinite loop.
      
      Updated all tests and internal usage of iterators to account for
      these new behaviors.
      Russell Belfer committed
  12. 23 May, 2013 2 commits
  13. 09 May, 2013 1 commit
    • Fix git_repository_message docs · 3d1c9f61
      This clarifies the docs for git_repository_message and also adds
      to the tests to explicitly check NUL termination of data when the
      output buffer is smaller than the message size.  There is a minor
      behavior change so that a non-NULL output buffer will always be
      NUL terminated (at length zero) if an error occurs.
      Russell Belfer committed
  14. 07 May, 2013 1 commit
    • repo: unconditionally create a global config backend · a4b75dcf
      When a repository is initialised, we need to probe to see if there is
      a global config to load. If this is not the case, the user isn't able
      to write to the global config without creating the backend and adding
      it themselves, which is inconvenient and overly complex.
      
      Unconditionally create and add a backend for the global config file
      regardless of whether it exists as a convenience for users.
      
      To enable this, we allow creating backends to files that do not exist
      yet, changing the semantics somewhat, and making some tests invalid.
      Carlos Martín Nieto committed
  15. 30 Apr, 2013 1 commit
  16. 22 Apr, 2013 1 commit
  17. 21 Apr, 2013 1 commit
  18. 18 Apr, 2013 4 commits
  19. 15 Apr, 2013 1 commit
  20. 09 Apr, 2013 1 commit
  21. 22 Mar, 2013 1 commit
  22. 14 Mar, 2013 1 commit
    • Fix valgrind issues (and mmap fallback for diff) · d85296ab
      This fixes a number of issues identified by valgrind - mostly
      missed free calls.  Inside valgrind, mmap() may fail which causes
      some of the diff tests to fail.  This adds a fallback code path
      to diff_output.c:get_workdir_content() where is the mmap() fails
      the code will now try to read the file data directly into allocated
      memory (which is what it would do if the data needed to be filtered
      anyhow).
      Russell Belfer committed
  23. 13 Mar, 2013 1 commit
    • Fix workdir iterator bugs · bbb13646
      This fixes two bugs with the workdir iterator depth check: first
      that the depth was not being decremented and second that empty
      directories were counting against the depth even though a frame
      was not being created for them.
      
      This also fixes a bug with the ENOTFOUND return code for workdir
      iterators when you attempt to advance_into an empty directory.
      Actually, that works correctly, but it was incorrectly being
      propogated into regular advance() calls in some circumstances.
      
      Added new tests for the above that create a huge hierarchy on
      the fly and try using the workdir iterator to traverse it.
      Russell Belfer committed
  24. 11 Mar, 2013 4 commits
    • Stabilize order for equiv tree iterator entries · a5eea2d7
      Given a group of case-insensitively equivalent tree iterator
      entries, this ensures that the case-sensitively first trees will
      be used as the representative items.  I.e. if you have conflicting
      entries "A/B/x", "a/b/x", and "A/b/x", this change ensures that
      the earliest entry "A/B/x" will be returned.  The actual choice
      is not that important, but it is nice to have it stable and to
      have it been either the first or last item, as opposed to a
      random item from within the equivalent span.
      Russell Belfer committed
    • Fix tree iterator advance using wrong name compare · aec4f663
      Tree iterator advance was moving forward without taking the
      filemode of the entries into account, equating "a" and "a/".
      This makes the tree entry comparison code more easily reusable
      and fixes the problem.
      Russell Belfer committed
    • Fix tree iterator path for tree issue + cleanups · 92028ea5
      This fixes an off by one error for generating full paths for
      tree entries in tree iterators when INCLUDE_TREES is set.  Also,
      contains a bunch of small code cleanups with a couple of small
      utility functions and macro changes to eliminate redundant code.
      Russell Belfer committed
    • Use correct case path in icase tree iterator · 61c7b61e
      If there are case-ambiguities in the path of a case insensitive
      tree iterator, it will now rewrite the entire path when it gives
      the path name to an entry, so a tree with "A/b/C/d.txt" and
      "a/B/c/E.txt" will give the true full paths (instead of case-
      folding them both to "A/B/C/d.txt" or "a/b/c/E.txt" or something
      like that.
      Russell Belfer committed