1. 24 12月, 2008 1 次提交
  2. 23 12月, 2008 1 次提交
  3. 21 12月, 2008 4 次提交
    • J
      Make sure lockfiles are unlocked when dying on SIGPIPE · 0693f9dd
      Junio C Hamano 提交于
      We cleaned up lockfiles upon receiving the usual suspects HUP, TERM, QUIT
      but a wicked user could kill us of asphyxiation by piping our output to a
      pipe that does not read.  Protect ourselves by catching SIGPIPE and clean
      up the lockfiles as well in such a case.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0693f9dd
    • M
      git-sh-setup: Fix scripts whose PWD is a symlink into a git work-dir · 08fc0608
      Marcel M. Cary 提交于
      I want directories of my working tree to be linked to from various
      paths on my filesystem where third-party components expect them, both
      in development and production environments.  A build system's install
      step could solve this, but I develop scripts and web pages that don't
      need to be built.  Git's submodule system could solve this, but we
      tend to develop, branch, and test those directories all in unison, so
      one big repository feels more natural.  We prefer to edit and commit
      on the symlinked paths, not the canonical ones, and in that setting,
      "git pull" fails to find the top-level directory of the repository
      while other commands work fine.
      
      "git pull" fails because POSIX shells have a notion of current working
      directory that is different from getcwd().  The shell stores this path
      in PWD.  As a result, "cd ../" can be interpreted differently in a
      shell script than chdir("../") in a C program.  The shell interprets
      "../" by essentially stripping the last textual path component from
      PWD, whereas C chdir() follows the ".." link in the current directory
      on the filesystem.  When PWD is a symlink, these are different
      destinations.  As a result, Git's C commands find the correct
      top-level working tree, and shell scripts do not.
      
      Changes:
      
      * When interpreting a relative upward (../) path in cd_to_toplevel,
        prepend the cwd without symlinks, given by /bin/pwd
      * Add tests for cd_to_toplevel and "git pull" in a symlinked
        directory that failed before this fix, plus contrasting scenarios
        that already worked
      Signed-off-by: NMarcel M. Cary <marcel@oak.homeunix.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      08fc0608
    • J
      rebase -i -p: Fix --continue after a merge could not be redone · f5b49ea6
      Johannes Sixt 提交于
      When a merge that has a conflict was rebased, then rebase stopped to let
      the user resolve the conflicts. However, thereafter --continue failed
      because the author-script was not saved. (This is rebase -i's way to
      preserve a commit's authorship.) This fixes it by doing taking the same
      failure route after a merge that is also taken after a normal cherry-pick.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f5b49ea6
    • J
      Show a failure of rebase -p if the merge had a conflict · 03c48293
      Johannes Sixt 提交于
      This extends t3409-rebase-preserve-merges by a case where the merge that
      is rebased has a conflict. Therefore, the rebase stops and expects that
      the user resolves the conflict. However, currently rebase --continue
      fails because .git/rebase-merge/author-script is missing.
      
      The test script had allocated two identical clones, but only one of them
      (clone2) was used. Now we use both as indicated in the comment. Also,
      two instances of && was missing in the setup part.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      03c48293
  4. 20 12月, 2008 2 次提交
  5. 19 12月, 2008 1 次提交
  6. 15 12月, 2008 2 次提交
  7. 13 12月, 2008 1 次提交
  8. 11 12月, 2008 1 次提交
  9. 10 12月, 2008 2 次提交
    • J
      diff: respect textconv in rewrite diffs · 3aa1f7ca
      Jeff King 提交于
      Currently we just skip rewrite diffs for binary files; this
      patch makes an exception for files which will be textconv'd,
      and actually performs the textconv before generating the
      diff.
      
      Conceptually, rewrite diffs should be in the exact same
      format as the a non-rewrite diff, except that we refuse to
      share any context. Thus it makes very little sense for "git
      diff" to show a textconv'd diff, but for "git diff -B" to
      show "Binary files differ".
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3aa1f7ca
    • J
      diff: fix handling of binary rewrite diffs · 0c01857d
      Jeff King 提交于
      The current emit_rewrite_diff code always writes a text patch without
      checking whether the content is binary. This means that if you end up with
      a rewrite diff for a binary file, you get lots of raw binary goo in your
      patch.
      
      Instead, if we have binary files, then let's just skip emit_rewrite_diff
      altogether. We will already have shown the "dissimilarity index" line, so
      it is really about the diff contents. If binary diffs are turned off, the
      "Binary files a/file and b/file differ" message should be the same in
      either case. If we do have binary patches turned on, there isn't much
      point in making a less-efficient binary patch that does a total rewrite;
      no human is going to read it, and since binary patches don't apply with
      any fuzz anyway, the result of application should be the same.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0c01857d
  10. 09 12月, 2008 2 次提交
    • D
      git-svn: Make following parents atomic · 553589f7
      Deskin Miller 提交于
      find_parent_branch generates branch@rev type branches when one has to
      look back through SVN history to properly get the history for a branch
      copied from somewhere not already being tracked by git-svn.  If in the
      process of fetching this history, git-svn is interrupted, then when one
      fetches again, it will use whatever was last fetched as the parent
      commit and fail to fetch any more history which it didn't get to before
      being terminated.  This is especially troubling in that different
      git-svn copies of the same SVN repository can end up with different
      commit sha1s, incorrectly showing the history as divergent and
      precluding easy collaboration using git push and fetch.
      
      To fix this, when we initialise the Git::SVN object $gs to search for
      and perhaps fetch history, we check if there are any commits in SVN in
      the range between the current revision $gs is at, and the top revision
      for which we were asked to fill history.  If there are commits we're
      missing in that range, we continue the fetch from the current revision
      to the top, properly getting all history before using it as the parent
      for the branch we're trying to create.
      Signed-off-by: NDeskin Miller <deskinm@umich.edu>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      553589f7
    • J
      gitweb: Fix bug in insert_file() subroutine · 4586864a
      Jakub Narebski 提交于
      In insert_file() subroutine (which is used to insert HTML fragments as
      custom header, footer, hometext (for projects list view), and per
      project README.html (for summary view)) we used:
      
           map(to_utf8, <$fd>);
      
      This doesn't work, and other form has to be used:
      
           map { to_utf8($_) } <$fd>;
      
      Now with test for t9600 added, for $GIT_DIR/README.html.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4586864a
  11. 08 12月, 2008 1 次提交
  12. 06 12月, 2008 1 次提交
  13. 05 12月, 2008 1 次提交
  14. 03 12月, 2008 3 次提交
  15. 01 12月, 2008 2 次提交
  16. 29 11月, 2008 1 次提交
    • J
      git add --intent-to-add: fix removal of cached emptiness · 388b2acd
      Junio C Hamano 提交于
      This uses the extended index flag mechanism introduced earlier to mark
      the entries added to the index via "git add -N" with CE_INTENT_TO_ADD.
      
      The logic to detect an "intent to add" entry for the purpose of allowing
      "git rm --cached $path" is tightened to check not just for a staged empty
      blob, but with the CE_INTENT_TO_ADD bit.  This protects an empty blob that
      was explicitly added and then modified in the work tree from being dropped
      with this sequence:
      
      	$ >empty
      	$ git add empty
      	$ echo "non empty" >empty
      	$ git rm --cached empty
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      388b2acd
  17. 27 11月, 2008 2 次提交
  18. 24 11月, 2008 3 次提交
  19. 15 11月, 2008 2 次提交
  20. 14 11月, 2008 2 次提交
    • D
      git-svn: proper detection of bare repositories · fe4003f6
      Deskin Miller 提交于
      When in a bare repository (or .git, for that matter), git-svn would fail
      to initialise properly, since git rev-parse --show-cdup would not output
      anything.  However, git rev-parse --show-cdup actually returns an error
      code if it's really not in a git directory.
      
      Fix the issue by checking for an explicit error from git rev-parse, and
      setting $git_dir appropriately if instead it just does not output.
      Signed-off-by: NDeskin Miller <deskinm@umich.edu>
      Acked-by: NEric Wong <normalperson@yhbt.net>
      fe4003f6
    • E
      git-svn: respect i18n.commitencoding config · 16fc08e2
      Eric Wong 提交于
      SVN itself always stores log messages in the repository as
      UTF-8.  git always stores/retrieves everything as raw binary
      data with no transformations whatsoever.
      
      To interact with SVN, we need to encode log messages as UTF-8
      before sending them to SVN, as SVN cannot do it for us.  When
      retrieving log messages from SVN, we also need to (attempt to)
      reencode the UTF-8 log message back to the user-specified commit
      encoding.
      
      Note, handling i18n.logoutputencoding for "git svn log" also
      needs to be done in a future change.
      
      Also, this change only deals with the encoding of commit
      messages and nothing else (path names, blob content, ...).
      
      In-Reply-To: <8b168cfb0810282014r789ac01dnec51824de1078f0@mail.gmail.com>
      James North <tocapicha@gmail.com> wrote:
      > Hi,
      >
      > I'm using git-svn on a system with ISO-8859-1 encoding. The problem is
      > when I try to use "git svn dcommit" to send changes to a remote svn
      > (also ISO-8859-1).
      >
      > Seems like git-svn is sending commit messages with utf-8 (just a
      > guessing...) and they look bad on the remote svn log. E.g. "Ca?\241a
      > de cami?\243n"
      >
      > I have tried using i18n.commitencoding=ISO-8859-1 as suggested by the
      > warning when doing "git svn dcommit" but messages still are sent with
      > wrong encoding.
      Signed-off-by: NEric Wong <normalperson@yhbt.net>
      16fc08e2
  21. 13 11月, 2008 5 次提交