summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitweb: Fix typo in git_difftree_bodyJakub Narebski2006-08-261-1/+1
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: blobs defined by non-textual hash ids can be cachedJakub Narebski2006-08-261-3/+17
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Improve comments about gitweb features configurationJakub Narebski2006-08-261-9/+16
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Remove workaround for git-diff bug fixed in f82cd3cJakub Narebski2006-08-261-2/+1
| | | | | | | | | | Remove workaround in git_blobdiff for error in git-diff (showing reversed diff for diff of blobs), corrected in commit f82cd3c Fix "git diff blob1 blob2" showing the diff in reverse. which is post 1.4.2-rc2 commit. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'master' into gl/webJunio C Hamano2006-08-2673-448/+661
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (34 commits) gitweb: git_annotate didn't expect negative numeric timezone git-svn: add the 'dcommit' command git-svn: recommend rebase for syncing against an SVN repo git-svn: establish new connections on commit after fork describe: fix off-by-one error in --abbrev=40 handling git-svn(1): improve asciidoc markup gitview.txt: improve asciidoc markup git(7): put the synopsis in a verse style paragraph gitk(1): expand the manpage to look less like a template git-blame(1): mention options in the synopsis and advertise pickaxe git-ls-remote(1): document --upload-pack git-apply(1): document missing options and improve existing ones update-index -g n is in fact unused, and is later shadowed. use name[len] in switch directly, instead of creating a shadowed variable. builtin-grep.c: remove unused debugging piece. remove ugly shadowing of loop indexes in subloops. missing 'static' keywords git_dir holds pointers to local strings, hence MUST be const. avoid to use error that shadows the function name, use err instead. ...
| * Merge branch 'gl/cleanup'Junio C Hamano2006-08-2635-83/+90
| |\ | | | | | | | | | | | | | | | * 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-236-5/+9
| | | | | | | | | | | | | | | | | | 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-2334-78/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-1/+1
| | | | | | | | | | | | | | | 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-262-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-2/+2
| | | | | | | | | | | | | | | 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-251-85/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-23/+33
| | | | | | | | | | | | | | | 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-251-1/+2
| | | | | | | | | | | | | | | | | | | | | ... 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-251-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-4/+14
| | | | | | | | | | | | | | | | | | | | | ... 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-251-7/+39
| | | | | | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | update-index -gJunio C Hamano2006-08-232-4/+4
| | | | | | | | | | | | | | | | | | | | | 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-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-231-3/+0
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | remove ugly shadowing of loop indexes in subloops.Pierre Habouzit2006-08-232-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-232-4/+5
| | | | | | | | | | | | | | | 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-232-8/+8
| |/ | | | | | | | | | | | | | | 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-231-1/+1
| | | | | | | | | | | | | | | | | | (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-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-3/+0
| | | | | | | | | | | | | | | | 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-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-215-46/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | | | | | | | | | 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-212-2/+9
| |\ | | | | | | | | | | | | | | | | | | * maint: builtin-mv: readability patch git-mv: fix off-by-one error git-mv: special case destination "."
| | * builtin-mv: readability patchJohannes Schindelin2006-08-211-60/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | | | | | | | | | | | | 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-212-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-201-60/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-6/+6
| | | | | | | | | | | | | | | 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-1731-71/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove creating directory for temporary filesJakub Narebski2006-08-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove $git_temp variable which held location for temporary files needed by git_diff_print, and removed creating $git_temp directory. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Remove git_diff_print subroutineJakub Narebski2006-08-251-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove git_diff_print subroutine, used to print diff in previous versions of "diff" actions, namely git_commitdiff, git_commitdiff_plain, git_blobdiff, git_blobdiff_plain. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: git_blobdiff_plain is git_blobdiff('plain')Jakub Narebski2006-08-251-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_blobdiff and git_blobdiff_plain are now collapsed into one subroutine git_blobdiff, with format (currently 'html' which is default format corresponding to git_blobdiff, and 'plain' corresponding to git_blobdiff_plain) specified in argument. blobdiff_plain format is now generated either by git-diff-tree or by git-diff. Added X-Git-Url: header. From-file and to-file name in header are corrected. Note that for now commitdiff_plain does not detect renames and copying, while blobdiff_plain does. While at it, set expires to "+1d" for non-textual hash ids. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Use git-diff-tree or git-diff patch output for blobdiffJakub Narebski2006-08-251-17/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is second part of removing gitweb dependency on external diff (used in git_diff_print). Get rid of git_diff_print invocation in git_blobdiff, and use either git-diff-tree (when both hash_base and hash_parent_base are provided) patch format or git-diff patch format (when only hash and hash_parent are provided) for output. Supported URI schemes, and output formats: * New URI scheme: both hash_base and hash_parent_base (trees-ish containing blobs versions we want to compare) are provided. Also either filename is provided, or hash (of blob) is provided (we try to find filename then). For this scheme we have copying and renames detection, mode changes, file types etc., and information extended diff header is correct. * Old URI scheme: hash_parent_base is not provided, we use hash and hash_parent to directly compare blobs using git-diff. If no filename is given, blobs hashes are used in place of filenames. This scheme has always "blob" as file type, it cannot detect mode changes, and we rely on CGI parameters to provide name of the file. Added git_to_hash subroutine, which transforms symbolic name or list of symbolic name to hash or list of hashes using git-rev-parse. To have "blob" instead of "unknown" (or "file" regardless of the type) in "gitweb diff header" for legacy scheme, file_type function now returns its argument if it is not octal string. Added support for fake "2" status code in git_patchset_body. Such code is generated by git_blobdiff in legacy scheme case. ATTENTION: The order of arguments (operands) to git-diff is reversed (sic!) to have correct diff in the legacy (no hash_parent_base) case. $hash_parent, $hash ordering is commented out, as it gives reversed patch (at least for git version 1.4.1.1) as compared to output in new scheme and output of older gitweb version. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Change here-doc back for style consistency in git_blobdiffJakub Narebski2006-08-251-4/+2
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Always display link to blobdiff_plain in git_blobdiffJakub Narebski2006-08-251-7/+7
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Add invisible hyperlink to from-file/to-file diff headerJakub Narebski2006-08-252-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change replacing hashes as from-file/to-file with filenames from difftree to adding invisible (except underlining on hover/mouseover) hyperlink to from-file/to-file blob. /dev/null as from-file or to-file is not changed (is not hyperlinked). This makes two-file from-file/to-file unified diff header parsing in git_patchset_body more generic, and not only for legacy blobdiffs. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Parse two-line from-file/to-file diff header in git_patchset_bodyJakub Narebski2006-08-252-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse two-line from-file/to-file unified diff header in git_patchset_body directly, instead of leaving pretty-printing to format_diff_line function. Hashes as from-file/to-file are replaced by proper from-file and to-file names (from $diffinfo); in the future we can put hyperlinks there. This makes possible to do blobdiff with only blobs hashes. The lines in two-line unified diff header have now class "from_file" and "to_file"; the style is chosen to match previous output (classes "rem" and "add" because of '-' and '+' as first character of patch line). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Allow for pre-parsed difftree info in git_patchset_bodyJakub Narebski2006-08-251-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | Preparation for converting git_blobdiff and git_blobdiff_plain to use git-diff-tree patch format to generate patches. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>