1. 28 1月, 2016 2 次提交
    • C
      test-dump-untracked-cache: don't modify the untracked cache · dae6c322
      Christian Couder 提交于
      To correctly perform its testing function,
      test-dump-untracked-cache should not change the state of the
      untracked cache in the index.
      
      As a previous patch makes read_index_from() change the state of
      the untracked cache and as test-dump-untracked-cache indirectly
      calls this function, we need a mechanism to prevent
      read_index_from() from changing the untracked cache state when
      it's called from test-dump-untracked-cache.
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dae6c322
    • C
      config: add core.untrackedCache · 435ec090
      Christian Couder 提交于
      When we know that mtime on directory as given by the environment
      is usable for the purpose of untracked cache, we may want the
      untracked cache to be always used without any mtime test or
      kernel name check being performed.
      
      Also when we know that mtime is not usable for the purpose of
      untracked cache, for example because the repo is shared over a
      network file system, we may want the untracked-cache to be
      automatically removed from the index.
      
      Allow the user to express such preference by setting the
      'core.untrackedCache' configuration variable, which can take
      'keep', 'false', or 'true' and default to 'keep'.
      
      When read_index_from() is called, it now adds or removes the
      untracked cache in the index to respect the value of this
      variable. So it does nothing if the value is `keep` or if the
      variable is unset; it adds the untracked cache if the value is
      `true`; and it removes the cache if the value is `false`.
      
      `git update-index --[no-|force-]untracked-cache` still adds the
      untracked cache to, or removes it, from the index, but this
      shows a warning if it goes against the value of
      core.untrackedCache, because the next time the index is read
      the untracked cache will be added or removed if the
      configuration is set to do so.
      
      Also `--untracked-cache` used to check that the underlying
      operating system and file system change `st_mtime` field of a
      directory if files are added or deleted in that directory. But
      because those tests take a long time, `--untracked-cache` no
      longer performs them. Instead, there is now
      `--test-untracked-cache` to perform the tests. This change
      makes `--untracked-cache` the same as `--force-untracked-cache`.
      
      This last change is backward incompatible and should be
      mentioned in the release notes.
      Helped-by: NDuy Nguyen <pclouds@gmail.com>
      Helped-by: NTorsten Bögershausen <tboegi@web.de>
      Helped-by: NStefan Beller <sbeller@google.com>
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      
      read-cache: Duy'sfixup
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      435ec090
  2. 26 1月, 2016 7 次提交
  3. 30 12月, 2015 1 次提交
  4. 16 12月, 2015 11 次提交
  5. 15 12月, 2015 2 次提交
    • S
      completion: fix completing unstuck email alias arguments · ccab28a9
      SZEDER Gábor 提交于
      Completing unstuck form of email aliases doesn't quite work:
      
        $ git send-email --to <TAB>
        alice   bob     cecil
        $ git send-email --to a<TAB>
        alice   bob     cecil
      
      While listing email aliases works as expected, the second case should
      just complete to 'alice', but it keeps offering all email aliases
      instead.
      
      The cause for this behavior is that in this case we mistakenly tell
      __gitcomp() explicitly that the current word to be completed is empty,
      while in reality it is not.  As a result __gitcomp() doesn't filter
      out non-matching aliases, so all aliases end up being offered over and
      over again.
      
      Fix this by not passing the current word to be completed to
      __gitcomp() and letting it go the default route and grab it from the
      '$cur' variable.  Don't pass empty prefix either, because it's assumed
      to be empty when unspecified, so it's not necessary.
      Signed-off-by: NSZEDER Gábor <szeder@ira.uka.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ccab28a9
    • J
      ident: fix undefined variable when NO_IPV6 is set · 58d29ece
      Jeff King 提交于
      Commit 00bce77f (ident.c: add support for IPv6, 2015-11-27)
      moved the "gethostbyname" call out of "add_domainname" and
      into the helper function "canonical_name". But when moving
      the code, it forgot that the "buf" variable is passed as
      "host" in the helper.
      Reported-by: Njohan defries <johandefries@gmail.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      58d29ece
  6. 12 12月, 2015 16 次提交
  7. 11 12月, 2015 1 次提交