1. 21 11月, 2011 2 次提交
    • R
      config.c: Fix a static buffer overwrite bug by avoiding mkpath() · 05bab3ea
      Ramsay Jones 提交于
      On cygwin, test number 21 of t3200-branch.sh (git branch -m q q2
      without config should succeed) fails. The failure involves the
      functions from path.c which parcel out internal static buffers
      from the git_path() and mkpath() functions.
      
      In particular, the rename_ref() function calls safe_create_leading\
      _directories() with a filename returned by git_path("logs/%s", ref).
      safe_create_leading_directories(), in turn, calls stat() on each
      element of the path it is given. On cygwin, this leads to a call
      to git_config() for each component of the path, since this test
      explicitly removes the config file. git_config() calls mkpath(), so
      on the fourth component of the path, the original buffer passed
      into the function is overwritten with the config filename.
      
      Note that this bug is specific to cygwin and it's schizophrenic
      stat() functions (see commits adbc0b6b, 7faee6b8 and 79748439). The
      lack of a config file and a path with at least four elements is
      also important to trigger the bug.
      
      In order to fix the problem, we replace the call to mkpath() with
      a call to mksnpath() and provide our own buffer.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      05bab3ea
    • R
      t5501-*.sh: Fix url passed to clone in setup test · 3a81f33c
      Ramsay Jones 提交于
      In particular, the url passed to git-clone has an extra '/' given
      after the 'file://' schema prefix, thus:
      
          git clone --reference=original "file:///$(pwd)/original one
      
      Once the prefix is removed, the remainder of the url looks something
      like "//home/ramsay/git/t/...", which is then interpreted as an
      network path. This then results in a "Permission denied" error, like
      so:
      
          ramsay $ ls //home
          ls: cannot access //home: No such host or network path
          ramsay $ ls //home/ramsay
          ls: cannot access //home/ramsay: Permission denied
          ramsay $
      
      In order to fix the problem, we simply remove the extraneous '/'
      character from the url.
      Signed-off-by: NRamsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3a81f33c
  2. 19 11月, 2011 9 次提交
  3. 18 11月, 2011 3 次提交
  4. 17 11月, 2011 2 次提交
    • J
      refs: loosen over-strict "format" check · 09116a1c
      Junio C Hamano 提交于
      The add_extra_ref() interface is used to add an extra-ref that is _not_
      our ref for the purpose of helping auto-following of tags and reducing
      object transfer from remote repository, and they are typically formatted
      as a tagname followed by ^{} to make sure no valid refs match that
      pattern. In other words, these entries are deliberately formatted not to
      pass check-refname-format test.
      
      A recent series however added a test unconditionally to the add_ref()
      function that is called from add_extra_ref(). The check may be sensible
      for other two callsites of the add_ref() interface, but definitely is
      a wrong thing to do in add_extra_ref(). Disable it.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
      09116a1c
    • M
      mailmap: xcalloc mailmap_info · 74b531f6
      Marc-André Lureau 提交于
      This is to avoid reaching free of uninitialized members.
      
      With an invalid .mailmap (and perhaps in other cases), it can reach
      free(mi->name) with garbage for example.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      74b531f6
  5. 16 11月, 2011 7 次提交
  6. 13 11月, 2011 1 次提交
  7. 12 11月, 2011 1 次提交
  8. 11 11月, 2011 3 次提交
    • J
      c444c165
    • J
      Merge 'build-in git-mktree' · 77f143bf
      Junio C Hamano 提交于
      * commit '633e3556': (5835 commits)
        build-in git-mktree
        allow -t abbreviation for --track in git branch
        gitweb: Remove function prototypes (cleanup)
        Documentation: cloning to empty directory is allowed
        Clarify kind of conflict in merge-one-file helper
        git config: clarify --add and --get-color
        archive-tar.c: squelch a type mismatch warning
        Start 1.6.4 development
        Start 1.6.3.1 maintenance series.
        GIT 1.6.3
        t4029: use sh instead of bash
        t4200: convert sed expression which operates on non-text file to perl
        t4200: remove two unnecessary lines
        t/annotate-tests.sh: avoid passing a non-newline terminated file to sed
        t4118: avoid sed invocation on file without terminating newline
        t4118: add missing '&&'
        t8005: use egrep when extended regular expressions are required
        git-clean doc: the command only affects paths under $(cwd)
        improve error message in config.c
        t4018-diff-funcname: add cpp xfuncname pattern to syntax test
        ...
      77f143bf
    • L
      mktree: fix a memory leak in write_tree() · cd9519bd
      Liu Yuan 提交于
      We forget to call strbuf_release to release the buf memory.
      Signed-off-by: NLiu Yuan <tailai.ly@taobao.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cd9519bd
  9. 09 11月, 2011 12 次提交