This project is mirrored from https://github.com/git/git. Pull mirroring updated .
  1. 29 Oct, 2012 1 commit
  2. 06 Jun, 2012 2 commits
    • Jon Seymour's avatar
      submodule: fix handling of superproject origin URLs like foo, ./foo and ./foo/bar · 758615e2
      Jon Seymour authored
      Currently git submodule init and git submodule sync fail with an error
      if the superproject origin URL is of the form foo but succeed if the
      superproject origin URL is of the form ./foo or ./foo/bar or foo/bar.
      
      This change makes handling of the foo case behave like the handling
      of the ./foo case and also ensures that superfluous leading and
      embedded ./'s are removed from the resulting derived URLs.
      Signed-off-by: Jon Seymour's avatarJon Seymour <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      758615e2
    • Jon Seymour's avatar
      submodule: fix sync handling of some relative superproject origin URLs · 967b2c66
      Jon Seymour authored
      When the origin URL of the superproject is itself relative, git submodule sync
      configures the remote.origin.url configuration property of the submodule
      with a path that is relative to the work tree of the superproject
      rather than the work tree of the submodule.
      
      To fix this an 'up_path' that navigates from the work tree of the submodule
      to the work tree of the superproject needs to be prepended to the URL
      otherwise calculated.
      
      Correct handling of superproject origin URLs like foo, ./foo and ./foo/bar is
      left to a subsequent patch since an additional change is required to handle
      these cases.
      
      The documentation of resolve_relative_url() is expanded to give a more thorough
      description of the function's objective.
      Signed-off-by: Jon Seymour's avatarJon Seymour <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      967b2c66
  3. 03 Jun, 2012 1 commit
  4. 16 Aug, 2011 1 commit
  5. 26 Jun, 2011 1 commit
    • Junio C Hamano's avatar
      submodule sync: do not auto-vivify uninteresting submodule · ccee6086
      Junio C Hamano authored
      Earlier 33f072f8 (submodule sync: Update "submodule.<name>.url" for empty
      directories, 2010-10-08) attempted to fix a bug where "git submodule sync"
      command does not update the URL if the current superproject does not have
      a checkout of the submodule.
      
      However, it did so by unconditionally registering submodule.$name.url to
      every submodule in the project, even the ones that the user has never
      showed interest in at all by running 'git submodule init' command. This
      caused subsequent 'git submodule update' to start cloning/updating submodules
      that are not interesting to the user at all.
      
      Update the code so that the URL is updated from the .gitmodules file only
      for submodules that already have submodule.$name.url entries, i.e. the
      ones the user has showed interested in having a checkout.
      Acked-by: default avatarJens Lehmann <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      ccee6086
  6. 09 Mar, 2011 1 commit
    • Jens Lehmann's avatar
      fetch/pull: recurse into submodules when necessary · 88a21979
      Jens Lehmann authored
      To be able to access all commits of populated submodules referenced by the
      superproject it is sufficient to only then let "git fetch" recurse into a
      submodule when the new commits fetched in the superproject record new
      commits for it. Having these commits present is extremely useful when
      using the "--submodule" option to "git diff" (which is what "git gui" and
      "gitk" do since 1.6.6), as all submodule commits needed for creating a
      descriptive output can be accessed. Also merging submodule commits (added
      in 1.7.3) depends on the submodule commits in question being present to
      work. Last but not least this enables disconnected operation when using
      submodules, as all commits necessary for a successful "git submodule
      update -N" will have been fetched automatically. So we choose this mode as
      the default for fetch and pull.
      
      Before a new or changed ref from upstream is updated in update_local_ref()
      "git rev-list <new-sha1> --not --branches --remotes" is used to determine
      all newly fetched commits. These are then walked and diffed against their
      parent(s) to see if a submodule has been changed. If that is the case, its
      path is stored to be fetched after the superproject fetch is completed.
      
      Using the "--recurse-submodules" or the "--no-recurse-submodules" option
      disables the examination of the fetched refs because the result will be
      ignored anyway.
      
      There is currently no infrastructure for storing deleted and new
      submodules in the .git directory of the superproject. That's why fetch and
      pull for now only fetch submodules that are already checked out and are
      not renamed.
      
      In t7403 the "--no-recurse-submodules" argument had to be added to "git
      pull" to avoid failure because of the moved upstream submodule repo.
      
      Thanks-to: Jonathan Nieder <[email protected]>
      Thanks-to: Heiko Voigt <[email protected]>
      Signed-off-by: default avatarJens Lehmann <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
      88a21979
  7. 14 Oct, 2010 1 commit
  8. 22 Aug, 2010 1 commit
  9. 18 Aug, 2010 1 commit
  10. 03 Oct, 2008 1 commit