summaryrefslogtreecommitdiff
path: root/builtin-blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-05 05:49:05 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-05 22:55:11 (GMT)
commit005f85d9ae95c44d8c6ecf61364642fbcaf49dd2 (patch)
tree7e5fc9be65d54b8f55d970493cc45b935a341586 /builtin-blame.c
parentd66b37bb19ff7a347ba4ccbcdc11b00772518b57 (diff)
downloadgit-005f85d9ae95c44d8c6ecf61364642fbcaf49dd2.zip
git-005f85d9ae95c44d8c6ecf61364642fbcaf49dd2.tar.gz
git-005f85d9ae95c44d8c6ecf61364642fbcaf49dd2.tar.bz2
Use pretend_sha1_file() in git-blame and git-merge-recursive.
git-merge-recursive wants an null tree as the fake merge base while producing the merge result tree. The null tree does not have to be written out in the object store as it won't be part of the result, and it is a prime example for using the new pretend_sha1_file() function. git-blame needs to register an arbitrary data to in-core index while annotating a working tree file (or standard input), but git-blame is a read-only application and the user of it could even lack the privilege to write into the object store; it is another good example for pretend_sha1_file(). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-blame.c')
-rw-r--r--builtin-blame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 897323a..fb30c49 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -2005,7 +2005,7 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con
buf[fin_size] = 0;
origin->file.ptr = buf;
origin->file.size = fin_size;
- write_sha1_file(buf, fin_size, blob_type, origin->blob_sha1);
+ pretend_sha1_file(buf, fin_size, blob_type, origin->blob_sha1);
commit->util = origin;
/*