summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint'Junio C Hamano2007-11-1413-28/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: git-clean: honor core.excludesfile Documentation: Fix man page breakage with DocBook XSL v1.72 git-remote.txt: fix typo core-tutorial.txt: Fix argument mistake in an example. replace reference to git-rm with git-reset in git-commit doc Grammar fixes for gitattributes documentation Don't allow fast-import tree delta chains to exceed maximum depth revert/cherry-pick: allow starting from dirty work tree. t/t3404: fix test for a bogus todo file. Conflicts: fast-import.c
| * git-clean: honor core.excludesfileJunio C Hamano2007-11-142-1/+19
| | | | | | | | | | | | | | | | | | | | | | git-clean did not honor core.excludesfile configuration variable, although some other commands such as git-add and git-status did. Fix this inconsistency. Original report and patch from Shun'ichi Fuji. Rewritten by me and bugs and tests are mine. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: Fix man page breakage with DocBook XSL v1.72Jonas Fonseca2007-11-143-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From version 1.72 it will replace all dots in roff requests with U+2302 ("house" character), and add escaping in output for all instances of dot that are not in roff requests. This caused the ".ft" hack forcing monospace font in listingblocks to end up as "\&.ft" and being visible in the resulting man page. The fix adds a DOCBOOK_XSL_172 build variable that will disable the hack. To allow this variable to be defined in config.mak it also moves build variable handling below the inclusion of config.mak. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-remote.txt: fix typoSergei Organov2007-11-141-1/+1
| | | | | | | | | | Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * core-tutorial.txt: Fix argument mistake in an example.Sergei Organov2007-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | One of examples has wrong output given the arguments provided. Fix arguments to match the output. Fix a minor syntax mistake in another place. Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * replace reference to git-rm with git-reset in git-commit docJing Xue2007-11-142-4/+8
| | | | | | | | | | | | | | | | | | | | The message in git-commit suggesting to use 'git rm --cached' to unstage is just plain wrong. It really should mention 'git reset'. Suggested by Jan Hudec. Signed-off-by: Jing Xue <jingxue@digizenstudio.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Grammar fixes for gitattributes documentationWincent Colaiuta2007-11-141-8/+9
| | | | | | | | | | | | | | | | | | | | Tweak the "filter" section of the gitattributes documentation to add some missing articles and improve some word choices without changing the semantics of the section. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Don't allow fast-import tree delta chains to exceed maximum depthShawn O. Pearce2007-11-131-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Brian Downing noticed fast-import can produce tree depths of up to 6,035 objects and even deeper. Long delta chains can create very small packfiles but cause problems during repacking as git needs to unpack each tree to count the reachable blobs. What's happening here is the active branch cache isn't big enough. We're swapping out the branch and thus recycling the tree information (struct tree_content) back into the free pool. When we later reload the tree we set the delta_depth to 0 but we kept the tree we just reloaded as a delta base. So if the tree we reloaded was already at the maximum depth we wouldn't know it and make the new tree a delta. Multiply the number of times the branch cache has to swap out the tree times max_depth (10) and you get the maximum delta depth of a tree created by fast-import. In Brian's case above the active branch cache had to swap the branch out 603/604 times during this import to produce a tree with a delta depth of 6035. Acked-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * revert/cherry-pick: allow starting from dirty work tree.Junio C Hamano2007-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to forbid a dirty work tree when reverting or cherry-picking a change, as long as the index is clean. The scripted version used to allow it: case "$no_commit" in t) # We do not intend to commit immediately. We just want to # merge the differences in. head=$(git-write-tree) || die "Your index file is unmerged." ;; *) head=$(git-rev-parse --verify HEAD) || die "You do not have a valid HEAD" files=$(git-diff-index --cached --name-only $head) || exit if [ "$files" ]; then die "Dirty index: cannot $me (dirty: $files)" fi ;; esac but C rewrite tightened the check, probably by mistake. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t/t3404: fix test for a bogus todo file.Junio C Hamano2007-11-131-1/+1
| | | | | | | | | | | | | | The test wants to see if there are still remaining tasks, but checked a wrong file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix dependencies of parse-options test programAlex Riesen2007-11-141-0/+2
| | | | | | | | | | | | | | A stale test-parse-options can break t0040 otherwise. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | user-manual.txt: fix a few mistakesSergei Organov2007-11-141-3/+3
| | | | | | | | | | Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Handle broken vsnprintf implementations in strbufShawn O. Pearce2007-11-142-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solaris 9's vsnprintf implementation returns -1 if we pass it a buffer of length 0. The only way to get it to give us the actual length necessary for the formatted string is to grow the buffer out to have at least 1 byte available in the strbuf and then ask it to compute the length. If the available space is 0 I'm growing it out by 64 to ensure we will get an accurate length estimate from all implementations. Some callers may need to grow the strbuf again but 64 should be a reasonable enough initial growth. We also no longer silently fail to append to the string when we are faced with a broken vsnprintf implementation. On Solaris 9 this silent failure caused me to no longer be able to execute "git clone" as we tried to exec the empty string rather than "git-clone". Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Resurrect git-revert.sh example and add comment to builtin-revert.cJunio C Hamano2007-11-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | I had to scratch my head for quite some time figuring out why we cannot optimize out write_tree() we do when --no-commit option is given, whose purpose seem to be only to check if the index is unmerged, with a simple loop over the active_cache[]. So add a comment to describe why the write_tree() is there, and resurrect the last scripted version as a reference material in contrib/example directory with others. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-clean: Fix error message if clean.requireForce is not set.Johannes Sixt2007-11-121-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was distracting to see this error message: clean.requireForce set and -n or -f not given; refusing to clean even though clean.requireForce was not set at all. This patch distinguishes the cases and gives a different message depending on whether the configuration variable is not set or set to true. While we are here, we also divert the error messages to stderr. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-svn: support for funky branch and project names over HTTP(S)Eric Wong2007-11-122-2/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | SVN requires that paths be URI-escaped for HTTP(S) repositories. file:// and svn:// repositories do not need these rules. Additionally, accessing individual paths inside repositories (check_path() and get_log() do NOT require escapes to function and in fact it breaks things). Noticed-by: Michael J. Cohen <mjc@cruiseplanners.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation: Fix references to deprecated commandsJonas Fonseca2007-11-122-7/+2
| | | | | | | | | | | | | | | | ... by changing git-tar-tree reference to git-archive and removing seemingly unrelevant footnote about git-ssh-{fetch,upload}. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2007-11-125-2/+18
|\ \ | |/ | | | | | | | | | | | | * maint: for-each-ref: fix off by one read. git-branch: remove mention of non-existent '-b' option git-svn: prevent dcommitting if the index is dirty. Fix memory leak in traverse_commit_list
| * Merge branch 'sp/maint-plug-traverse-commit-list-leak' into maintJunio C Hamano2007-11-121-0/+7
| |\ | | | | | | | | | | | | * sp/maint-plug-traverse-commit-list-leak: Fix memory leak in traverse_commit_list
| | * Fix memory leak in traverse_commit_listShawn O. Pearce2007-11-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we were listing objects too then the objects were buffered in an array only reachable from a stack allocated structure. When this function returns that array would be leaked as nobody would have a reference to it anymore. Historically this hasn't been a problem as the primary user of traverse_commit_list() (the noble git-rev-list) would terminate as soon as the function was finished, thus allowing the operating system to cleanup memory. However we have been leaking this data in git-pack-objects ever since that program learned how to run the revision listing internally, rather than relying on reading object names from git-rev-list. To better facilitate reuse of traverse_commit_list during other builtin tools (such as git-fetch) we shouldn't leak temporary memory like this and instead we need to clean up properly after ourselves. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | for-each-ref: fix off by one read.Christian Couder2007-11-111-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-branch: remove mention of non-existent '-b' optionJeff King2007-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This looks like a cut and paste error from the git-checkout explanation of --no-track. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-svn: prevent dcommitting if the index is dirty.Benoit Sigoure2007-11-112-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dcommit uses rebase to sync the history with what has just been pushed to SVN. Trying to dcommit with a dirty index is troublesome for rebase, so now the user will get an error message if he attempts to dcommit with a dirty index. Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/upload-pack'Junio C Hamano2007-11-112-115/+152
|\ \ \ | | | | | | | | | | | | | | | | * js/upload-pack: upload-pack: Use finish_{command,async}() instead of waitpid().
| * | | upload-pack: Use finish_{command,async}() instead of waitpid().Johannes Sixt2007-11-052-115/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upload-pack spawns two processes, rev-list and pack-objects, and carefully monitors their status so that it can report failure to the remote end. This change removes the complicated procedures on the grounds of the following observations: - If everything is OK, rev-list closes its output pipe end, upon which pack-objects (which reads from the pipe) sees EOF and terminates itself, closing its output (and error) pipes. upload-pack reads from both until it sees EOF in both. It collects the exit codes of the child processes (which indicate success) and terminates successfully. - If rev-list sees an error, it closes its output and terminates with failure. pack-objects sees EOF in its input and terminates successfully. Again upload-pack reads its inputs until EOF. When it now collects the exit codes of its child processes, it notices the failure of rev-list and signals failure to the remote end. - If pack-objects sees an error, it terminates with failure. Since this breaks the pipe to rev-list, rev-list is killed with SIGPIPE. upload-pack reads its input until EOF, then collects the exit codes of the child processes, notices their failures, and signals failure to the remote end. - If upload-pack itself dies unexpectedly, pack-objects is killed with SIGPIPE, and subsequently also rev-list. The upshot of this is that precise monitoring of child processes is not required because both terminate if either one of them dies unexpectedly. This allows us to use finish_command() and finish_async() instead of an explicit waitpid(2) call. The change is smaller than it looks because most of it only reduces the indentation of a large part of the inner loop. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/reset'Junio C Hamano2007-11-112-44/+56
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * js/reset: builtin-reset: avoid forking "update-index --refresh" builtin-reset: do not call "ls-files --unmerged"
| * | | | builtin-reset: avoid forking "update-index --refresh"Johannes Schindelin2007-11-052-24/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of forking update-index, call refresh_cache() directly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | builtin-reset: do not call "ls-files --unmerged"Johannes Schindelin2007-11-052-20/+17
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since reset is a builtin now, it can use the full power of libgit.a and check for unmerged entries itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/parseopt-abbrev-fix'Junio C Hamano2007-11-113-12/+35
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/parseopt-abbrev-fix: parse-options: abbreviation engine fix.
| * | | | parse-options: abbreviation engine fix.Johannes Schindelin2007-11-053-12/+35
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an option could be an ambiguous abbreviation of two options, the code used to error out. Even if an exact match would have occured later. Test and original patch by Pierre Habouzit. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2007-11-113-2/+4
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | * maint: fix index-pack with packs >4GB containing deltas on 32-bit machines git-hash-object should honor config variables gitweb: correct month in date display for atom feeds
| * | | fix index-pack with packs >4GB containing deltas on 32-bit machinesNicolas Pitre2007-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This probably hasn't been properly tested before. Here's a script to create a 8GB repo with the necessary characteristics (copy the test-genrandom executable from the Git build tree to /tmp first): ----- #!/bin/bash git init git config core.compression 0 # create big objects with no deltas for i in $(seq -w 1 2 63) do echo $i /tmp/test-genrandom $i 268435456 > file_$i git add file_$i rm file_$i echo "file_$i -delta" >> .gitattributes done # create "deltifiable" objects in between big objects for i in $(seq -w 2 2 64) do echo "$i $i $i" >> grow cp grow file_$i git add file_$i rm file_$i done rm grow # create a pack with them git commit -q -m "commit of big objects interlaced with small deltas" git repack -a -d ----- Then clone this repo over the Git protocol. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-hash-object should honor config variablesNicolas Pitre2007-11-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... such as core.compression. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | gitweb: correct month in date display for atom feedsVincent Zanotti2007-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | push: teach push to pass --verbose option to transport layerSteffen Prohaska2007-11-113-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A --verbose option to push should also be passed to the transport layer, i.e. git-send-pack, git-http-push. git push is modified to do so. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | push: mention --verbose option in documentationSteffen Prohaska2007-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, only '-v' was documented. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | test-lib.sh: move error line after error() declarationMichele Ballabio2007-11-101-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes a spurious "command not found" error and actually makes the "Test script did not set test_description." string follow the command line option "--no-color". Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | for-each-ref: fix setup of option-parsing for --sortLars Hjemli2007-11-102-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option value for --sort is already a pointer to a pointer to struct ref_sort, so just use it. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2007-11-101-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * maint: print warning/error/fatal messages in one shot
| * | | print warning/error/fatal messages in one shotNicolas Pitre2007-11-091-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | Not doing so is likely to create a messed up display when sent over the sideband protocol. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | core-tutorial.txt: Fix git-show-branch example and its descriptionSergei Organov2007-11-101-2/+15
| | | | | | | | | | | | | | | Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-commit: a bit more testsJunio C Hamano2007-11-101-0/+69
| | | | | | | | | | | | | | | | | | Add tests for -s (sign-off) and multiple -m options Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | builtin-blame: set up the work_tree before the first file accessJohannes Schindelin2007-11-092-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check in cmd_blame() if the specified path is there, but we failed to set up the working tree before that. While at it, make setup_work_tree() just return if it was run before. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | add a howto document about corrupted blob recoveryNicolas Pitre2007-11-091-0/+134
| | | | | | | | | | | | | | | | | | | | | Extracted from a post by Linus on the mailing list. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Documentation: remove documentation for removed tools.Junio C Hamano2007-11-094-169/+0
| | | | | | | | | | | | | | | | | | | | | Old commit walkers other than http/curl transport have been removed for some time now. Remove their documents. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Make check-docs target detect removed commandsJunio C Hamano2007-11-091-3/+27
| | | | | | | | | | | | | | | | | | | | | The maintainer should remember running "make check-docs" from time to time. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Documentation: lost-found is now deprecated.Junio C Hamano2007-11-091-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to mark commands that are deprecated in the command list of the primary manual page git(7), and uses it to mark "git lost-found" and "git tar-tree" as deprecated. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Update draft release notes for 1.5.4Junio C Hamano2007-11-091-2/+24
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2007-11-0911-46/+68
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Start preparing for 1.5.3.6 git-send-email: Change the prompt for the subject of the initial message. SubmittingPatches: improve the 'Patch:' section of the checklist instaweb: Minor cleanups and fixes for potential problems stop t1400 hiding errors in tests Makefile: add missing dependency on wt-status.h refresh_index_quietly(): express "optional" nature of index writing better Fix sed string regex escaping in module_name. Avoid a few unportable, needlessly nested "...`...". git-mailsplit: with maildirs not only process cur/, but also new/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Start preparing for 1.5.3.6Junio C Hamano2007-11-092-1/+22
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>