1. 09 3月, 2013 1 次提交
    • J
      environment: add GIT_PREFIX to local_repo_env · a6f7f9a3
      Jeff King 提交于
      The GIT_PREFIX variable is set based on our location within
      the working tree. It should therefore be cleared whenever
      GIT_WORK_TREE is cleared.
      
      In practice, this doesn't cause any bugs, because none of
      the sub-programs we invoke with local_repo_env cleared
      actually care about GIT_PREFIX. But this is the right thing
      to do, and future proofs us against that assumption changing.
      
      While we're at it, let's define a GIT_PREFIX_ENVIRONMENT
      macro; this avoids repetition of the string literal, which
      can help catch any spelling mistakes in the code.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a6f7f9a3
  2. 08 3月, 2013 3 次提交
  3. 02 3月, 2013 4 次提交
  4. 28 2月, 2013 4 次提交
  5. 27 2月, 2013 1 次提交
  6. 26 2月, 2013 16 次提交
  7. 25 2月, 2013 1 次提交
  8. 23 2月, 2013 1 次提交
    • M
      Provide a mechanism to turn off symlink resolution in ceiling paths · 7ec30aaa
      Michael Haggerty 提交于
      Commit 1b77d83c 'setup_git_directory_gently_1(): resolve symlinks
      in ceiling paths' changed the setup code to resolve symlinks in the
      entries in GIT_CEILING_DIRECTORIES.  Because those entries are
      compared textually to the symlink-resolved current directory, an
      entry in GIT_CEILING_DIRECTORIES that contained a symlink would have
      no effect.  It was known that this could cause performance problems
      if the symlink resolution *itself* touched slow filesystems, but it
      was thought that such use cases would be unlikely.  The intention of
      the earlier change was to deal with a case when the user has this:
      
      	GIT_CEILING_DIRECTORIES=/home/gitster
      
      but in reality, /home/gitster is a symbolic link to somewhere else,
      e.g. /net/machine/home4/gitster. A textual comparison between the
      specified value /home/gitster and the location getcwd(3) returns
      would not help us, but readlink("/home/gitster") would still be
      fast.
      
      After this change was released, Anders Kaseorg <andersk@mit.edu>
      reported:
      
      > [...] my computer has been acting so slow when I’m not connected to
      > the network.  I put various network filesystem paths in
      > $GIT_CEILING_DIRECTORIES, such as
      > /afs/athena.mit.edu/user/a/n/andersk (to avoid hitting its parents
      > /afs/athena.mit.edu, /afs/athena.mit.edu/user/a, and
      > /afs/athena.mit.edu/user/a/n which all live in different AFS
      > volumes).  Now when I’m not connected to the network, every
      > invocation of Git, including the __git_ps1 in my shell prompt, waits
      > for AFS to timeout.
      
      To allow users to work around this problem, give them a mechanism to
      turn off symlink resolution in GIT_CEILING_DIRECTORIES entries.  All
      the entries that follow an empty entry will not be checked for symbolic
      links and used literally in comparison.  E.g. with these:
      
      	GIT_CEILING_DIRECTORIES=:/foo/bar:/xyzzy or
      	GIT_CEILING_DIRECTORIES=/foo/bar::/xyzzy
      
      we will not readlink("/xyzzy") because it comes after an empty entry.
      
      With the former (but not with the latter), "/foo/bar" comes after an
      empty entry, and we will not readlink it, either.
      Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ec30aaa
  9. 21 2月, 2013 1 次提交
    • J
      Makefile: avoid infinite loop on configure.ac change · 7f1b6976
      Jeff King 提交于
      If you are using autoconf and change the configure.ac, the
      Makefile will notice that config.status is older than
      configure.ac, and will attempt to rebuild and re-run the
      configure script to pick up your changes. The first step in
      doing so is to run "make configure". Unfortunately, this
      tries to include config.mak.autogen, which depends on
      config.status, which depends on configure.ac; so we must
      rebuild config.status. Which leads to us running "make
      configure", and so on.
      
      It's easy to demonstrate with:
      
        make configure
        ./configure
        touch configure.ac
        make
      
      We can break this cycle by not re-invoking make to build
      "configure", and instead just putting its rules inline into
      our config.status rebuild procedure.  We can avoid a copy by
      factoring the rules into a make variable.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7f1b6976
  10. 20 2月, 2013 7 次提交
  11. 19 2月, 2013 1 次提交
    • J
      imap-send: move #ifdef around · 1e1fe529
      Junio C Hamano 提交于
      Instead of adding an early return to the inside of the
      ssl_socket_connect() function for NO_OPENSSL compilation, split it
      into a separate stub function.
      
      No functional change, but the next change to extend ssl_socket_connect()
      will become easier to read this way.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1e1fe529