summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-11-14Merge branch 'jc/maint-add-sync-stat'Junio C Hamano
* jc/maint-add-sync-stat: t2200: test more cases of "add -u" git-add: make the entry stat-clean after re-adding the same contents ce_match_stat, run_diff_files: use symbolic constants for readability Conflicts: builtin-add.c
2007-11-14Merge branch 'mh/retag'Junio C Hamano
* mh/retag: Add tests for git tag Reuse previous annotation when overwriting a tag
2007-11-14Merge branch 'jc/stash-create'Junio C Hamano
* jc/stash-create: git-stash: Fix listing stashes git-merge: no reason to use cpio anymore Revert "rebase: allow starting from a dirty tree." rebase: allow starting from a dirty tree. stash: implement "stash create"
2007-11-14Merge branch 'bg/format-patch-N'Junio C Hamano
* bg/format-patch-N: Rearrange git-format-patch synopsis to improve clarity. format-patch: Test --[no-]numbered and format.numbered format-patch: Add configuration and off switch for --numbered
2007-11-14Merge branch 'np/progress'Junio C Hamano
* np/progress: nicer display of thin pack completion make display of total transferred fully accurate remove dead code from the csum-file interface git-fetch: be even quieter. make display of total transferred more accurate sideband.c: ESC is spelled '\033' not '\e' for portability. fix display overlap between remote and local progress
2007-11-14Merge branch 'js/rebase-detached'Junio C Hamano
* js/rebase-detached: rebase: fix "rebase --continue" breakage rebase: operate on a detached HEAD
2007-11-14Merge branch 'rs/pretty'Junio C Hamano
* rs/pretty: Fix preprocessor logic that determines the availablity of strchrnul(). Simplify strchrnul() compat code --format=pretty: avoid calculating expensive expansions twice add strbuf_adddup() --pretty=format: parse commit message only once --pretty=format: on-demand format expansion Add strchrnul()
2007-11-14Merge branch 'rr/cvsexportcommit-w'Junio C Hamano
* rr/cvsexportcommit-w: cvsexportcommit: Add switch to specify CVS workdir
2007-11-14Merge branch 'gh/cvsimport-user'Junio C Hamano
* gh/cvsimport-user: git-cvsimport: fix handling of user name when it is not set in CVSROOT
2007-11-14user-manual: minor rewording for clarity.Sergei Organov
Junio screwed up when applying the previous round of the patch; rewording from "previous" to "old" does make the description clearer. Also revert the rewording from head to branch. The description is talking about the branch's tip commit and using the word head is clearer. Based on input from Sergei and Bruce. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14Merge branch 'maint'Junio C Hamano
* 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
2007-11-14Fix dependencies of parse-options test programAlex Riesen
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>
2007-11-14user-manual.txt: fix a few mistakesSergei Organov
Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14git-clean: honor core.excludesfileJunio C Hamano
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>
2007-11-14Documentation: Fix man page breakage with DocBook XSL v1.72Jonas Fonseca
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>
2007-11-14Handle broken vsnprintf implementations in strbufShawn O. Pearce
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>
2007-11-14git-remote.txt: fix typoSergei Organov
Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14core-tutorial.txt: Fix argument mistake in an example.Sergei Organov
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>
2007-11-14replace reference to git-rm with git-reset in git-commit docJing Xue
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>
2007-11-14Grammar fixes for gitattributes documentationWincent Colaiuta
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>
2007-11-14Don't allow fast-import tree delta chains to exceed maximum depthShawn O. Pearce
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>
2007-11-13Resurrect git-revert.sh example and add comment to builtin-revert.cJunio C Hamano
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>
2007-11-13revert/cherry-pick: allow starting from dirty work tree.Junio C Hamano
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>
2007-11-13t/t3404: fix test for a bogus todo file.Junio C Hamano
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>
2007-11-13Fix preprocessor logic that determines the availablity of strchrnul().Johannes Sixt
Apart from the error in the condition (&& should actually be ||), the construct #if !defined(A) || !A leads to a syntax error in the C preprocessor if A is indeed not defined. Tested-by: David Symonds <dsymonds@gmail.com> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-13git-clean: Fix error message if clean.requireForce is not set.Johannes Sixt
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>
2007-11-13rebase: fix "rebase --continue" breakageJohannes Schindelin
The --skip case was handled properly when rebasing without --merge, but the --continue case was not. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-12git-svn: support for funky branch and project names over HTTP(S)Eric Wong
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>
2007-11-12Documentation: Fix references to deprecated commandsJonas Fonseca
... 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>
2007-11-12Merge branch 'maint'Junio C Hamano
* 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
2007-11-12Merge branch 'sp/maint-plug-traverse-commit-list-leak' into maintJunio C Hamano
* sp/maint-plug-traverse-commit-list-leak: Fix memory leak in traverse_commit_list
2007-11-12for-each-ref: fix off by one read.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-12git-branch: remove mention of non-existent '-b' optionJeff King
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>
2007-11-12git-svn: prevent dcommitting if the index is dirty.Benoit Sigoure
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>
2007-11-12t2200: test more cases of "add -u"Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11Merge branch 'js/upload-pack'Junio C Hamano
* js/upload-pack: upload-pack: Use finish_{command,async}() instead of waitpid().
2007-11-11Merge branch 'js/reset'Junio C Hamano
* js/reset: builtin-reset: avoid forking "update-index --refresh" builtin-reset: do not call "ls-files --unmerged"
2007-11-11Merge branch 'js/parseopt-abbrev-fix'Junio C Hamano
* js/parseopt-abbrev-fix: parse-options: abbreviation engine fix.
2007-11-11Merge branch 'maint'Junio C Hamano
* 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
2007-11-11push: teach push to pass --verbose option to transport layerSteffen Prohaska
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>
2007-11-11push: mention --verbose option in documentationSteffen Prohaska
Before this commit, only '-v' was documented. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11Simplify strchrnul() compat codeAndreas Ericsson
strchrnul() was introduced in glibc in April 1999 and included in glibc-2.1. Checking for that version means the majority of all git users would get to use the optimized version in glibc. Of the remaining few some might get to use a slightly slower version than necessary but probably not slower than what we have today. Unfortunately, __GLIBC_PREREQ() macro was not available in glibc 2.1.1 which was short lived but already supported strchrnul(). Odd minority users of that library needs to live with our compatibility inline version. Rediffed-against-next-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11fix index-pack with packs >4GB containing deltas on 32-bit machinesNicolas Pitre
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>
2007-11-11git-hash-object should honor config variablesNicolas Pitre
... such as core.compression. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11--format=pretty: avoid calculating expensive expansions twiceRené Scharfe
As Jeff King remarked, format strings with duplicate placeholders can be slow to expand, because each instance is calculated anew. This patch makes use of the fact that format_commit_message() and its helper functions only ever add stuff to the end of the strbuf. For certain expensive placeholders, store the offset and length of their expansion with the strbuf at the first occurrence. Later they expansion result can simply be copied from there -- no malloc() or strdup() required. These certain placeholders are the abbreviated commit, tree and parent hashes, as the search for a unique abbreviated hash is quite costly. Here are the times for next (best of three runs): $ time git log --pretty=format:%h >/dev/null real 0m0.611s user 0m0.404s sys 0m0.204s $ time git log --pretty=format:%h%h%h%h >/dev/null real 0m1.206s user 0m0.744s sys 0m0.452s And here those with this patch (and the previous two); the speedup of the single placeholder case is just noise: $ time git log --pretty=format:%h >/dev/null real 0m0.608s user 0m0.416s sys 0m0.192s $ time git log --pretty=format:%h%h%h%h >/dev/null real 0m0.639s user 0m0.488s sys 0m0.140s Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11add strbuf_adddup()René Scharfe
Add a new function, strbuf_adddup(), that appends a duplicate of a part of a struct strbuf to end of the latter. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11--pretty=format: parse commit message only onceRené Scharfe
As Jeff King pointed out, some placeholder expansions are related to each other: the steps to calculate one go most of the way towards calculating the other, too. This patch makes format_commit_message() parse the commit message only once, remembering the position of each item. This speeds up handling of format strings containing multiple placeholders from the set %s, %a*, %c*, %e, %b. Here are the timings for the git version in next. The first one is to estimate the overhead of the caching, the second one is taken from http://svn.tue.mpg.de/tentakel/trunk/tentakel/Makefile as an example of a format string found in the wild. The times are the fastest of three consecutive runs in each case: $ time git log --pretty=format:%e >/dev/null real 0m0.381s user 0m0.340s sys 0m0.024s $ time git log --pretty=format:"* %cd %cn%n%n%s%n%b" >/dev/null real 0m0.623s user 0m0.556s sys 0m0.052s And here the times with this patch: $ time git log --pretty=format:%e >/dev/null real 0m0.385s user 0m0.332s sys 0m0.040s $ time git log --pretty=format:"* %cd %cn%n%n%s%n%b" >/dev/null real 0m0.563s user 0m0.504s sys 0m0.048s Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-10gitweb: correct month in date display for atom feedsVincent Zanotti
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-10test-lib.sh: move error line after error() declarationMichele Ballabio
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>
2007-11-10for-each-ref: fix setup of option-parsing for --sortLars Hjemli
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>