-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic merge of /home/torvalds/junkio/.git/
- Loading branch information
Showing
7 changed files
with
114 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* GIT - The information manager from hell | ||
* | ||
* Copyright (C) Linus Torvalds, 2005 | ||
*/ | ||
#include "cache.h" | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
int i; | ||
|
||
for (i = 1 ; i < argc; i++) { | ||
char *path = argv[i]; | ||
int fd; | ||
struct stat st; | ||
unsigned char sha1[20]; | ||
fd = open(path, O_RDONLY); | ||
if (fd < 0 || | ||
fstat(fd, &st) < 0 || | ||
index_fd(sha1, fd, &st) < 0) | ||
die("Unable to add blob %s to database", path); | ||
printf("%s\n", sha1_to_hex(sha1)); | ||
} | ||
return 0; | ||
} |