summaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-05-23 03:27:46 -0400
committerJunio C Hamano <junkio@cox.net>2006-05-23 00:50:50 -0700
commite73aefe4fdba0d161d9878642c69b40d83a0204c (patch)
tree69697452511baadc78d5a1a97dad6f5891f7dbfe /strbuf.c
parent6a1871e174fee1757713df7a3d776dd3813e7ad8 (diff)
downloadgit-e73aefe4fdba0d161d9878642c69b40d83a0204c.tar.gz
cvsimport: cleanup commit function
This change attempts to clean up the commit function to make it a bit easier to read (or at least the first half of it). It also improves robustness and performance. Specifically: - report get_headref errors on opening ref unless the error is ENOENT - use regex to check for sha1 instead of length - use lexically scoped filehandles which get cleaned up automagically - check for error on both 'print' and 'close' (since output is buffered) - avoid "fork, do some perl, then exec" in commit(). It's not necessary, and we probably end up COW'ing parts of the perl process. Plus the code is much smaller because we can use open2() - avoid calling strftime over and over (mainly a readability cleanup) Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'strbuf.c')
0 files changed, 0 insertions, 0 deletions