aboutsummaryrefslogtreecommitdiff
path: root/hash-object.c
Commit message (Collapse)AuthorAge
* Merge branch 'js/config-cb'v1.5.6-rc0Junio C Hamano2008-05-25
|\ | | | | | | | | | | | | | | | | | | * js/config-cb: Provide git_config with a callback-data parameter Conflicts: builtin-add.c builtin-cat-file.c
| * Provide git_config with a callback-data parameterJohannes Schindelin2008-05-14
| | | | | | | | | | | | | | | | | | | | | | | | git_config() only had a function parameter, but no callback data parameter. This assumes that all callback functions only modify global variables. With this patch, every callback gets a void * parameter, and it is hoped that this will help the libification effort. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-hash-object: Add --stdin-paths optionAdam Roben2008-05-23
|/ | | | | | | This allows multiple paths to be specified on stdin. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* hash-object: cleanup handling of command line optionsGerrit Pape2008-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | git hash-object used to process the --stdin command line argument before reading subsequent arguments. This caused 'git hash-object --stdin -w' to fail to actually write the object into the database, while '-w --stdin' properly did. Now git hash-object first reads all arguments, and then processes them. This regresses one insane use case. git hash-object used to allow multiple --stdin arguments on the command line: $ git hash-object --stdin --stdin foo ^D bar ^D Now git hash-object errors out if --stdin is given more than once. Reported by Josh Triplett through http://bugs.debian.org/464432 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-hash-object should honor config variablesNicolas Pitre2007-11-11
| | | | | | | ... such as core.compression. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* index_fd(): pass optional path parameter as hint for blob conversionJunio C Hamano2007-02-28
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* index_fd(): use enum object_type instead of type name string.Junio C Hamano2007-02-28
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Replace some calls to die(usage_str) with usage(usage_str).Ramsay Allan Jones2006-08-03
| | | | | | | | | The only change in behaviour should be having a "usage: " prefix on the output string rather than "fatal: ", and an exit code of 129 rather than 128. Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use blob_, commit_, tag_, and tree_type throughout.Peter Eriksen2006-04-04
| | | | | | | | | This replaces occurences of "blob", "commit", "tag", and "tree", where they're really used as type specifiers, which we already have defined global constants for. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Allow saving an object from a pipeDaniel Barkalow2005-12-10
| | | | | | | | In order to support getting data into git with scripts, this adds a --stdin option to git-hash-object, which will make it read from stdin. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* hash-object: -- and --helpJunio C Hamano2005-12-05
| | | | | | | | | | It was cumbersome to feed hash-object the file '-t' (you could have said "./-t", though). Teach it '--' that terminates the option list, like everybody else. There is no way to extract usage string from the command either, so teach it "--help" as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* hash-object.c: type-fix to squelch compiler warnings.Junio C Hamano2005-11-28
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* hash-object: work within subdirectory.Junio C Hamano2005-11-28
| | | | | | | When -w is given, it needs to find out where the .git directory is, so run the setup_git_directory() when we see a -w. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Unify usage strings declarationPetr Baudis2005-07-29
| | | | | | | | | All usage strings are now declared as static const char []. This is carried over from my old git-pb branch. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Expose object ID computation functions.Bryan Larsen2005-07-08
This patch makes the first half of write_sha1_file() and index_fd() externally visible, to allow callers to compute the object ID without actually storing it in the object database. [JC demangled the whitespaces himself because he liked the patch so much, and reworked the interface to index_fd() slightly, taking suggestion from Linus and of his own.] Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>