summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pack-objects: further work on internal rev-list logic.Junio C Hamano2006-09-074-93/+85
| | | | | | | | | | This teaches the internal rev-list logic to understand options that are needed for pack handling: --all, --unpacked, and --thin. It also moves two functions from builtin-rev-list to list-objects so that the two programs can share more code. Signed-off-by: Junio C Hamano <junkio@cox.net>
* pack-objects: run rev-list equivalent internally.Junio C Hamano2006-09-071-82/+215
| | | | | | | | | | | | | | | | | | | | | Instead of piping the rev-list output from its standard input, you can say: pack-objects --all --unpacked --revs pack and feed the rev parameters you would otherwise give the rev-list on its command line from the standard input. In other words: echo 'master..next' | pack-objects --revs pack and rev-list --objects master..next | pack-objects pack are equivalent. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Separate object listing routines out of rev-listJunio C Hamano2006-09-074-99/+130
| | | | | | | | Create a separate file, list-objects.c, and move object listing routines from rev-list to it. The next round will use it in pack-objects directly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/daemon'Junio C Hamano2006-09-072-12/+38
|\ | | | | | | | | | | | | * jc/daemon: Revert "daemon: add upload-tar service." multi-service daemon: documentation daemon: add upload-tar service.
| * 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>
* | Merge branch 'pm/diff'Junio C Hamano2006-09-071-0/+25
|\ \ | | | | | | | | | | | | * pm/diff: diff-index --cc shows a 3-way diff between HEAD, index and working tree.
| * | diff-index --cc shows a 3-way diff between HEAD, index and working tree.Paul Mackerras2006-09-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a 3-way diff between the HEAD commit, the state in the index, and the working directory. This is like the n-way diff for a merge, and uses much of the same code. It is invoked with the -c flag to git-diff-index, which it already accepted and did nothing with. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-repack: create new packs inside $GIT_DIR, not cwdMartin Langhoff2006-09-061-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid failing when cwd is !writable by writing the packfiles in $GIT_DIR, which is more in line with other commands. Without this, git-repack was failing when run from crontab by non-root user accounts. For large repositories, this also makes the mv operation a lot cheaper, and avoids leaving temp packfiles around the fs upon failure. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Teach rev-list an option to read revs from the standard input.Junio C Hamano2006-09-052-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --stdin option is given, in addition to the <rev>s listed on the command line, the command can read one rev parameter per line from the standard input. The list of revs ends at the first empty line or EOF. Note that you still have to give all the flags from the command line; only rev arguments (including A..B, A...B, and A^@ notations) can be give from the standard input. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | revision.c: allow injecting revision parameters after setup_revisions().Junio C Hamano2006-09-052-74/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setup_revisions() wants to get all the parameters at once and then postprocesses the resulting revs structure after it is done with them. This code structure is a bit cumbersome to deal with efficiently when we want to inject revision parameters from the side (e.g. read from standard input). Fortunately, the nature of this postprocessing is not affected by revision parameters; they are affected only by flags. So it is Ok to do add_object() after the it returns. This splits out the code that deals with the revision parameter out of the main loop of setup_revisions(), so that we can later call it from elsewhere after it returns. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Fix memory leak in prepend_to_path (git.c).Christian Couder2006-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Some memory was allocated for a new path but not freed after the path was used. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | send-pack: remove remote reference limitAndy Whitcroft2006-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When build a pack for a push we query the remote copy for existant heads. These are used to prune unnecessary objects from the pack. As we receive the remote references in get_remote_heads() we validate the reference names via check_ref() which includes a length check; rejecting those >45 characters in size. This is a miss converted change, it was originally designed to reject messages which were less than 45 characters in length (a 40 character sha1 and refs/) to prevent comparing unitialised memory. check_ref() now gets the raw length so check for at least 5 characters. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | autoconf: Fix copy'n'paste errorJakub Narebski2006-09-051-1/+1
|/ / | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/pack'Junio C Hamano2006-09-044-16/+100
|\ \ | | | | | | | | | | | | | | | | | | * jc/pack: more lightweight revalidation while reusing deflated stream in packing pack-objects: fix thinko in revalidate code pack-objects: re-validate data we copy from elsewhere.
| * | more lightweight revalidation while reusing deflated stream in packingJunio C Hamano2006-09-034-41/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When copying from an existing pack and when copying from a loose object with new style header, the code makes sure that the piece we are going to copy out inflates well and inflate() consumes the data in full while doing so. The check to see if the xdelta really apply is quite expensive as you described, because you would need to have the image of the base object which can be represented as a delta against something else. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | pack-objects: fix thinko in revalidate codeJunio C Hamano2006-09-031-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | When revalidating an entry from an existing pack entry->size and entry->type are not necessarily the size of the final object when the entry is deltified, but for base objects they must match. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | pack-objects: re-validate data we copy from elsewhere.Junio C Hamano2006-09-021-4/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reusing data from an existing pack and from a new style loose objects, we used to just copy it staight into the resulting pack. Instead make sure they are not corrupt, but do so only when we are not streaming to stdout, in which case the receiving end will do the validation either by unpacking the stream or by constructing the .idx file. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | autoconf: Quote AC_CACHE_CHECK argumentsJakub Narebski2006-09-041-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | autoconf: Check for subprocess.pyJakub Narebski2006-09-041-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add custom test for checking if Python comes with subprocess.py, or should we use our own subprocess.py by defining WITH_OWN_SUBPROCESS_PY. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | autoconf: Add -liconv to LIBS when NEEDS_LIBICONVJakub Narebski2006-09-041-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Divide page path into directories -- path's "breadcrumbs"Jakub Narebski2006-09-041-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Divide page path into directories, so that each part of path links to the "tree" view of the $hash_base (or HEAD, if $hash_base is not set) version of the directory. If the entity is blob, final part (basename) links to $hash_base or HEAD revision of the "raw" blob ("blob_plain" view). If the entity is tree, link to the "tree" view. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Correct typo: '==' instead of 'eq' in git_difftree_bodyJakub Narebski2006-09-041-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Add GIT favicon, assuming image/png typeJakub Narebski2006-09-043-0/+7
| | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Fix git-fsck-objects SIGSEGV/divide-by-zeroLinus Torvalds2006-09-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you try to fsck a repository that isn't entirely empty, but that has no inter-object references (ie all the objects are blobs, and don't refer to anything else), git-fsck-objects currently fails. This probably cannot happen in practice, but can be tested with something like git init-db touch dummy git add dummy git fsck-objects where the fsck will die by a divide-by-zero when it tries to look up the references from the one object it found (hash_obj() will do a modulus by refs_hash_size). On some other archiectures (ppc, sparc) the divide-by-zero will go unnoticed, and we'll instead SIGSEGV when we hit the "refs_hash[j]" access. So move the test that should protect against this from mark_reachable() into lookup_object_refs(), which incidentally in the process also fixes mark_reachable() itself (it used to not mark the one object that _was_ reachable, because it decided that it had no refs too early). Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Change the name of diff to parent link in "commit" view to "diffJakub Narebski2006-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the name of diff to parent (current commit to one of parents) link in "commit" view (git_commit subroutine) from "commitdiff" to "diff". Let's leave "commitdiff" for equivalent of git-show, or git-diff-tree with one revision, i.e. diff for a given commit to its parent (parents). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Update GIT_TRACE documentation.Christian Couder2006-09-031-1/+10
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'master' into cc/traceJunio C Hamano2006-09-0245-312/+972
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Trace into a file or an open fd and refactor tracing code. Replace uses of strdup with xstrdup. consolidate two copies of new style object header parsing code. Documentation: Fix howto/revert-branch-rebase.html generation fmt-merge-msg: fix off-by-one bug git-rev-list(1): group options; reformat; document more options Constness tightening for move/link_temp_to_file() gitweb: Fix git_blame Include config.mak.autogen in the doc Makefile Use xmalloc instead of malloc git(7): move gitk(1) to the list of porcelain commands gitk: Fix some bugs in the new cherry-picking code gitk: Improve responsiveness while reading and layout out the graph gitk: Update preceding/following tag info when creating a tag gitk: Add a menu item for cherry-picking commits gitk: Fix a couple of buglets in the branch head menu items gitk: Add a context menu for heads gitk: Add a row context-menu item for creating a new branch gitk: Recompute ancestor/descendent heads/tags when rereading refs gitk: Minor cleanups
| * | Trace into a file or an open fd and refactor tracing code.Christian Couder2006-09-0210-64/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If GIT_TRACE is set to an absolute path (starting with a '/' character), we interpret this as a file path and we trace into it. Also if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. This patch makes it possible to get trace information when running "make test". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Replace uses of strdup with xstrdup.Shawn Pearce2006-09-0234-76/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like xmalloc and xrealloc xstrdup dies with a useful message if the native strdup() implementation returns NULL rather than a valid pointer. I just tried to use xstrdup in new code and found it to be missing. However I expected it to be present as xmalloc and xrealloc are already commonly used throughout the code. [jc: removed the part that deals with last_XXX, which I am finding more and more dubious these days.] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | consolidate two copies of new style object header parsing code.Junio C Hamano2006-09-011-40/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also while we are at it, remove redundant typename[] array from unpack_sha1_header. The only reason it is different from the type_names[] array in object.c module is that this code cares about the subset of object types that are valid in a loose object, so prepare a separate array of boolean that tells us which types are valid, and share the name translation with the others. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Documentation: Fix howto/revert-branch-rebase.html generationSergey Vlasov2006-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The rule for howto/*.html used "$?", which expands to the list of all newer prerequisites, including asciidoc.conf added by another rule. "$<" should be used instead. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | fmt-merge-msg: fix off-by-one bugJohannes Schindelin2006-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to the recent malloc()->xmalloc() change, and XMALLOC_POISON, this bug was found. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-rev-list(1): group options; reformat; document more optionsJonas Fonseca2006-09-011-66/+188
| | | | | | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2006-09-011-95/+587
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix some bugs in the new cherry-picking code gitk: Improve responsiveness while reading and layout out the graph gitk: Update preceding/following tag info when creating a tag gitk: Add a menu item for cherry-picking commits gitk: Fix a couple of buglets in the branch head menu items gitk: Add a context menu for heads gitk: Add a row context-menu item for creating a new branch gitk: Recompute ancestor/descendent heads/tags when rereading refs gitk: Minor cleanups
| | * | gitk: Fix some bugs in the new cherry-picking codePaul Mackerras2006-08-281-2/+6
| | | | | | | | | | | | | | | | | | | | When inserting the new commit row for the cherry-picked commit, we weren't advancing the selected line (if there is one), and we weren't updating commitlisted properly.
| | * | gitk: Improve responsiveness while reading and layout out the graphPaul Mackerras2006-08-161-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restructures layoutmore so that it can take a time limit and do limited amounts of graph layout and graph optimization, and return 1 if it exceeded the time limit before finishing everything it could do. Also getcommitlines reads at most half a megabyte each time, to limit the time it spends parsing the commits to about a tenth of a second. Also got rid of the unused ncmupdate variable while I was at it. Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Update preceding/following tag info when creating a tagPaul Mackerras2006-08-081-0/+77
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Add a menu item for cherry-picking commitsPaul Mackerras2006-08-061-43/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does a git-cherry-pick -r to cherry-pick the commit that was right-clicked on to the head of the current branch. This would work better with some minor changes to the git-cherry-pick script. Along the way, this changes desc_heads to record the names of the descendent heads rather than their IDs. Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Fix a couple of buglets in the branch head menu itemsPaul Mackerras2006-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a silly typo (an extra a) and fixes the condition for asking for confirmation of removing a branch. Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Add a context menu for headsPaul Mackerras2006-08-021-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This menu allows you to check out a branch and to delete a branch. If you ask to delete a branch that has commits that aren't on any other branch, gitk will prompt for confirmation before doing the deletion. Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Add a row context-menu item for creating a new branchPaul Mackerras2006-08-021-0/+80
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Recompute ancestor/descendent heads/tags when rereading refsPaul Mackerras2006-08-021-47/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't updating the desc_heads, desc_tags and anc_tags arrays when rereading the set of heads/tags/etc. The tricky thing to get right here is restarting the computation correctly when we are only half-way through it. Signed-off-by: Paul Mackerras <paulus@samba.org>
| | * | gitk: Minor cleanupsPaul Mackerras2006-07-181-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Removed some unnecessary quotes and globals, updated copyright notice. Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | Constness tightening for move/link_temp_to_file()Junio C Hamano2006-09-012-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | gitweb: Fix git_blameAneesh Kumar K.V2006-08-311-4/+6
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Include config.mak.autogen in the doc MakefileJonas Fonseca2006-08-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to install documentation relative to the path set with configure's --prefix option. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Use xmalloc instead of mallocJonas Fonseca2006-08-319-16/+16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git(7): move gitk(1) to the list of porcelain commandsJonas Fonseca2006-08-311-7/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>