1. 16 8月, 2007 1 次提交
  2. 02 8月, 2007 1 次提交
    • J
      git-clone: aggressively optimize local clone behaviour. · 3d5c418f
      Junio C Hamano 提交于
      This changes the behaviour of cloning from a repository on the
      local machine, by defaulting to "-l" (use hardlinks to share
      files under .git/objects) and making "-l" a no-op.  A new
      option, --no-hardlinks, is also added to cause file-level copy
      of files under .git/objects while still avoiding the normal
      "pack to pipe, then receive and index pack" network transfer
      overhead.  The old behaviour of local cloning without -l nor -s
      is availble by specifying the source repository with the newly
      introduced file:///path/to/repo.git/ syntax (i.e. "same as
      network" cloning).
      
       * With --no-hardlinks (i.e. have all .git/objects/ copied via
         cpio) would not catch the source repository corruption, and
         also risks corrupted recipient repository if an
         alpha-particle hits memory cell while indexing and resolving
         deltas.  As long as the recipient is created uncorrupted, you
         have a good back-up.
      
       * same-as-network is expensive, but it would catch the breakage
         of the source repository.  It still risks corrupted recipient
         repository due to hardware failure.  As long as the recipient
         is created uncorrupted, you have a good back-up.
      
       * The new default on the same filesystem, as long as the source
         repository is healthy, it is very likely that the recipient
         would be, too.  Also it is very cheap.  You do not get any
         back-up benefit, though.
      
      None of the method is resilient against the source repository
      corruption, so let's discount that from the comparison.  Then
      the difference with and without --no-hardlinks matters primarily
      if you value the back-up benefit or not.  If you want to use the
      cloned repository as a back-up, then it is cheaper to do a clone
      with --no-hardlinks and two git-fsck (source before clone,
      recipient after clone) than same-as-network clone, especially as
      you are likely to do a git-fsck on the recipient if you are so
      paranoid anyway.
      
      Which leads me to believe that being able to use file:/// is
      probably a good idea, if only for testability, but probably of
      little practical value.  We default to hardlinked clone for
      everyday use, and paranoids can use --no-hardlinks as a way to
      make a back-up.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3d5c418f
  3. 06 7月, 2007 2 次提交
  4. 03 7月, 2007 1 次提交
  5. 02 7月, 2007 1 次提交
  6. 28 6月, 2007 1 次提交
  7. 21 6月, 2007 1 次提交
  8. 07 6月, 2007 2 次提交
  9. 15 5月, 2007 1 次提交
  10. 11 5月, 2007 1 次提交
    • J
      git-clone: don't get fooled by $PWD · c2f599e0
      Junio C Hamano 提交于
      If you have /home/me/git symlink pointing at /pub/git/mine,
      trying to clone from /pub/git/his/ using relative path would not
      work as expected:
      
      	$ cd /home/me
              $ cd git
              $ ls ../
              his    mine
              $ git clone -l -s -n ../his/stuff.git
      
      This is because "cd ../his/stuff.git" done inside git-clone to
      check if the repository is local is confused by $PWD, which is
      set to /home/me, and tries to go to /home/his/stuff.git which is
      different from /pub/git/his/stuff.git.
      
      We could probably say "set -P" (or "cd -P") instead, if we know
      the shell is POSIX, but the way the patch is coded is probably
      more portable.
      
      [jc: this is updated with Andy Whitcroft's improvements]
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      c2f599e0
  11. 21 4月, 2007 1 次提交
  12. 28 3月, 2007 1 次提交
  13. 20 3月, 2007 1 次提交
  14. 24 2月, 2007 1 次提交
    • J
      Fixup no-progress for fetch & clone · b0e90897
      Johannes Schindelin 提交于
      The intent of the commit 'fetch & clone: do not output progress when
      not on a tty' was to make fetching and cloning less chatty when
      output was not redirected (such as in a cron job).
      
      However, there was a serious thinko in that commit. It assumed that
      the client _and_ the server got this update at the same time. But
      this is obviously not the case, and therefore upload-pack died on
      seeing the option "--no-progress".
      
      This patch fixes that issue by making it a protocol option. So, until
      your server is updated, you still see the progress, but once the
      server has this patch, it will be quiet.
      
      A minor issue was also fixed: when cloning, the checkout did not
      heed no_progress.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b0e90897
  15. 20 2月, 2007 1 次提交
  16. 07 2月, 2007 1 次提交
  17. 04 2月, 2007 1 次提交
    • J
      git-clone --reference: saner handling of borrowed symrefs. · 1f7d1a53
      Junio C Hamano 提交于
      When using --reference to borrow objects from a neighbouring
      repository while cloning, we copy the entire set of refs under
      temporary "refs/reference-tmp/refs" space and set up the object
      alternates.  However, a textual symref copied this way would not
      point at the right place, and causes later steps to emit error
      messages (which is harmless but still alarming).  This is most
      visible when using a clone created with the separate-remote
      layout as a reference, because such a repository would have
      refs/remotes/origin/HEAD with 'ref: refs/remotes/origin/master'
      as its contents.
      
      Although we do not create symbolic-link based refs anymore, they
      have the same problem because they are always supposed to be
      relative to refs/ hierarchy (we dereference by hand, so it only
      is good for HEAD and nothing else).
      
      In either case, the solution is simply to remove them after
      copying under refs/reference-tmp; if a symref points at a true
      ref, that true ref itself is enough to ensure that objects
      reachable from it do not needlessly get fetched.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1f7d1a53
  18. 01 2月, 2007 1 次提交
    • S
      Escape --upload-pack from expr. · 4a91a1f3
      Shawn O. Pearce 提交于
      Recent commit ae1dffcb by Junio
      changed the way --upload-pack was passed around between clone,
      fetch and ls-remote and modified the handling of the command
      line parameter parsing.
      
      Unfortunately FreeBSD 6.1 insists that the expression
      
        expr --upload-pack=git-upload-pack : '-[^=]*=\(.*\)'
      
      is illegal, as the --upload-pack option is not supported by their
      implementation of expr.
      
      Elsewhere in Git we use z as a leading prefix of both arguments,
      ensuring the -- isn't seen by expr.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4a91a1f3
  19. 29 1月, 2007 2 次提交
  20. 25 1月, 2007 1 次提交
  21. 13 1月, 2007 1 次提交
  22. 10 1月, 2007 1 次提交
  23. 29 12月, 2006 1 次提交
    • J
      Allow non-fast-forward of remote tracking branches in default clone · 013672bc
      Junio C Hamano 提交于
      This changes the default remote.origin.fetch configuration
      created by git-clone so that it allows non-fast-forward updates.
      
      When using the separate-remote layout with reflog enabled, it
      does not make much sense to refuse to update the remote tracking
      branch just because some of them do not fast-forward.  git-fetch
      issues warnings on non-fast-forwardness, and the user can peek
      at what the previous state was using the reflog.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      013672bc
  24. 17 12月, 2006 3 次提交
    • J
      git-clone: lose the traditional 'no-separate-remote' layout · 63085fab
      Junio C Hamano 提交于
      Finally.
      
      The separate-remote layout is so much more organized than
      traditional and easier to work with especially when you need to
      deal with remote repositories with multiple branches and/or you
      need to deal with more than one remote repositories, and using
      traditional layout for new repositories simply does not make
      much sense.
      
      Internally we still have code for 1:1 mappings to create a bare
      clone; that is a good thing and will not go away.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      63085fab
    • J
      git-clone: lose the artificial "first" fetch refspec · 3dd3d5b0
      Junio C Hamano 提交于
      Now we lost the "first refspec is the one that is merged by default"
      rule, there is no reason for clone to list the remote primary branch
      in the config file explicitly anymore.
      
      We still need it for the traditional layout for other reasons,
      though.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3dd3d5b0
    • J
      git-clone: use wildcard specification for tracking branches · 61dde8f9
      Junio C Hamano 提交于
      This stops enumerating the set of branches found on the remote
      side when a clone was made in the configuration file.  Instead,
      a single entry that maps each remote branch to the local
      tracking branch for the remote under the same name is created.
      
      Doing it this way not only shortens the configuration file, but
      automatically adjusts to a new branch added on the remote side
      after the clone is made.
      
      Unfortunately this cannot be done for the traditional layout,
      where we always need to special case the 'master' to 'origin'
      mapping within the local branch namespace.  But that is Ok; it
      will be going away before v1.5.0.
      
      We could also lose the "primary branch" mapping at the
      beginning, but that has to wait until we implement the "forbid
      'git pull' when we do not have branch.$current.merge for the
      current branch" policy we earlier discussed.  That should also
      be in v1.5.0
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      61dde8f9
  25. 07 12月, 2006 1 次提交
    • A
      Explicitly add the default "git pull" behaviour to .git/config on clone · 955289bf
      Andy Parkins 提交于
      Without any specification in the .git/config file, git-pull will execute
      "git-pull origin"; which in turn defaults to pull from the first "pull"
      definition for the remote, "origin".
      
      This is a difficult set of defaults to track for a new user, and it's
      difficult to see what tells git to do this (especially when it is
      actually hard-coded behaviour).  To ameliorate this slightly, this patch
      explicitly specifies the default behaviour during a clone using the
      "branch" section of the config.
      
      For example, a clone of a typical repository would create a .git/config
      containing:
        [remote "origin"]
        url = proto://host/repo.git
        fetch = refs/heads/master:refs/remotes/origin/master
        [branch "master"]
        remote = origin
        merge = refs/heads/master
      
      The [branch "master"] section is such that there is no change to the
      functionality of git-pull, but that functionality is now explicitly
      documented.
      Signed-off-by: NAndy Parkins <andyparkins@gmail.com>
      955289bf
  26. 05 12月, 2006 1 次提交
  27. 28 11月, 2006 1 次提交
  28. 25 11月, 2006 2 次提交
  29. 24 11月, 2006 1 次提交
  30. 24 10月, 2006 1 次提交
  31. 21 10月, 2006 1 次提交
  32. 15 10月, 2006 1 次提交
  33. 29 9月, 2006 1 次提交
  34. 14 9月, 2006 1 次提交