aboutsummaryrefslogtreecommitdiff
path: root/cat-file.c
Commit message (Collapse)AuthorAge
* Pretty-print tagger dates.Junio C Hamano2006-03-01
| | | | | | | | | | | | | | | | | We can show commit objects with human readable dates using various --pretty options, but there was no way to do so with tags. This introduces two such ways: $ git-cat-file -p v1.2.3 shows the tag object with tagger dates in human readable format. $ git-verify-tag --verbose v1.2.3 uses it to show the contents of the tag object as well as doing GPG verification. Signed-off-by: Junio C Hamano <junkio@cox.net>
* xread/xwrite: do not worry about EINTR at calling sites.Junio C Hamano2005-12-19
| | | | | | | | | | We had errno==EINTR check after read(2)/write(2) sprinkled all over the places, always doing continue. Consolidate them into xread()/xwrite() wrapper routines. Credits for suggestion goes to HPA -- bugs are mine. Signed-off-by: Junio C Hamano <junkio@cox.net>
* A few more options for git-cat-fileH. Peter Anvin2005-12-03
| | | | | | | | | | | | | This adds '-e' option to git-cat-file, to test for the existence of the object. This also cleans up the option-parsing in git-cat-file slightly. [jc: HPA version had -n option which did rev-parse --verify; the real value of this patch is the option parsing cleanup.] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cat-file: make it work in a subdirectory.Junio C Hamano2005-08-30
| | | | | Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 73244994ee4abd6e436e8a1d597dd917271d77a9 commit)
* [PATCH] cat-file: be consistent in usage string and documentation.Junio C Hamano2005-07-13
| | | | | | | | | | Now that we have something called tag object, and a notion of "tags" stored in .git/refs/tags/ directory, the word "tagname" has become misleading in the usage string. The documentation already calls that <type>. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Avoid unnecessarily inflating and interpreting deltaJunio C Hamano2005-06-30
| | | | | | | | | | This teaches packed_delta_info() that it only needs to look at the type of the base object to figure out both type and size of a deltified object. This saves quite a many calls to inflate() when dealing with a deep delta chain. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] git-cat-file: '-s' to find out object size.Junio C Hamano2005-06-28
| | | | | | | | | | We use sha1_object_info() now, and getting size is also trivial. I admit that this is more of "because we can" not "because I see immediate need for it", though. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] git-cat-file: use sha1_object_info() on '-t'.Junio C Hamano2005-06-28
| | | | | | | | When trying to find out the type of the object, there is no need to uncompress the whole object. Just use sha1_object_info(). Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] git-export complains about mising cat-fileAlexey Nezhdanov2005-05-01
| | | | | | | Fixes bits leaved during name change. Signed-off-by: Alexey Nezhdanov <snake@penza-gsm.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Fix missing '\n' at end of git-cat-file -t output.Linus Torvalds2005-05-01
|
* Make "cat-file" use "read_object_with_reference()"Linus Torvalds2005-05-01
| | | | | | | | | | | | | | | | | This means that you can take a tag object, and do git-cat-file commit tagname and it will cat the commit that the tag points to. Or you can cat the tree that a commit (or tag) points to. It still gives the old behaviour if you just give it the original type, ie if you want to see the tag object itself, you'd do git-cat-file -t tagname and you'd get the expected tag output.
* Add "get_sha1()" helper function.Linus Torvalds2005-05-01
| | | | | | | | | | | | This allows the programs to use various simplified versions of the SHA1 names, eg just say "HEAD" for the SHA1 pointed to by the .git/HEAD file etc. For example, this commit has been done with git-commit-tree $(git-write-tree) -p HEAD instead of the traditional "$(cat .git/HEAD)" syntax.
* [PATCH] Consolidate the error handlingPetr Baudis2005-04-13
| | | | | | | Now there is error() for "library" errors and die() for fatal "application" errors. usage() is now used strictly only for usage errors. Signed-off-by: Petr Baudis <pasky@ucw.cz>
* Use "-Wall -O2" for the compiler to get more warnings.Linus Torvalds2005-04-08
| | | | | | | And fix up the warnings that it pointed out. Let's keep the tree clean from early on. Not that the code is very beautiful anyway ;)
* Make "cat-file" output the file contents to stdout.Linus Torvalds2005-04-08
| | | | | New syntax: "cat-file -t <sha1>" shows the tag, while "cat-file <tag> <sha1>" outputs the file contents after checking that the supplied tag matches.
* Add copyright notices.Linus Torvalds2005-04-07
| | | | | | The tool interface sucks (especially "committing" information, which is just me doing everything by hand from the command line), but I think this is in theory actually a viable way of describing the world. So copyright it.
* Initial revision of "git", the information manager from hellLinus Torvalds2005-04-07