1. 31 8月, 2008 1 次提交
    • J
      diff: vary default prefix depending on what are compared · a5a818ee
      Junio C Hamano 提交于
      With a new configuration "diff.mnemonicprefix", "git diff" shows the
      differences between various combinations of preimage and postimage trees
      with prefixes different from the standard "a/" and "b/".  Hopefully this
      will make the distinction stand out for some people.
      
          "git diff" compares the (i)ndex and the (w)ork tree;
          "git diff HEAD" compares a (c)ommit and the (w)ork tree;
          "git diff --cached" compares a (c)ommit and the (i)ndex;
          "git-diff HEAD:file1 file2" compares an (o)bject and a (w)ork tree entity;
          "git diff --no-index a b" compares two non-git things (1) and (2).
      
      Because these mnemonics now have meanings, they are swapped when reverse
      diff is in effect and this feature is enabled.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a5a818ee
  2. 22 7月, 2008 1 次提交
    • J
      Rename path_list to string_list · c455c87c
      Johannes Schindelin 提交于
      The name path_list was correct for the first usage of that data structure,
      but it really is a general-purpose string list.
      
      $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list)
      $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list)
      $ git mv path-list.h string-list.h
      $ git mv path-list.c string-list.c
      $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path)
      $ perl -i -pe 's/path/string/g' string-list.[ch]
      $ git mv Documentation/technical/api-path-list.txt \
      	Documentation/technical/api-string-list.txt
      $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths)
      
      ... and then fix all users of string-list to access the member "string"
      instead of "path".
      
      Documentation/technical/api-string-list.txt needed some rewrapping, too.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c455c87c
  3. 27 5月, 2008 2 次提交
  4. 24 5月, 2008 1 次提交
    • J
      "git diff": do not ignore index without --no-index · 0569e9b8
      Junio C Hamano 提交于
      Even if "foo" and/or "bar" does not exist in index, "git diff foo bar"
      should not change behaviour drastically from "git diff foo bar baz" or
      "git diff foo".  A feature that "sometimes works and is handy" is an
      unreliable cute hack.
      
      "git diff foo bar" outside a git repository continues to work as a more
      colourful alternative to "diff -u" as before.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0569e9b8