1. 17 Nov, 2010 1 commit
  2. 16 Nov, 2010 1 commit
  3. 15 Nov, 2010 1 commit
  4. 29 Oct, 2010 1 commit
    • Jeff King's avatar
      apply: don't segfault on binary files with missing data · 24305cd7
      Jeff King authored
      Usually when applying a binary diff generated without
      --binary, it will be rejected early, as we don't even have
      the full sha1 of the pre- and post-images.
      However, if the diff is generated with --full-index (but not
      --binary), then we will actually try to apply it. If we have
      the postimage blob, then we can take a shortcut and never
      even look at the binary diff at all (e.g., this can happen
      when rebasing changes within a repository).
      If we don't have the postimage blob, though, we try to look
      at the actual fragments, of which there are none, and get a
      segfault. This patch checks explicitly for that case and
      complains to the user instead of segfaulting. We need to
      keep the check at a low level so that the "shortcut" case
      above continues to work.
      We also add a test that demonstrates the segfault. While
      we're at it, let's also explicitly test the shortcut case.
      Reported-by: default avatarRafaël Carré <rafael.carre@gmail.com>
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  5. 18 Oct, 2010 2 commits
    • Jonathan Nieder's avatar
      send-pack: avoid redundant "pack-objects died with strange error" · 64f003ab
      Jonathan Nieder authored
      Saying "pack-objects died with strange error" after "pack-objects died
      of signal 13" seems kind of redundant.  The latter message was
      introduced when the run-command API changed to report abnormal exits
      on behalf of the caller (v1.6.5-rc0~86^2~5, 2009-07-04).
      Similarly, after a controlled pack-objects failure (detectable as a
      normal exit with nonzero status), a "died with strange error" message
      would be redundant next to the message from pack-objects itself.
      So leave off the "strange error" messages.
      The result should look something like this:
      	$ git push sf master
      	Counting objects: 21542, done.
      	Compressing objects: 100% (4179/4179), done.
      	fatal: Unable to create temporary file: Permission denied
      	error: pack-objects died of signal 13
      	error: failed to push some refs to 'ssh://sf.net/gitroot/project/project'
      Or in the "controlled exit" case (contrived example):
      	fatal: delta size changed
      	error: failed to push some refs to 'ssh://example.com/foo/bar'
      Improved-by: default avatarJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • Thomas Rast's avatar
      merge-file: correctly find files when called in subdir · 55846b9a
      Thomas Rast authored
      Since b5412484 (merge.conflictstyle: choose between "merge" and "diff3
      -m" styles, 2008-08-29), git-merge-file uses setup_directory_gently(),
      thus cd'ing around to find any possible config files to use.
      This broke merge-file when it is called from within a subdirectory of
      a repository, and the arguments are all relative paths.
      Fix by prepending the prefix, as passed down from the main git
      setup code, if there is any.
      Signed-off-by: default avatarThomas Rast <trast@student.ethz.ch>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  6. 14 Oct, 2010 1 commit
    • Jeff King's avatar
      rev-list: handle %x00 NUL in user format · 9130ac9f
      Jeff King authored
      The code paths for showing commits in "git log" and "git
      rev-list --graph" correctly handle embedded NULs by looking
      only at the resulting strbuf's length, and never treating it
      as a C string. The code path for regular rev-list, however,
      used printf("%s"), which resulted in truncated output. This
      patch uses fwrite instead, like the --graph code path.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  7. 08 Oct, 2010 4 commits
  8. 06 Oct, 2010 2 commits
  9. 30 Sep, 2010 1 commit
  10. 29 Sep, 2010 1 commit
  11. 27 Sep, 2010 2 commits
  12. 12 Sep, 2010 1 commit
  13. 10 Sep, 2010 1 commit
  14. 08 Sep, 2010 1 commit
    • Johannes Sixt's avatar
      fast-export: ensure that a renamed file is printed after all references · 4ce6fb80
      Johannes Sixt authored
      t9350 sets up a commit where a file is both copied and renamed. The output
      of fast-export for this commit should look like this:
        author ...
        committer ...
        from :19
        C "file2" "file4"
        R "file2" "file5"
      The order of the two modification lines is derived from the result that
      the diff machinery produces.
      060df624 (fast-export: Fix output order of D/F changes) inserted a qsort
      call that modifies the order of the diff result. Unfortunately, qsort need
      not be stable. Therefore, it is possible that the 'R' line appears before
      the 'C' line and the resulting fast-import stream is incorrect.
      Fix it by forcing that the rename entry is printed after all other
      modification lines with the same file name.
      Signed-off-by: default avatarJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  15. 07 Sep, 2010 1 commit
  16. 06 Sep, 2010 1 commit
  17. 03 Sep, 2010 4 commits
  18. 31 Aug, 2010 1 commit
  19. 30 Aug, 2010 2 commits
  20. 26 Aug, 2010 1 commit
  21. 25 Aug, 2010 3 commits
    • Brandon Casey's avatar
      builtin/fetch.c: ignore merge config when not fetching from branch's remote · 3ee1757b
      Brandon Casey authored
      When 'git fetch' is supplied a single argument, it tries to match it
      against a configured remote and then fetch the refs specified by the
      named remote's fetchspec.  Additionally, or alternatively, if the current
      branch has a merge ref configured, and if the name of the remote supplied
      to fetch matches the one in the branch's configuration, then git also adds
      the merge ref to the list of refs to update.
      If the argument to fetch does not specify a named remote, or if the name
      supplied does not match the remote configured for the current branch, then
      the current branch's merge configuration should not be considered.
      git currently mishandles the case when the argument to fetch specifies a
      GIT URL(i.e. not a named remote) and the current branch has a configured
      merge ref.  In this case, fetch should ignore the branch's merge ref and
      attempt to fetch from the remote repository's HEAD branch.  But, since
      fetch only checks _whether_ the current branch has a merge ref configured,
      and does _not_ check whether the branch's configured remote matches the
      command line argument (until later), it will mistakenly enter the wrong
      branch of an 'if' statement and will not fall back to fetch the HEAD branch.
      The fetch ends up doing nothing and returns with a successful zero status.
      Fix this by comparing the remote repository's name to the branch's remote
      name, in addition to whether it has a configured merge ref, sooner, so that
      fetch can correctly decide whether the branch's configuration is interesting
      or not, and fall back to fetching from the remote's HEAD branch when
      This fixes the test in t5510.
      Signed-off-by: default avatarBrandon Casey <casey@nrlssc.navy.mil>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • Johannes Schindelin's avatar
      checkout: respect diff.ignoreSubmodules setting · 175f6e59
      Johannes Schindelin authored
      When 'git checkout' reports uncommitted changes, it also does so for
      The default mode is now to look really hard into submodules, not only
      for different commits, but also for modified files. Since this can be
      pretty expensive when there are a lot (and large) submodules, there is
      the diff.ignoreSubmodules option.
      Let's respect that setting when 'git checkout' reports the uncommitted
      changes, since it does nothing else than a 'git diff --name-status'.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • Linus Torvalds's avatar
      Fix 'git log' early pager startup error case · 1fda91b5
      Linus Torvalds authored
      We start the pager too early for several git commands, which results in
      the errors sometimes going to the pager rather than show up as errors.
      This is often hidden by the fact that we pass in '-X' to less by default,
      which causes 'less' to exit for small output, but if you do
        export LESS=-S
      you can then clearly see the problem by doing
        git log --prretty
      which shows the error message ("fatal: unrecognized argument: --prretty")
      being sent to the pager.
      This happens for pretty much all git commands that use USE_PAGER, and then
      check arguments separately. But "git diff" does it too early too (even
      though it does an explicit setup_pager() call)
      This only fixes it for the trivial "git log" family case.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  22. 24 Aug, 2010 1 commit
  23. 22 Aug, 2010 4 commits
  24. 20 Aug, 2010 1 commit
  25. 18 Aug, 2010 1 commit
    • Jonathan Nieder's avatar
      fmt-merge-msg -m to override merge title · 2102440c
      Jonathan Nieder authored
      Since v1.7.1.1~23^2 (merge: --log appends shortlog to message if
      specified, 2010-05-11), the fmt-merge-msg backend supports custom text
      to override the merge title "Merge <foo> into <bar>".
      Expose this functionality for scripted callers.  Example:
       git fmt-merge-msg --log -m \
      	"$(printf '%s\n' \
      	    "Merge branch 'api-cleanup' into feature" \
      	    '' \
      	    'This is to use a few functions refactored for this purpose.'
      	)" <.git/FETCH_HEAD
      Cc: Tay Ray Chuan <rctay89@gmail.com>
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>