1. 19 11月, 2007 12 次提交
    • S
      add refname_match() · 79803322
      Steffen Prohaska 提交于
      We use at least two rulesets for matching abbreviated refnames with
      full refnames (starting with 'refs/').  git-rev-parse and git-fetch
      use slightly different rules.
      
      This commit introduces a new function refname_match
      (const char *abbrev_name, const char *full_name, const char **rules).
      
      abbrev_name is expanded using the rules and matched against full_name.
      If a match is found the function returns true.  rules is a NULL-terminate
      list of format patterns with "%.*s", for example:
      
          const char *ref_rev_parse_rules[] = {
                     "%.*s",
                     "refs/%.*s",
                     "refs/tags/%.*s",
                     "refs/heads/%.*s",
                     "refs/remotes/%.*s",
                     "refs/remotes/%.*s/HEAD",
                     NULL
          };
      
      Asterisks are included in the format strings because this is the form
      required in sha1_name.c.  Sharing the list with the functions there is
      a good idea to avoid duplicating the rules.  Hopefully this
      facilitates unified matching rules in the future.
      
      This commit makes the rules used by rev-parse for resolving refs to
      sha1s available for string comparison.  Before this change, the rules
      were buried in get_sha1*() and dwim_ref().
      
      A follow-up commit will refactor the rules used by fetch.
      
      refname_match() will be used for matching refspecs in git-send-pack.
      
      Thanks to Daniel Barkalow <barkalow@iabervon.org> for pointing
      out that ref_matches_abbrev in remote.c solves a similar problem
      and care should be taken to avoid confusion.
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      79803322
    • S
      push: support pushing HEAD to real branch name · 47d996a2
      Steffen Prohaska 提交于
      This teaches "push <remote> HEAD" to resolve HEAD on the local
      side to its real branch name, e.g. master, and then act as if
      the real branch name was specified. So we have a shorthand for
      pushing the current branch. Besides HEAD, no other symbolic ref
      is resolved.
      
      Thanks to Daniel Barkalow <barkalow@iabervon.org> for suggesting
      this implementation, which is much simpler than the
      implementation proposed before.
      Signed-off-by: NSteffen Prohaska <prohaska@zib.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      47d996a2
    • J
      Update draft release notes for 1.5.4 · ea559605
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ea559605
    • J
      Merge branch 'lt/rev-list-gitlink' · 5d3d1cac
      Junio C Hamano 提交于
      * lt/rev-list-gitlink:
        Fix rev-list when showing objects involving submodules
      5d3d1cac
    • J
      Merge branch 'ds/checkout-upper' · d577bc58
      Junio C Hamano 提交于
      * ds/checkout-upper:
        git-checkout: Test for relative path use.
        git-checkout: Support relative paths containing "..".
      d577bc58
    • J
      Merge branch 'sh/p4' · ffa06873
      Junio C Hamano 提交于
      * sh/p4:
        git-p4: Fix direct import from perforce after fetching changes through git from origin
      ffa06873
    • J
      Merge branch 'lt/rev-list-interactive' · 761e8566
      Junio C Hamano 提交于
      * lt/rev-list-interactive:
        Fix parent rewriting in --early-output
        revision walker: mini clean-up
        Enhance --early-output format
        Add "--early-output" log flag for interactive GUI use
        Simplify topo-sort logic
      761e8566
    • J
      Merge branch 'ph/diffopts' · e6cb314c
      Junio C Hamano 提交于
      * ph/diffopts:
        Reorder diff_opt_parse options more logically per topics.
        Make the diff_options bitfields be an unsigned with explicit masks.
        Use OPT_BIT in builtin-pack-refs
        Use OPT_BIT in builtin-for-each-ref
        Use OPT_SET_INT and OPT_BIT in builtin-branch
        parse-options new features.
      e6cb314c
    • J
      41d8a5f0
    • J
      Merge branch 'maint' to synchronize with 1.5.3.6 · 4a44b9ea
      Junio C Hamano 提交于
      * maint:
        GIT 1.5.3.6
        grep -An -Bm: fix invocation of external grep command
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4a44b9ea
    • J
      GIT 1.5.3.6 · 005e2dfd
      Junio C Hamano 提交于
      005e2dfd
    • G
      Use compat mkdtemp() on Solaris boxes · 4e0da763
      Guido Ostkamp 提交于
      Define NO_MKDTEMP for all variants of SunOS; Solaris 10 does not
      have mkdtemp() and all the other versions our Makefile knows
      about don't have it either.
      
      NO_{SETENV,UNSETENV,C99_FORMAT,STRTOUMAX} definitions cannot be
      unified across versions.  Beginning with Solaris 10, the C-library
      provides unsetenv(), setenv() and strtoumax().  Also 'z'/'t' formats
      are supported.  However, older versions of Solaris do not support
      these.
      Signed-off-by: NGuido Ostkamp <git@ostkamp.fastmail.fm>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4e0da763
  2. 18 11月, 2007 9 次提交
  3. 17 11月, 2007 11 次提交
    • J
      Update draft release notes for 1.5.4 · dee1b1ea
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dee1b1ea
    • M
      Fix and improve t7004 (git-tag tests) · eb9d2b91
      Mike Hommey 提交于
      Brown paper bag fix to avoid using non portable sed syntax. The
      test by itself didn't catch what it was supposed to, anyways.
      
      The new test first checks if git-tag correctly errors out when
      the user exited the editor without editing the file.  Then it
      checks if what the user was presented in the editor was any
      useful, which we define as the following:
      
       * It begins with a single blank line, where the invoked editor
         would typically place the editing curser at, so that the user
         can immediately start typing;
      
       * It has some instruction but that comes after that initial
         blank line, all lines prefixed with "#".  We specifically do
         not check for the wording of this instruction.
      
       * And it has nothing else, as the expected behaviour is "Hey
         you did not leave any message".
      Signed-off-by: NMike Hommey <mh@glandium.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      eb9d2b91
    • S
      347989f4
    • S
      user-manual.txt: minor clarification. · e502c2c3
      Sergei Organov 提交于
      Signed-off-by: NSergei Organov <osv@javad.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e502c2c3
    • J
      Merge branch 'maint' · f1a82fe9
      Junio C Hamano 提交于
      * maint:
        Update draft release notes for 1.5.3.6
        Fix per-directory exclude handing for "git add"
        core.excludesfile clean-up
        Fix t9101 test failure caused by Subversion "auto-props"
        git-send-email: add charset header if we add encoded 'From'
      f1a82fe9
    • J
      Update draft release notes for 1.5.3.6 · 78e69478
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      78e69478
    • J
      Merge branch 'ds/maint-deflatebound' into maint · b574c8d8
      Junio C Hamano 提交于
      * ds/maint-deflatebound:
        Improve accuracy of check for presence of deflateBound.
      b574c8d8
    • J
      Fix per-directory exclude handing for "git add" · 0e06cc8b
      Junio C Hamano 提交于
      In "dir_struct", each exclusion element in the exclusion stack records a
      base string (pointer to the beginning with length) so that we can tell
      where it came from, but this pointer is just pointing at the parameter
      that is given by the caller to the push_exclude_per_directory()
      function.
      
      While read_directory_recursive() runs, calls to excluded() makes use
      the data in the exclusion elements, including this base string.  The
      caller of read_directory_recursive() is not supposed to free the
      buffer it gave to push_exclude_per_directory() earlier, until it
      returns.
      
      The test case Bruce Stephens gave in the mailing list discussion
      was simplified and added to the t3700 test.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0e06cc8b
    • J
      core.excludesfile clean-up · dcf0c16e
      Junio C Hamano 提交于
      There are inconsistencies in the way commands currently handle
      the core.excludesfile configuration variable.  The problem is
      the variable is too new to be noticed by anything other than
      git-add and git-status.
      
       * git-ls-files does not notice any of the "ignore" files by
         default, as it predates the standardized set of ignore files.
         The calling scripts established the convention to use
         .git/info/exclude, .gitignore, and later core.excludesfile.
      
       * git-add and git-status know about it because they call
         add_excludes_from_file() directly with their own notion of
         which standard set of ignore files to use.  This is just a
         stupid duplication of code that need to be updated every time
         the definition of the standard set of ignore files is
         changed.
      
       * git-read-tree takes --exclude-per-directory=<gitignore>,
         not because the flexibility was needed.  Again, this was
         because the option predates the standardization of the ignore
         files.
      
       * git-merge-recursive uses hardcoded per-directory .gitignore
         and nothing else.  git-clean (scripted version) does not
         honor core.* because its call to underlying ls-files does not
         know about it.  git-clean in C (parked in 'pu') doesn't either.
      
      We probably could change git-ls-files to use the standard set
      when no excludes are specified on the command line and ignore
      processing was asked, or something like that, but that will be a
      change in semantics and might break people's scripts in a subtle
      way.  I am somewhat reluctant to make such a change.
      
      On the other hand, I think it makes perfect sense to fix
      git-read-tree, git-merge-recursive and git-clean to follow the
      same rule as other commands.  I do not think of a valid use case
      to give an exclude-per-directory that is nonstandard to
      read-tree command, outside a "negative" test in the t1004 test
      script.
      
      This patch is the first step to untangle this mess.
      
      The next step would be to teach read-tree, merge-recursive and
      clean (in C) to use setup_standard_excludes().
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dcf0c16e
    • W
      Fix t9101 test failure caused by Subversion "auto-props" · 2587d679
      Wincent Colaiuta 提交于
      If a user has an "auto-prop" in his/her ~/.subversion/config file for
      automatically setting the svn:keyword Id property on all ".c" files
      (a reasonably common configuration in the Subversion world) then one
      of the "svn propset" operations in the very first test would become a
      no-op, which in turn would make the next commit a no-op.
      
      This then caused the 25th test ('test propget') to fail because it
      expects a certain number of commits to have taken place but the actual
      number of commits was off by one.
      
      Björn Steinbrink identified the "auto-prop" feature as the cause
      of the failure. This patch avoids it by passing the "--no-auto-prop"
      flag to "svn import" when setting up the test repository, thus ensuring
      that the "svn propset" operation is no longer a no-op, regardless of the
      users' settings in their config.
      Signed-off-by: NWincent Colaiuta <win@wincent.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2587d679
    • J
      git-send-email: add charset header if we add encoded 'From' · 8291db6f
      Jeff King 提交于
      We sometimes pick out the original rfc822 'From' header and
      include it in the body of the message. If the original
      author's name needs encoding, then we should specify that in
      the content-type header.
      
      If we already had a content-type header in the mail, then we
      may need to re-encode. The logic is there to detect
      this case, but it doesn't actually do the re-encoding.
      Signed-off-by: NJeff King <peff@peff.net>
      Acked-by: NUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8291db6f
  4. 16 11月, 2007 6 次提交
  5. 15 11月, 2007 2 次提交
    • J
      core.excludesfile clean-up · 039bc64e
      Junio C Hamano 提交于
      There are inconsistencies in the way commands currently handle
      the core.excludesfile configuration variable.  The problem is
      the variable is too new to be noticed by anything other than
      git-add and git-status.
      
       * git-ls-files does not notice any of the "ignore" files by
         default, as it predates the standardized set of ignore files.
         The calling scripts established the convention to use
         .git/info/exclude, .gitignore, and later core.excludesfile.
      
       * git-add and git-status know about it because they call
         add_excludes_from_file() directly with their own notion of
         which standard set of ignore files to use.  This is just a
         stupid duplication of code that need to be updated every time
         the definition of the standard set of ignore files is
         changed.
      
       * git-read-tree takes --exclude-per-directory=<gitignore>,
         not because the flexibility was needed.  Again, this was
         because the option predates the standardization of the ignore
         files.
      
       * git-merge-recursive uses hardcoded per-directory .gitignore
         and nothing else.  git-clean (scripted version) does not
         honor core.* because its call to underlying ls-files does not
         know about it.  git-clean in C (parked in 'pu') doesn't either.
      
      We probably could change git-ls-files to use the standard set
      when no excludes are specified on the command line and ignore
      processing was asked, or something like that, but that will be a
      change in semantics and might break people's scripts in a subtle
      way.  I am somewhat reluctant to make such a change.
      
      On the other hand, I think it makes perfect sense to fix
      git-read-tree, git-merge-recursive and git-clean to follow the
      same rule as other commands.  I do not think of a valid use case
      to give an exclude-per-directory that is nonstandard to
      read-tree command, outside a "negative" test in the t1004 test
      script.
      
      This patch is the first step to untangle this mess.
      
      The next step would be to teach read-tree, merge-recursive and
      clean (in C) to use setup_standard_excludes().
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      039bc64e
    • J
      Merge branch 'sp/fetch-fix' · f5f6cb87
      Junio C Hamano 提交于
      * sp/fetch-fix:
        git-fetch: avoid local fetching from alternate (again)
        rev-list: Introduce --quiet to avoid /dev/null redirects
        run-command: Support sending stderr to /dev/null
        git-fetch: Always fetch tags if the object they reference exists
      f5f6cb87