]> git.neil.brown.name Git - git.git/commitdiff
Merge branch 'jk/diff-blob' into maint
authorJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 22:29:28 +0000 (15:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 22:29:28 +0000 (15:29 -0700)
The result from "git diff" that compares two blobs, e.g. "git diff
$commit1:$path $commit2:$path", used to be shown with the full
object name as given on the command line, but it is more natural to
use the $path in the output and use it to look up .gitattributes.

* jk/diff-blob:
  diff: use blob path for blob/file diffs
  diff: use pending "path" if it is available
  diff: use the word "path" instead of "name" for blobs
  diff: pass whole pending entry in blobinfo
  handle_revision_arg: record paths for pending objects
  handle_revision_arg: record modes for "a..b" endpoints
  t4063: add tests of direct blob diffs
  get_sha1_with_context: dynamically allocate oc->path
  get_sha1_with_context: always initialize oc->symlink_path
  sha1_name: consistently refer to object_context as "oc"
  handle_revision_arg: add handle_dotdot() helper
  handle_revision_arg: hoist ".." check out of range parsing
  handle_revision_arg: stop using "dotdot" as a generic pointer
  handle_revision_arg: simplify commit reference lookups
  handle_revision_arg: reset "dotdot" consistently

1  2 
builtin/cat-file.c
builtin/log.c
revision.c
t/t4202-log.sh
tree-walk.c

index 9af863e7915d21aee7af3cb4d01ebbad2efbcb59,421709517c765d83fa4a4abf00ff3b8a9dd79f64..73c81f0cb1ae34169667adc7ee7fc246468e08a4
@@@ -165,7 -166,7 +166,8 @@@ static int cat_one_file(int opt, const 
                die("git cat-file %s: bad file", obj_name);
  
        write_or_die(1, buf, size);
 +      free(buf);
+       free(obj_context.path);
        return 0;
  }
  
diff --cc builtin/log.c
Simple merge
diff --cc revision.c
Simple merge
diff --cc t/t4202-log.sh
Simple merge
diff --cc tree-walk.c
Simple merge