aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Use xrealloc instead of reallocJonas Fonseca2006-08-26
| | | | | | | | | Change places that use realloc, without a proper error path, to instead use xrealloc. Drop an erroneous error path in the daemon code that used errno in the die message in favour of the simpler xrealloc. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use PATH_MAX instead of MAXPATHLENJonas Fonseca2006-08-26
| | | | | | | | According to sys/paramh.h it's a "BSD name" for values defined in <limits.h>. Besides PATH_MAX seems to be more commonly used. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Convert unpack_entry_gently and friends to use offsets.Shawn Pearce2006-08-26
| | | | | | | | | | | | | Change unpack_entry_gently and its helper functions to use offsets rather than addresses and left counts to supply pack position information. In most cases this makes the code easier to follow, and it reduces the number of local variables in a few functions. It also better prepares this code for mapping partial segments of packs and altering what regions of a pack are mapped while unpacking an entry. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Cleanup unpack_object_header to use only offsets.Shawn Pearce2006-08-26
| | | | | | | | | | | | If we're always incrementing both the offset and the pointer we aren't gaining anything by keeping both. Instead just use the offset since that's what we were given and what we are expected to return. Also using offset is likely to make it easier to remap the pack in the future should partial mapping of very large packs get implemented. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Cleanup unpack_entry_gently and friends to use type_name array.Shawn Pearce2006-08-26
| | | | | | | | | | | [PATCH 3/5] Cleanup unpack_entry_gently and friends to use type_name array. This change allows combining all of the non-delta entries into a single case, as well as to remove an unnecessary local variable in unpack_entry_gently. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Reuse compression code in unpack_compressed_entry.Shawn Pearce2006-08-26
| | | | | | | | | | | | [PATCH 2/5] Reuse compression code in unpack_compressed_entry. This cleans up the code by reusing a perfectly good decompression implementation at the expense of 1 extra byte of memory allocated in temporary memory while the delta is being decompressed and applied to the base. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Reorganize/rename unpack_non_delta_entry to unpack_compressed_entry.Shawn Pearce2006-08-26
| | | | | | | | | | | | This function was moved above unpack_delta_entry so we can call it from within unpack_delta_entry without a forward declaration. This change looks worse than it is. Its really just a relocation of unpack_non_delta_entry to earlier in the file and renaming the function to unpack_compressed_entry. No other changes were made. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'gl/cleanup'Junio C Hamano2006-08-26
|\ | | | | | | | | | | * gl/cleanup: Convert memset(hash,0,20) to hashclr(hash). Convert memcpy(a,b,20) to hashcpy(a,b).
| * Convert memset(hash,0,20) to hashclr(hash).Junio C Hamano2006-08-23
| | | | | | | | | | | | In the same spirit as hashcmp() and hashcpy(). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Convert memcpy(a,b,20) to hashcpy(a,b).Shawn Pearce2006-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This abstracts away the size of the hash values when copying them from memory location to memory location, much as the introduction of hashcmp abstracted away hash value comparsion. A few call sites were using char* rather than unsigned char* so I added the cast rather than open hashcpy to be void*. This is a reasonable tradeoff as most call sites already use unsigned char* and the existing hashcmp is also declared to be unsigned char*. [jc: Splitted the patch to "master" part, to be followed by a patch for merge-recursive.c which is not in "master" yet. Fixed the cast in the latter hunk to combine-diff.c which was wrong in the original. Also converted ones left-over in combine-diff.c, diff-lib.c and upload-pack.c ] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: git_annotate didn't expect negative numeric timezoneJakub Narebski2006-08-26
| | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-svn: add the 'dcommit' commandEric Wong2006-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a high-level wrapper around the 'commit-diff' command and used to produce cleaner history against the mirrored repository through rebase/reset usage. It's basically a more polished version of this: for i in `git rev-list --no-merges remotes/git-svn..HEAD | tac`; do git-svn commit-diff $i~1 $i done git reset --hard remotes/git-svn Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-svn: recommend rebase for syncing against an SVN repoEric Wong2006-08-25
| | | | | | | | | | | | | | | | | | | | Does this make sense to other git-svn users out there? pull can give funky history unless you understand how git-svn works internally, which users should not be expected to do. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-svn: establish new connections on commit after forkEric Wong2006-08-25
| | | | | | | | | | | | | | | | | | | | SVN seems to have a problem with https:// repositories from time-to-time when doing multiple, sequential commits. This problem is not consistently reproducible without the patch, but it should go away entirely with this patch... Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | describe: fix off-by-one error in --abbrev=40 handlingJonas Fonseca2006-08-25
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-svn(1): improve asciidoc markupJonas Fonseca2006-08-25
| | | | | | | | | | | | | | | | | | | | | | | | Use list continuation to have better wrapping. This accounts for most of the changes because it reindents a lot of text without applying other changes. Use cross-referencing for interlinking and the gitlink macro for pointing to other tools in the git suite. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitview.txt: improve asciidoc markupJonas Fonseca2006-08-25
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git(7): put the synopsis in a verse style paragraphJonas Fonseca2006-08-25
| | | | | | | | | | | | | | ... so it wraps properly in small terminals. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitk(1): expand the manpage to look less like a templateJonas Fonseca2006-08-25
| | | | | | | | | | | | | | | | | | Add a short description and document a few selected options additionally to the different "entities" in the standard calling convention. Advertise other git repository browsers. Lastly, climb Mount Ego. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-blame(1): mention options in the synopsis and advertise pickaxeJonas Fonseca2006-08-25
| | | | | | | | | | | | | | | | | | | | Inspired by the cvs annotate documentation improve and expand the man page to also mention the limitations of file annotations. Since people coming from the SVN/CVS world might first look here, also briefly advertise how the pickaxe interface makes it easy to go beyond these limitation. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-ls-remote(1): document --upload-packJonas Fonseca2006-08-25
| | | | | | | | | | | | | | ... and mention that '.' will list the local repo references. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-apply(1): document missing options and improve existing onesJonas Fonseca2006-08-25
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | update-index -gJunio C Hamano2006-08-23
| | | | | | | | | | | | | | I often find myself typing this but the common abbreviation "g" for "again" has not been supported so far for some unknown reason. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | n is in fact unused, and is later shadowed.Pierre Habouzit2006-08-23
| | | | | | | | | | | | | | | | date.c::approxidate_alpha() counts the number of alphabets while moving the pointer but does not use the count. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | use name[len] in switch directly, instead of creating a shadowed variable.Pierre Habouzit2006-08-23
| | | | | | | | | | | | | | | | builtin-apply.c defines a local variable 'c' which is used only once and then later gets shadowed by another instance of 'c'. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | builtin-grep.c: remove unused debugging piece.Junio C Hamano2006-08-23
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | remove ugly shadowing of loop indexes in subloops.Pierre Habouzit2006-08-23
| | | | | | | | | | | | | | | | builtin-mv.c and git.c has a nested loop that is governed by a variable 'i', but they shadow it with another instance of 'i'. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | missing 'static' keywordsPierre Habouzit2006-08-23
| | | | | | | | | | | | | | | | builtin-tar-tree.c::git_tar_config() and http-push.c::add_one_object() are not used outside their own files. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git_dir holds pointers to local strings, hence MUST be const.Pierre Habouzit2006-08-23
| | | | | | | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | avoid to use error that shadows the function name, use err instead.Pierre Habouzit2006-08-23
|/ | | | | | | | builtin-apply.c and builtin-push.c uses a local variable called 'error' which shadows the error() function. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix a comparison bug in diff-delta.cPierre Habouzit2006-08-23
| | | | | | | | | (1 << i) < hspace is compared in the `int` space rather that in the unsigned one. the result will be wrong if hspace is between 0x40000000 and 0x80000000. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-send-email: Don't set author_not_sender from Cc: linesHaavard Skinnemoen2006-08-23
| | | | | | | | | | | | | | | | | | When an mbox-style patch contains a Cc: line in the header, git-send-email will check the address against the sender specified on the command line. If they don't match, sender_not_author will be set to the address obtained from the Cc line. When this happens, git-send-email inserts a From: line at the beginning of the message body with the address obtained from the Cc line in the header, and the sender might be accused of forging patch authors. This patch fixes this by only updating sender_not_author when processing From: lines, not when processing Cc: lines. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Remove unnecessary forward declaration of unpack_entry.Shawn Pearce2006-08-21
| | | | | | | | This declaration probably used to be necessary but the code has been refactored since to use unpack_entry_gently instead. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Verify we know how to read a pack before trying to using it.Shawn Pearce2006-08-21
| | | | | | | | | | | | | | If the pack format were to ever change or be extended in the future there is no assurance that just because the pack file lives in objects/pack and doesn't end in .idx that we can read and decompress its contents properly. If we encounter what we think is a pack file and it isn't or we don't recognize its version then die and suggest to the user that they upgrade to a newer version of GIT which can handle that pack file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add write_or_die(), a helper functionRene Scharfe2006-08-21
| | | | | | | | | | | | | | | | | | | The little helper write_or_die() won't come back with bad news about full disks or broken pipes. It either succeeds or terminates the program, making additional error handling unnecessary. This patch adds the new function and uses it to replace two similar ones (the one in tar-tree originally has been copied from cat-file btw.). I chose to add the fd parameter which both lacked to make write_or_die() just as flexible as write() and thus suitable for lib-ification. There is a regression: error messages emitted by this function don't show the program name, while the replaced two functions did. That's acceptable, I think; a lot of other functions do the same. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Axe the last entRene Scharfe2006-08-21
| | | | | | | | | In the name of Standardization, this cleanses the last usage string of mystical creatures. But they still dwell deep within the source and in some debug messages, it is said. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-08-21
|\ | | | | | | | | | | | | * maint: builtin-mv: readability patch git-mv: fix off-by-one error git-mv: special case destination "."
| * builtin-mv: readability patchJohannes Schindelin2006-08-21
| | | | | | | | | | | | | | | | | | | | The old version was not liked at all. This is hopefully better. Oh, and it gets rid of the goto. Note that it does not change any functionality. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-mv: fix off-by-one errorJohannes Schindelin2006-08-21
| | | | | | | | | | | | | | Embarassing. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-mv: special case destination "."Johannes Schindelin2006-08-21
| | | | | | | | | | | | | | | | | | | | Since the normalized basename of "." is "", the check for directory failed erroneously. Noticed by Fredrik Kuivinen. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | builtin-mv: readability patchJohannes Schindelin2006-08-20
| | | | | | | | | | | | | | | | | | | | The old version was not liked at all. This is hopefully better. Oh, and it gets rid of the goto. Note that it does not change any functionality. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Indentation fix.Tilman Sauerbeck2006-08-17
| | | | | | | | | | Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length.David Rientjes2006-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduces global inline: hashcmp(const unsigned char *sha1, const unsigned char *sha2) Uses memcmp for comparison and returns the result based on the length of the hash name (a future runtime decision). Acked-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: Uniquify version info output, add meta generator in page headerJakub Narebski2006-08-17
| | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/format-patch'Junio C Hamano2006-08-16
|\ \ | | | | | | | | | | | | * jc/format-patch: Add a newline before appending "Signed-off-by: " line
| * | Add a newline before appending "Signed-off-by: " lineFranck Bui-Huu2006-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whef the last line of the commit log message does not end with "^[-A-Za-z]+: [^@]+@", append a newline after it to separate the body of the commit log message from the run of sign-off and ack lines. e.g. "Signed-off-by: A U Thor <au.thor@example.com>" or "Acked-by: Me <myself@example.org>". Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Be nicer if git executable is not installedVille Skyttä2006-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoids problems if vc-git.el is installed and activated, but the git executable is not available, for example http://list-archive.xemacs.org/xemacs-beta/200608/msg00062.html Signed-off-by: Ville Skyttä <scop@xemacs.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/racy'Junio C Hamano2006-08-16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/racy: Remove the "delay writing to avoid runtime penalty of racy-git avoidance" Add check program "git-check-racy" Documentation/technical/racy-git.txt avoid nanosleep(2)
| * | | Remove the "delay writing to avoid runtime penalty of racy-git avoidance"Junio C Hamano2006-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The work-around should not be needed. Even if it turns out we would want it later, git will remember the patch for us ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Add check program "git-check-racy"Junio C Hamano2006-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will help counting the racily clean paths, but it should be useless for daily use. Do not even enable it in the makefile. Signed-off-by: Junio C Hamano <junkio@cox.net>