summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "daemon: add upload-tar service."Junio C Hamano2006-09-072-13/+1
| | | | | | | | | | This reverts parts of commit 74c0cc2 and part of commit 355f541. Franck and Rene are working on a unified upload-archive which would supersede this when done, so better not to get in their way. Signed-off-by: Junio C Hamano <junkio@cox.net>
* multi-service daemon: documentationJunio C Hamano2006-08-271-8/+39
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* daemon: add upload-tar service.Junio C Hamano2006-08-271-4/+11
| | | | | | | | | | | | | | | | | This allows clients to ask for tarballs with: git tar-tree --remote=git://server/repo refname By default, the upload-tar service is not enabled. To enable it server-wide, the server can be started with: git-daemon --enable=upload-tar This service is by default overridable per repostiory, so alternatively, a repository can define "daemon.uploadtar = true" to enable it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* daemon: prepare for multiple services.Junio C Hamano2006-08-271-7/+106
| | | | | | | | | This adds an infrastructure to selectively enable and disable more than one services in git-daemon. Currently upload-pack service, which serves the git-fetch-pack and git-peek-remote clients, is the only service that is defined. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git-zip-tree to .gitignoreRene Scharfe2006-08-271-0/+1
| | | | | Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* free(NULL) is perfectly valid.Junio C Hamano2006-08-2710-44/+21
| | | | | | | Jonas noticed some places say "if (X) free(X)" which is totally unnecessary. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use xcalloc instead of callocJonas Fonseca2006-08-272-2/+2
| | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Use fstat instead of fseekJonas Fonseca2006-08-271-5/+3
| | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'gl/cleanup-next'Junio C Hamano2006-08-271-16/+14
|\ | | | | | | | | | | * gl/cleanup-next: hashcpy/hashcmp remaining bits. Convert memcpy(a,b,20) to hashcpy(a,b).
| * hashcpy/hashcmp remaining bits.Junio C Hamano2006-08-231-6/+4
| | | | | | | | | | | | This fixes up merge-recursive.c for hashcpy/hashcmp changes. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Convert memcpy(a,b,20) to hashcpy(a,b).Shawn Pearce2006-08-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: this is a follow-up patch for merge-recursive.c which is not in "master" yet. The original was sent-in for "next" so I splitted it out. ] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Merge branch 'gl/cleanup' into gl/cleanup-nextJunio C Hamano2006-08-23106-2506/+3445
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gl/cleanup: (160 commits) Convert memset(hash,0,20) to hashclr(hash). Convert memcpy(a,b,20) to hashcpy(a,b). Fix a comparison bug in diff-delta.c git-send-email: Don't set author_not_sender from Cc: lines Remove unnecessary forward declaration of unpack_entry. Verify we know how to read a pack before trying to using it. Add write_or_die(), a helper function Axe the last ent builtin-mv: readability patch git-mv: fix off-by-one error git-mv: special case destination "." builtin-mv: readability patch Indentation fix. Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length. gitweb: Uniquify version info output, add meta generator in page header Be nicer if git executable is not installed builtin-grep: remove unused debugging cruft. gitweb: Add support for per project git URLs [PATCH] git-mv: add more path normalization Remove the "delay writing to avoid runtime penalty of racy-git avoidance" ...
* | \ Merge branch 'js/c-merge-recursive'Junio C Hamano2006-08-277-5/+1406
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/c-merge-recursive: (21 commits) discard_cache(): discard index, even if no file was mmap()ed merge-recur: do not die unnecessarily merge-recur: try to merge older merge bases first merge-recur: if there is no common ancestor, fake empty one merge-recur: do not setenv("GIT_INDEX_FILE") merge-recur: do not call git-write-tree merge-recursive: fix rename handling .gitignore: git-merge-recur is a built file. merge-recur: virtual commits shall never be parsed merge-recur: use the unpack_trees() interface instead of exec()ing read-tree merge-recur: fix thinko in unique_path() Makefile: git-merge-recur depends on xdiff libraries. merge-recur: Explain why sha_eq() and struct stage_data cannot go merge-recur: Cleanup last mixedCase variables... merge-recur: Fix compiler warning with -pedantic merge-recur: Remove dead code merge-recur: Get rid of debug code merge-recur: Convert variable names to lower_case Cumulative update of merge-recursive in C recur vs recursive: help testing without touching too many stuff. ... This is an evil merge that removes TEST script from the toplevel.
| * | Merge branch 'master' into js/c-merge-recursiveJunio C Hamano2006-08-1284-479/+1486
| |\ \ | | | | | | | | | | | | Adjust to hold_lock_file_for_update() change on the master.
| * | | discard_cache(): discard index, even if no file was mmap()edJohannes Schindelin2006-08-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since add_cacheinfo() can be called without a mapped index file, discard_cache() _has_ to discard the entries, even when cache_mmap == NULL. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: do not die unnecessarilyJohannes Schindelin2006-08-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the cache is dirty, and we switch the index file from temporary to final, we want to discard the cache without complaint. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: try to merge older merge bases firstJohannes Schindelin2006-08-091-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be the only sane way to do it: when a two-head merge is done, and the merge-base and one of the two branches agree, the merge assumes that the other branch has something new. If we start creating virtual commits from newer merge-bases, and go back to older merge-bases, and then merge with newer commits again, chances are that a patch is lost, _because_ the merge-base and the head agree on it. Unlikely, yes, but it happened to me. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: if there is no common ancestor, fake empty oneJohannes Schindelin2006-08-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the coolest merge ever. [jc: with two "Oops that's not it" fixes from Johannes and Alex, and an obvious type mismatch fix.] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: do not setenv("GIT_INDEX_FILE")Johannes Schindelin2006-08-091-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there are no external calls left in merge-recur, we do not need to set the environment variable GIT_INDEX_FILE all the time. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: do not call git-write-treeJohannes Schindelin2006-08-091-24/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since merge-recur is in C, and uses libgit, it can call the relevant functions directly, without writing the index file. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recursive: fix rename handlingJohannes Schindelin2006-08-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To handle renames properly, we iterate through all file names of both heads, the current one, and the one to be merged. Only that there was a bug, where it was checked if the file name was present in both heads, but the result of the check was never used. Instead, the merge proceeded as if both heads contained that file. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | .gitignore: git-merge-recur is a built file.Junio C Hamano2006-08-032-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Also it is OK to omit the documentation for it at least for now. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: virtual commits shall never be parsedJohannes Schindelin2006-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It would not make sense to parse a virtual commit, therefore set the "parsed" flag to 1. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge-recur: use the unpack_trees() interface instead of exec()ing read-treeJohannes Schindelin2006-07-301-28/+52
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Merge branch 'js/read-tree' into js/c-merge-recursiveJunio C Hamano2006-07-30103-1668/+2902
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/read-tree: (107 commits) read-tree: move merge functions to the library read-trees: refactor the unpack_trees() part tar-tree: illustrate an obscure feature better git.c: allow alias expansion without a git directory setup_git_directory_gently: do not barf when GIT_DIR is given. Build on Debian GNU/kFreeBSD Call setup_git_directory() much earlier Call setup_git_directory() early Display an error from update-ref if target ref name is invalid. Fix http-fetch t4103: fix binary patch application test. git-apply -R: binary patches are irreversible for now. Teach git-apply about '-R' Makefile: ssh-pull.o depends on ssh-fetch.c log and diff family: honor config even from subdirectories git-reset: detect update-ref error and report it. lost-found: use fsck-objects --full Teach git-http-fetch the --stdin switch Teach git-local-fetch the --stdin switch Make pull() support fetching multiple targets at once ...
| * | | | merge-recur: fix thinko in unique_path()Johannes Schindelin2006-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This could result in a nasty infinite loop, or in bogus names (it used the strlen() of the newly allocated buffer instead of the original buffer). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Makefile: git-merge-recur depends on xdiff libraries.Junio C Hamano2006-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tighten dependencies to allow parallel build. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Explain why sha_eq() and struct stage_data cannot goJohannes Schindelin2006-07-271-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two TODOs to remove sha_eq() and to convert users of struct stage_data to active_cache users, but this is not possible. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Cleanup last mixedCase variables...Johannes Schindelin2006-07-271-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Fix compiler warning with -pedanticJohannes Schindelin2006-07-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Remove dead codeJohannes Schindelin2006-07-271-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Get rid of debug codeJohannes Schindelin2006-07-271-64/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | merge-recur: Convert variable names to lower_caseJohannes Schindelin2006-07-271-191/+189
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Cumulative update of merge-recursive in CJohannes Schindelin2006-07-271-526/+364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains mainly three sorts of fixes: - get rid of small wrapper functions - reuse the diff_filespec structure when sha1, mode & path are needed - Junio's pedantic updates Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Merge branch 'lt/unitype' into js/c-merge-recursiveJunio C Hamano2006-07-1324-96/+91
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/unitype: builtin-prune.c: forgot TYPE => OBJ changes. Remove TYPE_* constant macros and use object_type enums consistently.
| * | | | | recur vs recursive: help testing without touching too many stuff.Junio C Hamano2006-07-134-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During git-merge-recur development, you could set an environment variable GIT_USE_RECUR_FOR_RECURSIVE to use WIP recur in place of the recursive strategy. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | Status update on merge-recursive in CJohannes Schindelin2006-07-1310-52/+1773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just an update for people being interested. Alex and me were busy with that project for a few days now. While it has progressed nicely, there are quite a couple TODOs in merge-recursive.c, just search for "TODO". For impatient people: yes, it passes all the tests, and yes, according to the evil test Alex did, it is faster than the Python script. But no, it is not yet finished. Biggest points are: - there are still three external calls - in the end, it should not be necessary to write the index more than once (just before exiting) - a lot of things can be refactored to make the code easier and shorter BTW we cannot just plug in git-merge-tree yet, because git-merge-tree does not handle renames at all. This patch is meant for testing, and as such, - it compile the program to git-merge-recur - it adjusts the scripts and tests to use git-merge-recur instead of git-merge-recursive - it provides "TEST", a script to execute the tests regarding -recursive - it inlines the changes to read-cache.c (read_cache_from(), discard_cache() and refresh_cache_entry()) Brought to you by Alex Riesen and Dscho Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | Merge branch 'ts/daemon'Junio C Hamano2006-08-272-5/+58
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ts/daemon: Added support for dropping privileges to git-daemon.
| * | | | | | Added support for dropping privileges to git-daemon.Tilman Sauerbeck2006-08-222-5/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | | Merge branch 'jc/apply'Junio C Hamano2006-08-275-33/+363
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/apply: git-apply --reject: finishing touches. apply --reject: count hunks starting from 1, not 0 git-apply --verbose git-apply --reject: send rejects to .rej files. git-apply --reject apply --reverse: tie it all together. diff.c: make binary patch reversible. builtin-apply --reverse: two bugfixes.
| * | | | | | | git-apply --reject: finishing touches.Junio C Hamano2006-08-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a failed "git am" attempt: git apply --reject --verbose .dotest/patch applies hunks that are applicable and leaves *.rej files the rejected hunks, and it reports what it is doing. With --index, files with a rejected hunk do not get their index entries updated at all, so "git diff" will show the hunks that successfully got applied. Without --verbose to remind the user that the patch updated some other paths cleanly, it is very easy to lose track of the status of the working tree, so --reject implies --verbose. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | apply --reject: count hunks starting from 1, not 0Junio C Hamano2006-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | git-apply --verboseJunio C Hamano2006-08-182-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | git-apply --reject: send rejects to .rej files.Junio C Hamano2006-08-182-49/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... just like everybody else does, instead of sending it to the standard output, which was just silly. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | git-apply --rejectJunio C Hamano2006-08-173-23/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new flag "--reject", hunks that do not apply are sent to the standard output, and the usable hunks are applied. The command itself exits with non-zero status when this happens, so that the user or wrapper can take notice and sort the remaining mess out. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | apply --reverse: tie it all together.Junio C Hamano2006-08-163-6/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a few tests, usage string, and documentation. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | diff.c: make binary patch reversible.Junio C Hamano2006-08-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the format previous "git-apply --reverse" update expects. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | | builtin-apply --reverse: two bugfixes.Junio C Hamano2006-08-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of a binary hunk did not consume the terminating blank line. When applying in reverse, it did not use the second, reverse binary hunk. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | | | git-reset: remove unused variableRene Scharfe2006-08-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | | | git-cherry: remove unused variableRene Scharfe2006-08-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>