1. 26 4月, 2016 1 次提交
  2. 29 1月, 2016 1 次提交
    • J
      mingw: work around pwd issues in the tests · fd318a94
      Johannes Schindelin 提交于
      In Git for Windows' SDK, the tests are run using a Bash that relies on
      the POSIX emulation layer MSYS2 (itself a friendly fork of Cygwin). As
      such, paths in tests can be POSIX paths. As soon as those paths are
      passed to git.exe (which does *not* use the POSIX emulation layer),
      those paths are converted into Windows paths, though. This happens
      for command-line parameters, but not when reading, say, config variables.
      
      To help with that, the `pwd` command is overridden to return the Windows
      path of the current working directory when testing Git on Windows.
      
      However, when talking to anything using the POSIX emulation layer, it is
      really much better to use POSIX paths because Windows paths contain a
      colon after the drive letter that will easily be mistaken for the common
      separator in path lists.
      
      So let's just use the $PWD variable when the POSIX path is needed.
      
      This lets t7800-difftool.sh, t9400-git-cvsserver-server.sh,
      t9402-git-cvsserver-refs.sh and t9401-git-cvsserver-crlf.sh pass in Git
      for Windows' SDK.
      
      Note: the cvsserver tests require not only the `cvs` package (install
      it into Git for Windows' SDK via `pacman -S cvs`) but also the Perl
      SQLite bindings (install them into Git for Windows' SDK via
      `cpan DBD::SQLite`).
      
      This patch is based on earlier work by 마누엘 and Karsten Blees.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fd318a94
  3. 30 10月, 2015 1 次提交
    • D
      difftool: ignore symbolic links in use_wt_file · cfe2d4be
      David Aguilar 提交于
      The caller is preparing a narrowed-down copy of the working tree and
      this function is asked if the path should be included in that copy.
      If we say yes, the path from the working tree will be either symlinked
      or copied into the narrowed-down copy.
      
      For any path that is a symbolic link, the caller later fixes up the
      narrowed-down copy by unlinking the path and replacing it with a
      regular file it writes out that mimics the way how "git diff"
      compares symbolic links.
      
      Let's answer "no, you do not want to copy/symlink the working tree
      file" for all symbolic links from this function, as we know the
      result will not be used because it will be overwritten anyway.
      
      Incidentally, this also stops the function from feeding a symbolic
      link in the working tree to hash-object, which is a wrong thing to
      do to begin with. The link may be pointing at a directory, or worse
      may be dangling (both would be noticed as an error).  Even if the
      link points at a regular file, hashing the contents of a file that
      is pointed at by the link is not correct (Git hashes the contents of
      the link itself, not the pointee).
      Signed-off-by: NDavid Aguilar <davvid@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cfe2d4be
  4. 09 9月, 2015 1 次提交
  5. 15 11月, 2014 1 次提交
  6. 29 10月, 2014 1 次提交
  7. 28 10月, 2014 1 次提交
  8. 22 4月, 2014 1 次提交
    • J
      run_external_diff: clean up error handling · 89294d14
      Jeff King 提交于
      When the external diff reports an error, we try to clean up
      and die. However, we can make this process a bit simpler:
      
        1. We do not need to bother freeing memory, since we are
           about to exit.  Nor do we need to clean up our
           tempfiles, since the atexit() handler will do it for
           us. So we can die as soon as we see the error.
      
        3. We can just call die() rather than fprintf/exit. This
           does technically change our exit code, but the exit
           code of "1" is not meaningful here. In fact, it is
           probably wrong, since "1" from diff usually means
           "completed successfully, but there were differences".
      
      And while we're there, we can mark the error message for
      translation, and drop the full stop at the end to make it
      more like our other messages.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      89294d14
  9. 06 3月, 2014 1 次提交
  10. 30 5月, 2013 1 次提交
    • K
      difftool --dir-diff: allow changing any clean working tree file · 32eaf1de
      Kenichi Saita 提交于
      The temporary directory prepared by "difftool --dir-diff" to
      show the result of a change can be modified by the user via
      the tree diff program, and we try hard not to lose changes
      to them after tree diff program returns to us.
      
      However, the set of files to be copied back is computed
      differently between --symlinks and --no-symlinks modes.  The
      former checks all paths that start out as identical to the
      working tree file, while the latter checks paths that
      already had a local modification in the working tree,
      allowing changes made in the tree diff program to paths that
      did not have any local change to be lost.
      Signed-off-by: NKenichi Saita <nitoyon@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      32eaf1de
  11. 18 5月, 2013 1 次提交
  12. 30 3月, 2013 5 次提交
    • J
      t7800: run --dir-diff tests with and without symlinks · e01afdb7
      John Keeping 提交于
      Currently the difftool --dir-diff tests may or may not use symlinks
      depending on the operating system on which they are run.  In one case
      this has caused a test failure to be noticed only on Windows when the
      test also fails on Linux when difftool is invoked with --no-symlinks.
      
      Rewrite these tests so that they do not depend on the environment but
      run explicitly with both --symlinks and --no-symlinks, protecting the
      --symlinks version with a SYMLINKS prerequisite.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e01afdb7
    • J
      t7800: fix tests when difftool uses --no-symlinks · 3caf5a93
      John Keeping 提交于
      When 'git difftool --dir-diff' is using --no-symlinks (either explicitly
      or implicitly because it's running on Windows), any working tree files
      that have been copied to the temporary directory are copied back after
      the difftool completes.
      
      Because an earlier test uses "git add .", the "output" file used by
      tests is tracked by Git and the following sequence occurs during some
      tests:
      
      1) the shell opens "output" to redirect the difftool output
      2) difftool copies the empty "output" to the temporary directory
      3) difftool runs "ls" which writes to "output"
      4) difftool copies the empty "output" file back over the output of the
         command
      5) the output file doesn't contain the expected output, causing the
         test to fail
      
      Instead of adding all changes, explicitly add only the files that the
      test is using, allowing later tests to write their result files into the
      working tree.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3caf5a93
    • J
      t7800: don't hide grep output · 472353a5
      John Keeping 提交于
      Remove the stdin_contains and stdin_doesnt_contain helper functions
      which add nothing but hide the output of grep, hurting debugging.
      Suggested-by: NJohannes Sixt <j.sixt@viscovery.net>
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      472353a5
    • J
      difftool: don't overwrite modified files · 67aa147a
      John Keeping 提交于
      After running the user's diff tool, git-difftool will copy any files
      that differ between the working tree and the temporary tree.  This is
      useful when the user edits the file in their diff tool but is wrong if
      they edit the working tree file while examining the diff.
      
      Instead of copying unconditionally when the files differ, create and
      index from the working tree files and only copy the temporary file back
      if it was modified and the working tree file was not.  If both files
      have been modified, print a warning and exit with an error.
      
      Note that we cannot use an existing index in git-difftool since those
      contain the modified files that need to be checked out but here we are
      looking at those files which are copied from the working tree and not
      checked out.  These are precisely the files which are not in the
      existing indices.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      67aa147a
    • J
      t7800: move '--symlinks' specific test to the end · bf341b90
      John Keeping 提交于
      This will group the tests more logically when we introduce a helper to
      run most --dir-diff tests with both --symlinks and --no-symlinks.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bf341b90
  13. 15 3月, 2013 1 次提交
    • J
      difftool --dir-diff: symlink all files matching the working tree · 02c56314
      John Keeping 提交于
      Some users like to edit files in their diff tool when using "git
      difftool --dir-diff --symlink" to compare against the working tree but
      difftool currently only created symlinks when a file contains unstaged
      changes.
      
      Change this behaviour so that symlinks are created whenever the
      right-hand side of the comparison has the same SHA1 as the file in the
      working tree.
      
      Note that textconv filters are handled in the same way as by git-diff
      and if a clean filter is not the inverse of its smudge filter we already
      get a null SHA1 from "diff --raw" and will symlink the file without
      going through the new hash-object based check.
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      02c56314
  14. 22 2月, 2013 1 次提交
    • D
      t7800: "defaults" is no longer a builtin tool name · f469e840
      David Aguilar 提交于
      073678b8 reworked the
      mergetools/ directory so that every file corresponds to a
      difftool-supported tool.  When this happened the "defaults"
      file went away as it was no longer needed by mergetool--lib.
      
      t7800 tests that configured commands can override builtins,
      but this test was not adjusted when the "defaults" file was
      removed because the test continued to pass.
      
      Adjust the test to use the everlasting "vimdiff" tool name
      instead of "defaults" so that it correctly tests against a tool
      that is known by mergetool--lib.
      Signed-off-by: NDavid Aguilar <davvid@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f469e840
  15. 21 2月, 2013 1 次提交
    • D
      t7800: modernize tests · e42360c4
      David Aguilar 提交于
      Eliminate a lot of redundant work by using test_config().
      Catch more return codes by more use of temporary files
      and test_cmp.
      
      The original tests relied upon restore_test_defaults()
      from the previous test to provide the next test with a sane
      environment.  Make the tests do their own setup so that they
      are not dependent on the success of the previous test.
      The end result is shorter tests and better test isolation.
      Signed-off-by: NDavid Aguilar <davvid@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e42360c4
  16. 20 2月, 2013 1 次提交
  17. 26 9月, 2012 1 次提交
  18. 24 4月, 2012 2 次提交
    • T
      difftool: print list of valid tools with '--tool-help' · bf73fc21
      Tim Henigan 提交于
      Since bc7a96a8 (mergetool--lib: Refactor tools into separate files,
      2011-08-18), it is possible to add a new diff tool by creating a simple
      script in the '$(git --exec-path)/mergetools' directory.  Updating the
      difftool help text is still a manual process, and the documentation can
      easily go out of sync.
      
      This commit teaches difftool the '--tool-help' option, which:
        - Reads the list of valid tools from 'mergetools/*'
        - Determines which of them are actually installed
        - Determines which are capable of diffing (i.e. not just a merge tool)
        - Prints the resulting list for the user
      Signed-off-by: NTim Henigan <tim.henigan@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bf73fc21
    • T
      difftool: teach difftool to handle directory diffs · 7e0abcec
      Tim Henigan 提交于
      When 'difftool' is called to compare a range of commits that modify
      more than one file, it opens a separate instance of the diff tool for
      each file that changed.
      
      The new '--dir-diff' option copies all the modified files to a temporary
      location and runs a directory diff on them in a single instance of the
      diff tool.
      Signed-off-by: NTim Henigan <tim.henigan@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7e0abcec
  19. 24 3月, 2012 1 次提交
  20. 20 3月, 2012 1 次提交
  21. 15 10月, 2011 1 次提交
  22. 11 10月, 2011 1 次提交
  23. 12 8月, 2011 1 次提交
  24. 07 10月, 2010 1 次提交
  25. 19 8月, 2010 1 次提交
  26. 26 6月, 2010 1 次提交
  27. 29 3月, 2010 1 次提交
  28. 23 1月, 2010 1 次提交
  29. 16 1月, 2010 4 次提交
  30. 10 1月, 2010 2 次提交
  31. 03 1月, 2010 1 次提交