summaryrefslogtreecommitdiff
path: root/mktag.c
AgeCommit message (Collapse)Author
2006-08-31Use xmalloc instead of mallocJonas Fonseca
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-04Fixup command names in some usage strings.Ramsay Allan Jones
Most usage strings, such as for command xxx, start with "git-xxx". This updates the rebels to conform to the general pattern. (The git wrapper is an exception to this, of course ...) Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-02Add NO_C99_FORMAT to support older compilers.Ramsay Allan Jones
The NO_C99_FORMAT macro allows compilers that lack support for the ll,hh,j,z,t size specifiers (eg. gcc 2.95.2) to adapt the code to avoid runtime errors in the formatted IO functions. Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-02New tests and en-passant modifications to mktag.Ramsay Allan Jones
These changes were originally part of the next patch, but have been split out since they were peripheral to the main purpose of that patch. - update comment describing the signature format to reflect the current code. - remove trailing \n in calls to error(), since a \n is already provided by error(). - remove redundant call to get_sha1_hex(). - call sha1_to_hex(sha1) to convert to ascii, rather than attempting to print the raw sha1. The new tests provide a regression suite to support the modifications to git-mktag in this and the next patch. Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-10Avoid C99 comments, use old-style C comments instead.Pavel Roskin
This doesn't make the code uglier or harder to read, yet it makes the code more portable. This also simplifies checking for other potential incompatibilities. "gcc -std=c89 -pedantic" can flag many incompatible constructs as warnings, but C99 comments will cause it to emit an error. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23add more informative error messages to git-mktagBjörn Engelmann
Signed-off-by: Björn Engelmann <BjEngelmann@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-23remove the artificial restriction tagsize < 8kbBjörn Engelmann
Signed-off-by: Björn Engelmann <BjEngelmann@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04Use blob_, commit_, tag_, and tree_type throughout.Peter Eriksen
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>
2005-12-20xread/xwrite: do not worry about EINTR at calling sites.Junio C Hamano
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>
2005-11-29Make the rest of commands work from a subdirectory.Junio C Hamano
These commands are converted to run from a subdirectory. commit-tree convert-objects merge-base merge-index mktag pack-objects pack-redundant prune-packed read-tree tar-tree unpack-file unpack-objects update-server-info write-tree Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-15[PATCH] Update tags to record who made themEric W. Biederman
And finally what all of this has been leading up to. The 2 line code change to record who made a tag, and the 8 line code change to check that we recorded the tag. Gosh the error checking is always so much bigger than the code :) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-29git-mktag: be more careful in reading the input.Linus Torvalds
Instead of always assuming it can be read with a single read() system call, loop around properly. Pointed out by Pasky, but I ended up implementing it differently from his suggested patch.
2005-05-20[PATCH] delta readNicolas Pitre
This makes the core code aware of delta objects and undeltafy them as needed. The convention is to use read_sha1_file() to have undeltafication done automatically (most users do that already so this is transparent). If the delta object itself has to be accessed then it must be done through map_sha1_file() and unpack_sha1_file(). In that context mktag.c has been switched to read_sha1_file() as there is no reason to do the full map+unpack manually. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-29Rename git core commands to be "git-xxxx" to avoid name clashes.Linus Torvalds
This also regularizes the make. The source files themselves don't get the "git-" prefix, because that's just inconvenient. So instead we just make the rule that "git-xxxx" depends on "xxxx.c", and do that for all the core programs (ie the old "git-mktag.c" got renamed to just "mktag.c" to match everything else). And "show-diff" got renamed to "git-diff-files" while at it, since that's what it really should be to match the other git-diff-xxx cases.