summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-02 06:45:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-05-02 06:45:49 (GMT)
commit74400e7175e3dac994e75452973d78f6a42de65e (patch)
tree07f84ebdc715d72c409ce85ab0e8a74672b0a101 /cache.h
parent285bf834bea11981ae7c2242e9f087d3effe7de8 (diff)
downloadgit-74400e7175e3dac994e75452973d78f6a42de65e.zip
git-74400e7175e3dac994e75452973d78f6a42de65e.tar.gz
git-74400e7175e3dac994e75452973d78f6a42de65e.tar.bz2
Add git-write-blob.
A new command, git-write-blob, is introduced. This registers the contents of any file on the filesystem as a blob in the object database and reports its SHA1 to the standard output. To implement it, the patch promotes index_fd() from a static function in update-cache.c to extern and moves it to a library source, sha1_file.c. This command is used to update git-merge-one-file-script so that it does not smudge the work tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 940ced0..94f22c2 100644
--- a/cache.h
+++ b/cache.h
@@ -116,6 +116,7 @@ extern int remove_entry_at(int pos);
extern int remove_file_from_cache(char *path);
extern int same_name(struct cache_entry *a, struct cache_entry *b);
extern int cache_match_stat(struct cache_entry *ce, struct stat *st);
+extern int index_fd(unsigned char *sha1, int fd, struct stat *st);
#define MTIME_CHANGED 0x0001
#define CTIME_CHANGED 0x0002