1. 24 May, 2018 1 commit
  2. 14 May, 2018 1 commit
  3. 09 May, 2018 1 commit
    • submodule: ignore submodules which include path traversal in their name · 6b15ceac
      If the we decide that the "name" of the submodule (i.e. its path inside
      `.git/modules/`) is trying to escape that directory or otherwise trick us, we
      ignore the configuration for that submodule.
      
      This leaves us with a half-configured submodule when looking it up by path, but
      it's the same result as if the configuration really were missing.
      
      The name check is potentially more strict than it needs to be, but it lets us
      re-use the check we're doing for the checkout. The function that encapsulates
      this logic is ready to be exported but we don't want to do that in a security
      release so it remains internal for now.
      Carlos Martín Nieto committed
  4. 30 Apr, 2018 1 commit
  5. 28 Mar, 2018 1 commit
  6. 27 Mar, 2018 7 commits
  7. 25 Aug, 2017 3 commits
  8. 19 May, 2017 1 commit
    • repository: make check if repo is a worktree more strict · 2696c5c3
      To determine if a repository is a worktree or not, we currently check
      for the existence of a "gitdir" file inside of the repository's gitdir.
      While this is sufficient for non-broken repositories, we have at least
      one case of a subtly broken repository where there exists a gitdir file
      inside of a gitmodule. This will cause us to misidentify the submodule
      as a worktree.
      
      While this is not really a fault of ours, we can do better here by
      observing that a repository can only ever be a worktree iff its common
      directory and dotgit directory are different. This allows us to make our
      check whether a repo is a worktree or not more strict by doing a simple
      string comparison of these two directories. This will also allow us to
      do the right thing in the above case of a broken repository, as for
      submodules these directories will be the same. At the same time, this
      allows us to skip the `stat` check for the "gitdir" file for most
      repositories.
      Patrick Steinhardt committed
  9. 17 May, 2017 1 commit
  10. 17 Feb, 2017 1 commit
  11. 20 Jan, 2017 1 commit
    • Allow for caching of submodules. · 4d99c4cf
      Added `git_repository_submodule_cache_all` to initialze a cache of
      submodules on the repository so that operations looking up N
      submodules are O(N) and not O(N^2).  Added a
      `git_repository_submodule_cache_clear` function to remove the cache.
      
      Also optimized the function that loads all submodules as it was itself
      O(N^2) w.r.t the number of submodules, having to loop through the
      `.gitmodules` file once per submodule.  I changed it to process the
      `.gitmodules` file once, into a map.
      
      Signed-off-by: David Turner <dturner@twosigma.com>
      Brock Peabody committed
  12. 31 Mar, 2016 1 commit
  13. 21 Dec, 2015 1 commit
  14. 04 Nov, 2015 1 commit
  15. 18 Sep, 2015 2 commits
  16. 17 Sep, 2015 1 commit
    • git_futils_mkdir_*: make a relative-to-base mkdir · ac2fba0e
      Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
      assumes that we own everything beneath the base, as if it were
      being called with a base of the repository or working directory,
      and is tailored towards checkout and ensuring that there is no
      bogosity beneath the base that must be cleaned up.
      
      This is (at best) slow and (at worst) unsafe in the larger context
      of a filesystem where we do not own things and cannot do things like
      unlink symlinks that are in our way.
      Edward Thomson committed
  17. 10 Sep, 2015 1 commit
  18. 28 Aug, 2015 1 commit
  19. 13 Jul, 2015 1 commit
  20. 12 Jul, 2015 1 commit
  21. 11 Jul, 2015 1 commit
  22. 01 Jul, 2015 2 commits
  23. 29 Jun, 2015 1 commit
  24. 25 Jun, 2015 1 commit
  25. 22 Jun, 2015 6 commits