Builtin git-read-tree.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>maint
							parent
							
								
									56d1398ad3
								
							
						
					
					
						commit
						d147e501f3
					
				
							
								
								
									
										6
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										6
									
								
								Makefile
								
								
								
								
							|  | @ -157,7 +157,7 @@ PROGRAMS = \ | ||||||
| 	git-hash-object$X git-index-pack$X git-local-fetch$X \ | 	git-hash-object$X git-index-pack$X git-local-fetch$X \ | ||||||
| 	git-mailinfo$X git-merge-base$X \ | 	git-mailinfo$X git-merge-base$X \ | ||||||
| 	git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \ | 	git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \ | ||||||
| 	git-peek-remote$X git-prune-packed$X git-read-tree$X \ | 	git-peek-remote$X git-prune-packed$X \ | ||||||
| 	git-receive-pack$X git-rev-parse$X \ | 	git-receive-pack$X git-rev-parse$X \ | ||||||
| 	git-send-pack$X git-show-branch$X git-shell$X \ | 	git-send-pack$X git-show-branch$X git-shell$X \ | ||||||
| 	git-show-index$X git-ssh-fetch$X \ | 	git-show-index$X git-ssh-fetch$X \ | ||||||
|  | @ -172,7 +172,7 @@ BUILT_INS = git-log$X git-whatchanged$X git-show$X \ | ||||||
| 	git-count-objects$X git-diff$X git-push$X \ | 	git-count-objects$X git-diff$X git-push$X \ | ||||||
| 	git-grep$X git-rev-list$X git-check-ref-format$X \ | 	git-grep$X git-rev-list$X git-check-ref-format$X \ | ||||||
| 	git-init-db$X git-ls-files$X git-ls-tree$X \ | 	git-init-db$X git-ls-files$X git-ls-tree$X \ | ||||||
| 	git-tar-tree$X | 	git-tar-tree$X git-read-tree$X | ||||||
|  |  | ||||||
| # what 'all' will build and 'install' will install, in gitexecdir | # what 'all' will build and 'install' will install, in gitexecdir | ||||||
| ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) | ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) | ||||||
|  | @ -222,7 +222,7 @@ BUILTIN_OBJS = \ | ||||||
| 	builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \ | 	builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \ | ||||||
| 	builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \ | 	builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \ | ||||||
| 	builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \ | 	builtin-init-db.o builtin-ls-files.o builtin-ls-tree.o \ | ||||||
|         builtin-tar-tree.o |         builtin-tar-tree.o builtin-read-tree.o | ||||||
|  |  | ||||||
| GITLIBS = $(LIB_FILE) $(XDIFF_LIB) | GITLIBS = $(LIB_FILE) $(XDIFF_LIB) | ||||||
| LIBS = $(GITLIBS) -lz | LIBS = $(GITLIBS) -lz | ||||||
|  |  | ||||||
|  | @ -11,6 +11,7 @@ | ||||||
| #include "tree.h" | #include "tree.h" | ||||||
| #include <sys/time.h> | #include <sys/time.h> | ||||||
| #include <signal.h> | #include <signal.h> | ||||||
|  | #include "builtin.h" | ||||||
|  |  | ||||||
| static int reset = 0; | static int reset = 0; | ||||||
| static int merge = 0; | static int merge = 0; | ||||||
|  | @ -763,7 +764,7 @@ static const char read_tree_usage[] = "git-read-tree (<sha> | -m [--aggressive] | ||||||
|  |  | ||||||
| static struct cache_file cache_file; | static struct cache_file cache_file; | ||||||
|  |  | ||||||
| int main(int argc, char **argv) | int cmd_read_tree(int argc, const char **argv, char **envp) | ||||||
| { | { | ||||||
| 	int i, newfd, stage = 0; | 	int i, newfd, stage = 0; | ||||||
| 	unsigned char sha1[20]; | 	unsigned char sha1[20]; | ||||||
|  | @ -30,5 +30,6 @@ extern int cmd_init_db(int argc, const char **argv, char **envp); | ||||||
| extern int cmd_ls_files(int argc, const char **argv, char **envp); | extern int cmd_ls_files(int argc, const char **argv, char **envp); | ||||||
| extern int cmd_ls_tree(int argc, const char **argv, char **envp); | extern int cmd_ls_tree(int argc, const char **argv, char **envp); | ||||||
| extern int cmd_tar_tree(int argc, const char **argv, char **envp); | extern int cmd_tar_tree(int argc, const char **argv, char **envp); | ||||||
|  | extern int cmd_read_tree(int argc, const char **argv, char **envp); | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								git.c
								
								
								
								
							
							
						
						
									
										3
									
								
								git.c
								
								
								
								
							|  | @ -55,7 +55,8 @@ static void handle_internal_command(int argc, const char **argv, char **envp) | ||||||
| 		{ "check-ref-format", cmd_check_ref_format }, | 		{ "check-ref-format", cmd_check_ref_format }, | ||||||
| 		{ "ls-files", cmd_ls_files }, | 		{ "ls-files", cmd_ls_files }, | ||||||
| 		{ "ls-tree", cmd_ls_tree }, | 		{ "ls-tree", cmd_ls_tree }, | ||||||
| 		{ "tar-tree", cmd_tar_tree } | 		{ "tar-tree", cmd_tar_tree }, | ||||||
|  | 		{ "read-tree", cmd_read_tree } | ||||||
| 	}; | 	}; | ||||||
| 	int i; | 	int i; | ||||||
|  |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Peter Eriksen
						Peter Eriksen