aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* 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>
* Documentation/technical/racy-git.txtJunio C Hamano2006-08-15
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* avoid nanosleep(2)Junio C Hamano2006-08-15
| | | | | | | | | | | | | | | | | | | | On Solaris nanosleep(2) is not available in libc; you need to link with -lrt to get it. The purpose of the loop is to wait until the next filesystem timestamp granularity, and the code uses subsecond sleep in the hope that it can shorten the delay to 0.5 seconds on average instead of a full second. It is probably not worth depending on an extra library for this. We might want to yank out the whole "racy-git avoidance is costly later at runtime, so let's delay writing the index out" codepath later, but that is a separate issue and needs some testing on large trees to figure it out. After playing with the kernel tree, I have a feeling that the whole thing may not be worth it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-apply --binary: clean up and prepare for --reverseJunio C Hamano2006-08-15
| | | | | | | | | | | | | | | | | | | | | | This cleans up the implementation of "git-apply --binary", and implements reverse application of binary patches (when git-diff is converted to emit reversible binary patches). Earlier, the types of encoding (either deflated literal or deflated delta) were stored in is_binary field in struct patch, which meant that we cannot store more than one fragment that differ in the encoding for a patch. This moves the information to a field in struct fragment that is otherwise unused for binary patches, and makes it possible to hang two (or more, but two is enough) hunks for a binary patch. The original "binary patch" output from git-diff is internally parsed into an "is_binary" patch with one fragment. Upcoming reversible binary patch output will have two fragments, the first one being the forward patch and the second one the reverse patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix detection of ipv6 on SolarisDennis Stosberg2006-08-15
| | | | | | | | | The configuration script detects whether linking with -lsocket is necessary but doesn't add -lsocket to LIBS. This lets the ipv6 test fail. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Look for sockaddr_storage in sys/socket.hDennis Stosberg2006-08-15
| | | | | | | | | | | | On Solaris and the BSDs the definition of "struct sockaddr_storage" is not available from "netinet/in.h". On Solaris "sys/socket.h" is enough, at least OpenBSD needs "sys/types.h", too. Using "sys/types.h" and "sys/socket.h" seems to be a more portable way. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Solaris has strlcpy() at least since version 8Dennis Stosberg2006-08-15
| | | | | | | See http://docs.sun.com/app/docs/doc/816-3321/6m9k23sjk?a=view Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-apply --reverse: simplify reverse option.Junio C Hamano2006-08-14
| | | | | | | Having is_reverse in each patch did not make sense. This will hopefully simplify the work needed to introduce reversible binary diff format. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t4116 apply --reverse testJunio C Hamano2006-08-14
| | | | | | | The binary patch test needs to be made more careful not to have the postimage blob in the repository in which the patch is applied Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sha1flush void and remove conditional return.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make upload_pack void and remove conditional return.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make track_tree_refs void.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make pack_objects void.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make fsck_dir void.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make checkout_all void.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make show_entry voidDavid Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make pprint_tag void and cleans up call in cmd_cat_file.David Rientjes2006-08-14
| | | | | Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Remove combine-diff.c::uninteresting()Junio C Hamano2006-08-14
| | | | | | | A patch from David Rientjes made me realize we do not have to have this function -- just call diff_unmodified_pair() directly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* read-cache.c cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional returns. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* http-push.c cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional return. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff.c cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional return. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-push.c cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional return in builtin-push.c Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* builtin-grep.c cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional return. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* blame.c return cleanupDavid Rientjes2006-08-14
| | | | | | | Removes conditional from return Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: configurable home link stringYasushi SHOJI2006-08-14
| | | | | | | | | | | | | | | | | | I've always found difficult to figure out git URL for clone from gitweb URL because git:// and http:// are different on many site including kernel.org. I've found this enhancement at http://dev.laptop.org/git when I was on git channel, and thought that it'd be nice if all public gitweb site show it's git URL on its page. This patch allow us to change the home link string. The current default is "projects" as we all see on gitweb now. ie. kernel.org might set this variable to "git://git.kernel.org/pub/scm/" Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate printing difftree in git_commit into git_difftree_bodyJakub Narebski2006-08-14
| | | | | | | | | | | | Separate printing difftree in git_commit into separate git_difftree_body subroutine. Add support for "C" (copied) status. For "M" and "C" add parameter 'fp' (filename parent) to the "diff" link; currently not supported by git_blobdiff ("blobdiff" action). Reindented, realigned, added comments. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: True fix: Support for the standard mime.types map in gitwebJakub Narebski2006-08-14
| | | | | | | | | | | | True fix for error in mimetype_guess, error introduced in original commit 2d00737489b8c61ed616b261c7c9bd314e2b0b41 and later fixed temporarily by commenting out the line that caused error in commit 57bd4d3523efecf60197040cad34154aff4ddf80. Gitweb now supports mime.types map $mimetypes_file relative to project. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Skip comments in mime.types like fileJakub Narebski2006-08-14
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change appereance of marker of refs pointing to given objectJakub Narebski2006-08-14
| | | | | | | | | | | | | | | | | | | | | | | Change git_get_references to include type of ref in the %refs value, which means putting everything after 'refs/' as a ref name, not only last part of the name. Instead of separating refs pointing to the same object by " / " separator, use anonymous array reference to store all refs pointing to given object. Use 'git-ls-remote .' if $projectroot/$project/info/refs does not exist. (Perhaps it should be used always.) Refs are now in separate span elements. Class is dependent on the ref type: currently known classes are 'tag', 'head', 'remote', and 'ref' (last one for HEAD and other refs in the main directory). There is encompassing span element of class refs, just in case of unknown ref type. This might be considered cleaner separating of git_get_references into filling %refs hash only, and not taking part in formatting ref marker. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate finding project owner into git_get_project_ownerJakub Narebski2006-08-14
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate main part of git_history into git_history_bodyJakub Narebski2006-08-14
| | | | | | | | | Separates main part of git_history into git_history_body subroutine, and makes output more similar to git_shortlog. Adds "diff to current" link only for history of regular file (blob). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Refactor printing shortened title in git_shortlog_body and git_tags_bodyJakub Narebski2006-08-14
| | | | | | | | | | | Separate printing of perhaps shortened title (subject) in git_shortlog_body and git_tags_body into format_subject_html. While at it, remove presentation element <b>...</b> used to format title (subject) and move formatting to CSS. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate ref parsing in git_get_refs_list into parse_refJakub Narebski2006-08-14
| | | | | | | | | Note that for each ref there are usually two calls to git subroutines: first to get the type of ref, second to parse ref if ref is of commit or tag type. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Great subroutines renamingJakub Narebski2006-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename some of subroutines to better reflect what they do. Some renames were not performed because subroutine name reflects hash key. Subroutines name guideline: * git_ prefix for subroutines related to git commands, git repository, or to gitweb actions * git_get_ prefix for inner subroutines calling git command or reading some file in the repository and returning some output * parse_ prefix for subroutines parsing some text (or reading and parsing some text) into hash or list * format_ prefix for subroutines formatting, post-processing or generating some HTML/text fragment * _get_ infix for subroutines which return result * _print_ infix for subroutines which print fragment of output * _body suffix for subroutines which outputs main part (body) of related action (usually table) * _nav suffix for subroutines related to navigation bars * _div suffix for subroutines returning or printing div element * subroutine names should not be based on how the result is obtained, as this might change easily Renames performed: - git_get_referencing => format_ref_marker - git_get_paging_nav => format_paging_nav - git_read_head => git_get_head_hash - git_read_hash => git_get_hash_by_ref - git_read_description => git_get_project_description - git_read_projects => git_get_projects_list - read_info_ref => git_get_references - git_read_refs => git_get_refs_list - date_str => parse_date - git_read_tag => parse_tag - git_read_commit => parse_commit - git_blob_plain_mimetype => blob_mimetype - git_page_nav => git_print_page_nav - git_header_div => git_print_header_div Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-08-13
|\ | | | | | | | | | | * maint: sample commit-msg hook: no silent exit on duplicate Signed-off-by lines Fix regex pattern in commit-msg
| * sample commit-msg hook: no silent exit on duplicate Signed-off-by linesLuben Tuikov2006-08-13
| | | | | | | | | | | | | | | | | | | | | | git-commit would silently exit if duplicate Signed-off-by lines were found. Users of git-commit would not know it, unless they checked '$?'. This patch makes git-commit actually print out a message that nothing was commited since duplicate Signed-off-lines were found. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix regex pattern in commit-msgLuben Tuikov2006-08-13
| | | | | | | | | | | | | | | | | | Between the count and the line output, some uniq(1) versions put a TAB character, not a space. Make sure both are handled. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix type of combine-diff.c::show_patch_diff()Junio C Hamano2006-08-13
| | | | | | | | | | | | | | The other function, show_raw_diff() is void and no callers use return value from neither. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/upload-pack'Junio C Hamano2006-08-12
|\ \
| * | upload-pack: lift MAX_NEEDS and MAX_HAS limitationJunio C Hamano2006-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using object_array data structure, lift the old limitation of MAX_HAS/MAX_NEEDS. While we are at it, rename the variables that hold the objects we use to compute common ancestor to match the message used at the protocol level. What the other end has and we also do are "have"s, and what the other end asks for are "want"s. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | upload-pack: use object pointer not copy of sha1 to keep track of has/needs.Junio C Hamano2006-07-09
| | | | | | | | | | | | | | | | | | | | | This does not change what happens in the command in any way, but is to prepare for further work. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/racy-delay'Junio C Hamano2006-08-12
|\ \ \
| * | | read-cache: tweak racy-git delay logicJunio C Hamano2006-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of looping over the entries and writing out, use a separate loop after all entries have been written out to check how many entries are racily clean. Make sure that the newly created index file gets the right timestamp when we check by flushing the buffered data by ce_write(). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Racy git: avoid having to be always too carefulJunio C Hamano2006-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Immediately after a bulk checkout, most of the paths in the working tree would have the same timestamp as the index file, and this would force ce_match_stat() to take slow path for all of them. When writing an index file out, if many of the paths have very new (read: the same timestamp as the index file being written out) timestamp, we are better off delaying the return from the command, to make sure that later command to touch the working tree files will leave newer timestamps than recorded in the index, thereby avoiding to take the slow path. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'th/diff-extra'Junio C Hamano2006-08-12
|\ \ \ \
| * | | | Remove awkward compatibility wartsTimo Hirvonen2006-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | --name-only, --name-status, --check and -s are mutually exclusiveTimo Hirvonen2006-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'jc/pack-objects'Junio C Hamano2006-08-12
|\ \ \ \ \
| * | | | | unpack-objects: read configuration data upon startup.Junio C Hamano2006-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this, unpack-objects will write out the loose objects with new-style headers when core.legacyheaders configuration is set to false. One unfortunate thing is that we still need inflate/deflate cycle when unpacking, even for objects in the pack stream that are not deltified, because it is not possible to determine the boundary of objects in the encoded stream cheaply without inflating it first. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | pack-objects: reuse deflated data from new-style loose objects.Junio C Hamano2006-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When packing an object without deltifying, if the data is stored in a loose object that is encoded with a new style header, copy it without inflating and deflating. Signed-off-by: Junio C Hamano <junkio@cox.net>