1. 01 2月, 2014 7 次提交
  2. 18 1月, 2014 1 次提交
    • R
      git-svn: workaround for a bug in svn serf backend · ac930287
      Roman Kagan 提交于
      Subversion serf backend in versions 1.8.5 and below has a bug(*) that the
      function creating the descriptor of a file change -- add_file() --
      doesn't make a copy of its third argument when storing it on the
      returned descriptor.  As a result, by the time this field is used (in
      transactions of file copying or renaming) it may well be released, and
      the memory reused.
      
      One of its possible manifestations is the svn assertion triggering on an
      invalid path, with a message
      
      svn_fspath__skip_ancestor: Assertion
      `svn_fspath__is_canonical(child_fspath)' failed.
      
      This patch works around this bug, by storing the value to be passed as
      the third argument to add_file() in a local variable with the same scope
      as the file change descriptor, making sure their lifetime is the same.
      
      * [ew: fixed in Subversion r1553376 as noted by Jonathan Nieder]
      
      Cc: Benjamin Pabst <benjamin.pabst85@gmail.com>
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NRoman Kagan <rkagan@mail.ru>
      ac930287
  3. 14 1月, 2014 8 次提交
  4. 11 1月, 2014 1 次提交
    • J
      mv: let 'git mv file no-such-dir/' error out on Windows, too · a8933469
      Johannes Sixt 提交于
      The previous commit c57f6281 (mv: let 'git mv file no-such-dir/' error out)
      relies on that rename("file", "no-such-dir/") fails if the directory does not
      exist (note the trailing slash).  This does not work as expected on Windows:
      This rename() call does not fail, but renames "file" to "no-such-dir" (not to
      "no-such-dir/file"). Insert an explicit check for this case to force an error.
      
      This changes the error message from
      
         $ git mv file no-such-dir/
         fatal: renaming 'file' failed: Not a directory
      
      to
      
         $ git mv file no-such-dir/
         fatal: destination directory does not exist, source=file, destination=no-such-dir/
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a8933469
  5. 07 1月, 2014 2 次提交
  6. 04 1月, 2014 1 次提交
  7. 03 1月, 2014 2 次提交
    • K
      gc: notice gc processes run by other users · ed7eda8b
      Kyle J. McKay 提交于
      Since 64a99eb4 git gc refuses to run without the --force option if
      another gc process on the same repository is already running.
      
      However, if the repository is shared and user A runs git gc on the
      repository and while that gc is still running user B runs git gc on
      the same repository the gc process run by user A will not be noticed
      and the gc run by user B will go ahead and run.
      
      The problem is that the kill(pid, 0) test fails with an EPERM error
      since user B is not allowed to signal processes owned by user A
      (unless user B is root).
      
      Update the test to recognize an EPERM error as meaning the process
      exists and another gc should not be run (unless --force is given).
      Signed-off-by: NKyle J. McKay <mackyle@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ed7eda8b
    • J
      Revert "prompt: clean up strbuf usage" · e1c1a324
      Jeff King 提交于
      This reverts commit 31b49d9b.
      
      That commit taught do_askpass to hand ownership of our
      buffer back to the caller rather than simply return a
      pointer into our internal strbuf.  What it failed to notice,
      though, was that our internal strbuf is static, because we
      are trying to emulate the getpass() interface.
      
      By handing off ownership, we created a memory leak that
      cannot be solved. Sometimes git_prompt returns a static
      buffer from getpass() (or our smarter git_terminal_prompt
      wrapper), and sometimes it returns an allocated string from
      do_askpass.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e1c1a324
  8. 31 12月, 2013 1 次提交
  9. 21 12月, 2013 1 次提交
  10. 18 12月, 2013 15 次提交
  11. 13 12月, 2013 1 次提交
    • J
      cat-file: handle --batch format with missing type/size · 6554dfa9
      Jeff King 提交于
      Commit 98e2092b taught cat-file to stream blobs with --batch,
      which requires that we look up the object type before
      loading it into memory.  As a result, we now print the
      object header from information in sha1_object_info, and the
      actual contents from the read_sha1_file. We double-check
      that the information we printed in the header matches the
      content we are about to show.
      
      Later, commit 93d2a607 allowed custom header lines for
      --batch, and commit 5b086407 made type lookups optional. As a
      result, specifying a header line without the type or size
      means that we will not look up those items at all.
      
      This causes our double-checking to erroneously die with an
      error; we think the type or size has changed, when in fact
      it was simply left at "0".
      
      For the size, we can fix this by only doing the consistency
      double-check when we have retrieved the size via
      sha1_object_info. In the case that we have not retrieved the
      value, that means we also did not print it, so there is
      nothing for us to check that we are consistent with.
      
      We could do the same for the type. However, besides our
      consistency check, we also care about the type in deciding
      whether to stream or not. So instead of handling the case
      where we do not know the type, this patch instead makes sure
      that we always trigger a type lookup when we are printing,
      so that even a format without the type will stream as we
      would in the normal case.
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6554dfa9