1. 07 10月, 2010 3 次提交
    • J
      Add string comparison functions that respect the ignore_case variable. · 8cf2a84e
      Joshua Jensen 提交于
      Multiple locations within this patch series alter a case sensitive
      string comparison call such as strcmp() to be a call to a string
      comparison call that selects case comparison based on the global
      ignore_case variable. Behaviorally, when core.ignorecase=false, the
      *_icase() versions are functionally equivalent to their C runtime
      counterparts.  When core.ignorecase=true, the *_icase() versions perform
      a case insensitive comparison.
      
      Like Linus' earlier ignorecase patch, these may ignore filename
      conventions on certain file systems. By isolating filename comparisons
      to certain functions, support for those filename conventions may be more
      easily met.
      Signed-off-by: NJoshua Jensen <jjensen@workspacewhiz.com>
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8cf2a84e
    • Æ
      Makefile & configure: add a NO_FNMATCH_CASEFOLD flag · 4de066b6
      Ævar Arnfjörð Bjarmason 提交于
      On some platforms (like Solaris) there is a fnmatch, but it doesn't
      support the GNU FNM_CASEFOLD extension that's used by the
      jj/icase-directory series' fnmatch_icase wrapper.
      
      Change the Makefile so that it's now possible to set
      NO_FNMATCH_CASEFOLD=YesPlease on those systems, and add a configure
      probe for it.
      
      Unlike the NO_REGEX check we don't add AC_INCLUDES_DEFAULT to our
      headers. This is because on a GNU system the definition of
      FNM_CASEFOLD in fnmatch.h is guarded by:
      
          #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
      
      One of the headers AC_INCLUDES_DEFAULT includes ends up defining one
      of those, so if we'd use it we'd always get
      NO_FNMATCH_CASEFOLD=YesPlease on GNU systems, even though they have
      FNM_CASEFOLD.
      
      When checking the flags we use:
      
          ifdef NO_FNMATCH
          ...
          else
          ifdef NO_FNMATCH_CASEFOLD
          ...
          endif
          endif
      
      The "else" so that we don't link against compat/fnmatch/fnmatch.o
      twice if both NO_FNMATCH and NO_FNMATCH_CASEFOLD are defined.
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4de066b6
    • Æ
      Makefile & configure: add a NO_FNMATCH flag · f3f3d936
      Ævar Arnfjörð Bjarmason 提交于
      Windows and MinGW both lack fnmatch() in their C library and needed
      compat/fnmatch, but they had duplicate code for adding the compat
      function, and there was no Makefile flag or configure check for
      fnmatch.
      
      Change the Makefile it so that it's now possible to compile the compat
      function with a NO_FNMATCH=YesPlease flag, and add a configure probe
      for it.
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f3f3d936
  2. 16 8月, 2010 2 次提交
    • D
      git-svn: fix fetch with deleted tag · 3235b705
      David D. Kilzer 提交于
      Currently git-svn assumes that two tags created from the same
      revision will have the same repo url, so it uses a ref to the
      tag without checking that its url matches the current url.
      
      This causes issues when fetching an svn repo where a tag was
      created, deleted, and then recreated under the following
      circumstances:
      
      - Both tags were copied from the same revision.
      - Both tags had the same name.
      - Both tags had different repository paths.
      - [Optional] Both tags have a file with the same name but
        different content.
      
      When all four conditions are met, a checksum mismatch error
      occurs because the content of two files with the same path
      differs (see t/t9155--git-svn-fetch-deleted-tag.sh):
      
          Checksum mismatch: ChangeLog 065854....
          expected: ce771b....
               got: 9563fd....
      
      When only the first three conditions are met, no error occurs
      but the tag in git matches the first (deleted) tag instead of
      the last (most recent) tag (see
      t/t9156-git-svn-fetch-deleted-tag-2.sh).
      
      The fix is to verify that the repo url for the ref matches the
      current url.  If the urls do not match, then a "tail" is grown
      on the tag name by appending a dash and rechecking the new ref's
      repo url until either a matching repo url is found or a new tag
      is created.
      Signed-off-by: NDavid D. Kilzer <ddkilzer@kilzer.net>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      3235b705
    • D
      git-svn: fix regex to remove "tail" from svn tags · 54fb7f9b
      David D. Kilzer 提交于
      Fix a regular expression used to remove the revision from the
      end of an svn tag or branch name.  The regex did not account for
      any "tail" (dashes) that may have been added to the end of the
      tag name (which first appeared in v1.4.1-rc2~11).  If not fixed,
      tags with names like "tags/mytag@5--@2" may be created.
      Signed-off-by: NDavid D. Kilzer <ddkilzer@kilzer.net>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      54fb7f9b
  3. 13 8月, 2010 12 次提交
  4. 12 8月, 2010 5 次提交
    • J
      Merge branch 'maint' · 7980e417
      Junio C Hamano 提交于
      * maint:
        post-receive-email: remove spurious commas in email subject
        fast-import: export correctly marks larger than 2^20-1
        t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
        diff: strip extra "/" when stripping prefix
      7980e417
    • M
      post-receive-email: remove spurious commas in email subject · b5e233ec
      Matthieu Moy 提交于
      The previous form produced subjects like
      
        [SCM] project.git branch, foo, updated. ...
      
      The new one will produce the lighter
      
        [SCM] project.git branch foo updated. ...
      Signed-off-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b5e233ec
    • R
      fast-import: export correctly marks larger than 2^20-1 · 7e7db5e4
      Raja R Harinath 提交于
      dump_marks_helper() has a bug when dumping marks larger than 2^20-1,
      i.e., when the sparse array has more than two levels.  The bug was
      that the 'base' counter was being shifted by 20 bits at level 3, and
      then again by 10 bits at level 2, rather than a total shift of 20 bits
      in this argument to the recursive call:
      
        (base + k) << m->shift
      
      There are two ways to fix this correctly, the elegant:
      
        (base + k) << 10
      
      and the one I chose due to edit distance:
      
        base + (k << m->shift)
      Signed-off-by: NRaja R Harinath <harinath@hurrynot.org>
      Acked-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7e7db5e4
    • Æ
      t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH · 55369342
      Ævar Arnfjörð Bjarmason 提交于
      Change the git-svn tests to use $PERL_PATH, not the "perl" in $PATH.
      
      Using perl in $PATH was added by Sam Vilain in v1.6.6-rc0~95^2~3,
      Philippe Bruhat introduced $PERL_PATH to the test suite in
      v1.6.6-rc0~9^2, but the lib-git-svn.sh tests weren't updated to use
      the new convention.
      
      This resulted in the git-svn tests always being skipped on my
      system. My /usr/bin/perl has access to SVN::Core and SVN::Repos, but
      the perl in my $PATH does not.
      Signed-off-by: NÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55369342
    • J
      diff: strip extra "/" when stripping prefix · d8faea9d
      Jakub Narebski 提交于
      There are two ways a user might want to use "diff --relative":
      
        1. For a file in a directory, like "subdir/file", the user
           can use "--relative=subdir/" to strip the directory.
      
        2. To strip part of a filename, like "foo-10", they can
           use "--relative=foo-".
      
      We currently handle both of those situations. However, if the user passes
      "--relative=subdir" (without the trailing slash), we produce inconsistent
      results. For the unified diff format, we collapse the double-slash of
      "a//file" correctly into "a/file". But for other formats (raw, stat,
      name-status), we end up with "/file".
      
      We can do what the user means here and strip the extra "/" (and only a
      slash).  We are not hurting any existing users of (2) above with this
      behavior change because the existing output for this case was nonsensical.
      
      Patch by Jakub, tests and commit message by Jeff King.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d8faea9d
  5. 10 8月, 2010 14 次提交
  6. 07 8月, 2010 4 次提交