summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-18Makefile: make gcov invocation configurableLibravatar Thomas Rast1-1/+2
If you customize CC to use a different version of gcc, most likely you also need to use a different version of gcov. Make it configurable. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: Add a note about the dangers of coverage chasingLibravatar Ævar Arnfjörð Bjarmason1-0/+9
Having no coverage at all is almost always a bad sign, but trying to attain 100% coverage everywhere is usually a waste of time. Add a paragraph to explain this to future test writers. Inspired-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: A new section about test coverageLibravatar Ævar Arnfjörð Bjarmason1-0/+42
Document how test writers can generate coverage reports, to ensure that their tests are really testing the code they think they're testing. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18Makefile: Add cover_db_html targetLibravatar Ævar Arnfjörð Bjarmason2-0/+5
Add a target to generate a detailed HTML report for the entire Git codebase using Devel::Cover's cover(1) tool. Output it in cover_db_html instead of the default cover_db, so that it isn't mixed up with our raw report files. The target depends on the coverage-report-cover-db target, it may be run redundantly if it was previously run. But the HTML output won't be affected by running gcov2perl twice, so I didn't try to avoid that small redundancy. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18Makefile: Add cover_db targetLibravatar Ævar Arnfjörð Bjarmason2-0/+5
Add a target to convert the *.gcov files to a Devel::Cover database. That database can subsequently be formatted by the cover(1) tool which is included with Devel::Cover. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18Makefile: Split out the untested functions targetLibravatar Ævar Arnfjörð Bjarmason1-0/+2
Change the coverage-report target so that it doesn't generate the coverage-untested-functions file by default. I'm adding more targets for doing various things with the gcov files, and they shouldn't all run by default. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18Makefile: Include subdirectories in "make cover" reportsLibravatar Ævar Arnfjörð Bjarmason1-3/+11
We generate profiling files in all the $(OBJECTS) dirs. Aggregate results from there, and add them to the corresponding clean target. Also expand the gcov arguments. Generate reports for things like "x() || y()" using --all-blocks, and add --preserve-paths since we're profiling in subdirectories now. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18gitignore: Ignore files generated by "make coverage"Libravatar Ævar Arnfjörð Bjarmason1-0/+4
The "make coverage" support added by Thomas Rast in 901c369af5 didn't contain a corresponding patch to patch .gitignore. Change gitignore to ignore the *.gcda, *.gcno and *.gcov files generated by GCC and our coverage invocations. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: Add SMOKE_{COMMENT,TAGS}= to smoke_report targetLibravatar Ævar Arnfjörð Bjarmason2-0/+13
The smoke server supports a free form text field with comments about a report, and a comma delimited list of tags. Change the smoke_report target to expose this functionality. Now smokers can send more data that explains and categorizes the reports they're submitting. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/Makefile: Can't include GIT-BUILD-OPTIONS, it's a .shLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change the smoke testing portion of t/Makefile not to include GIT-BUILD-OPTIONS. It's a shellscript, not a Makefile snippet, so it had the nasty side-effect of sneaking e.g. SHELL_PATH = '/bin/sh' (with quotes) everywhere. Just add our own PERL_PATH variable as a workaround. The t/Makefile already has e.g. an equivalent SHELL_PATH and TAR option which duplicate the definitions in GIT-BUILD-OPTIONS. Reported-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: Document the Smoke testingLibravatar Ævar Arnfjörð Bjarmason1-0/+66
Git now has a smoke testing service at http://smoke.git.nix.is that anyone can send reports to. Change the t/README file to mention this. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18tests: Infrastructure for Git smoke testingLibravatar Ævar Arnfjörð Bjarmason2-1/+55
Add the capability to send smoke reports from the Git test suite. Currently we only notice bugs in the test suite when it's run manually. Bugs in Git that only occur on obscure platforms or setups that the core developers aren't using can thus go unnoticed. This series aims to change that. With it, anyone that's interested in avoiding bitrot in Git can volunteer to run a smoke tester. A smoke tester periodically compiles the latest version of Git, runs the test suite, and submits a report to a central server indicating how the test run went. A smoke tester might run something like this in cron: #!/bin/sh cd ~/g/git git fetch for branch in maint master next pu; do git checkout origin/$i && make clean all && cd t && make smoke_report done The smoker might want to compile git with non-default flags, include bisecting functionality or run the tests under valgrind. Doing that is outside the scope of this patch, this just adds a report submission mechanism. But including a canonical smoke runner is something we'll want to include eventually. What this does now is add smoke and smoke_report targets to t/Makefile (this example only uses a few tests for demonstration): $ make clean smoke rm -f -r 'trash directory'.* test-results rm -f t????/cvsroot/CVSROOT/?* rm -f -r valgrind/bin rm -f .prove perl ./harness --git-version="1.7.2.1.173.gc9b40" \ --no-verbose \ --archive="test-results/git-smoke.tar.gz" \ t0000-basic.sh t0001-init.sh t0002-gitfile.sh t0003-attributes.sh t0004-unwritable.sh t0005-signals.sh t0006-date.sh t0000-basic.sh ....... ok t0001-init.sh ........ ok t0002-gitfile.sh ..... ok t0003-attributes.sh .. ok t0004-unwritable.sh .. ok t0005-signals.sh ..... ok t0006-date.sh ........ ok All tests successful. Test Summary Report ------------------- t0000-basic.sh (Wstat: 0 Tests: 46 Failed: 0) TODO passed: 5 Files=7, Tests=134, 3 wallclock secs ( 0.06 usr 0.05 sys + 0.23 cusr 1.33 csys = 1.67 CPU) Result: PASS TAP Archive created at /home/avar/g/git/t/test-results/git-smoke.tar.gz The smoke target uses TAP::Harness::Archive to aggregate the test results into a tarball. The tarball contains two things, the output of every test file that was run, and a metadata file: Tarball contents: $ tar xzvf git-smoke.tar.gz t0004-unwritable.sh t0001-init.sh t0002-gitfile.sh t0005-signals.sh t0000-basic.sh t0003-attributes.sh t0006-date.sh meta.yml A test report: $ cat t0005-signals.sh ok 1 - sigchain works # passed all 1 test(s) 1..1 A metadata file: --- extra_properties: file_attributes: - description: t0000-basic.sh end_time: 1280437324.61398 start_time: 1280437324.22186 - description: t0001-init.sh end_time: 1280437325.12346 start_time: 1280437324.62393 - description: t0002-gitfile.sh end_time: 1280437325.29428 start_time: 1280437325.13646 - description: t0003-attributes.sh end_time: 1280437325.59678 start_time: 1280437325.30565 - description: t0004-unwritable.sh end_time: 1280437325.77376 start_time: 1280437325.61003 - description: t0005-signals.sh end_time: 1280437325.85426 start_time: 1280437325.78727 - description: t0006-date.sh end_time: 1280437326.2362 start_time: 1280437325.86768 file_order: - t0000-basic.sh - t0001-init.sh - t0002-gitfile.sh - t0003-attributes.sh - t0004-unwritable.sh - t0005-signals.sh - t0006-date.sh start_time: 1280437324 stop_time: 1280437326 The "extra_properties" hash is where we'll stick Git-specific info, like whether Git was compiled with gettext or the fallback regex engine, and what branch we're compiling. Currently no metadata like this is included. The entire tarball is then submitted to a central smokebox at smoke.git.nix.is. This is done with curl(1) via the "smoke_report" target: $ make smoke_report curl \ -H "Expect: " \ -F project=Git \ -F architecture=x86_64 \ -F platform=Linux \ -F revision="1.7.2.1.173.gc9b40" \ -F report_file=@test-results/git-smoke.tar.gz \ http://smoke.git.nix.is/app/projects/process_add_report/1 \ | grep -v ^Redirecting % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 117k 100 63 100 117k 3 6430 0:00:21 0:00:18 0:00:03 0 Reported #8 added. Reports are then made available on the smokebox via a web interface: http://smoke.git.nix.is/app/projects/smoke_reports/1 The smoke reports are also mirrored to a Git repository hosted on GitHub: http://github.com/gitsmoke/smoke-reports The Smolder SQLite database that contains metadata about the reports is also made available: http://github.com/gitsmoke/smoke-database Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18test-lib: Multi-prereq support only checked the last prereqLibravatar Ævar Arnfjörð Bjarmason2-4/+23
The support for multiple test prerequisites added by me in "test-lib: Add support for multiple test prerequisites" was broken. The for iterated over each prerequisite and returned true/false within a case statement, but since it missed a return statement only the last prerequisite in the list of prerequisites was ever considered, the rest were ignored. Fix that by changing the test_have_prereq code to something less clever that keeps a count of the total prereqs and the ones we have and compares the count at the end. This comes with the added advantage that it's easy to list the missing prerequisites in the test output, implement that while I'm at it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18tests: A SANITY test prereq for testing if we're rootLibravatar Ævar Arnfjörð Bjarmason9-32/+24
Some tests depend on not being able to write to files after chmod -w. This doesn't work when running the tests as root. Change test-lib.sh to test if this works, and if so it sets a new SANITY test prerequisite. The tests that use this previously failed when run under root. There was already a test for this in t3600-rm.sh, added by Junio C Hamano in 2283645 in 2006. That check now uses the new SANITY prerequisite. Some of this was resurrected from the "Tests in Cygwin" thread in May 2009: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18t/README: Document the predefined test prerequisitesLibravatar Ævar Arnfjörð Bjarmason1-5/+40
The README for the test library suggested that you grep the test-lib.sh for test_set_prereq to see what the preset prerequisites were. Remove that bit, and write a section explaining all the preset prerequisites. Most of the text was lifted from from Junio C Hamano and Johannes Sixt, See the "Tests in Cygwin" thread in May 2009 for the originals: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118434 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18test-lib: Print missing prerequisites in test outputLibravatar Ævar Arnfjörð Bjarmason1-1/+1
Change the test output to print needed prerequisites as part of the TAP. This makes it easy to see at a glance why a test was skipped. Before: ok 7 # skip <message> ok 9 # skip <message> After: ok 7 # skip <message> (prereqs: DONTHAVEIT) ok 9 # skip <message> (prereqs: HAVEIT,DONTHAVEIT) This'll also be useful for smoke testing output, where the developer reading the output may not be familiar with the system where tests are being skipped. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18test-lib: Add support for multiple test prerequisitesLibravatar Ævar Arnfjörð Bjarmason3-6/+37
Change the test_have_prereq function in test-lib.sh to support a comma-separated list of prerequisites. This is useful for tests that need e.g. both POSIXPERM and SANITY. The implementation was stolen from Junio C Hamano and Johannes Sixt, the tests and documentation were not. See the "Tests in Cygwin" thread in May 2009 for the originals: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118434 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-18test-lib: Don't write test-results when HARNESS_ACTIVELibravatar Ævar Arnfjörð Bjarmason1-10/+13
TAP harnesses don't need to read test-results/*, since they keep track of the number of passing/failing tests internally. Skip the generation of these files when HARNESS_ACTIVE is set. It's now possible to run the Git test suite without writing anything to the t/ directory at all if you use a TAP harness and the --root switch: cd t sudo mount -t tmpfs none /tmp/memory -o size=300m prove -j9 ./t[0-9]*.sh :: --root=/tmp/memory The I/O that the ~500 test-results/* files contributed was very minimal, but I thought this was worth mentioning. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12Merge branch 'jc/sha1-name-find-fix'Libravatar Junio C Hamano1-10/+11
* jc/sha1-name-find-fix: sha1_name.c: fix parsing of ":/token" syntax Conflicts: sha1_name.c
2010-08-12Merge branch 'jn/doc-pull'Libravatar Junio C Hamano1-11/+54
* jn/doc-pull: Documentation: flesh out “git pull” description
2010-08-12Merge branch 'jn/maint-gitweb-dynconf'Libravatar Junio C Hamano1-4/+4
* jn/maint-gitweb-dynconf: gitweb: allow configurations that change with each request
2010-08-12Merge branch 'bc/use-more-hardlinks-in-install'Libravatar Junio C Hamano1-3/+12
* bc/use-more-hardlinks-in-install: Makefile: make hard/symbolic links for non-builtins too Makefile: link builtins residing in bin directory to main git binary too
2010-08-12Merge branch 'tr/rfc-reset-doc'Libravatar Junio C Hamano1-169/+178
* tr/rfc-reset-doc: Documentation/reset: move "undo permanently" example behind "make topic" Documentation/reset: reorder examples to match description Documentation/reset: promote 'examples' one section up Documentation/reset: separate options by mode Documentation/git-reset: reorder modes for soft-mixed-hard progression
2010-08-12Merge branch 'jn/parse-date-basic'Libravatar Junio C Hamano2-8/+7
* jn/parse-date-basic: Export parse_date_basic() to convert a date string to timestamp
2010-08-12Merge branch 'sp/fix-smart-http-deadlock-on-error'Libravatar Junio C Hamano1-2/+3
* sp/fix-smart-http-deadlock-on-error: smart-http: Don't deadlock on server failure
2010-08-12Merge branch 'maint'Libravatar Junio C Hamano8-13/+21
* maint: push: mention "git pull" in error message for non-fast forwards Standardize do { ... } while (0) style t/t7003: replace \t with literal tab in sed expression index-pack: Don't follow replace refs.
2010-08-12push: mention "git pull" in error message for non-fast forwardsLibravatar Matthieu Moy1-2/+2
The message remains fuzzy to include "git pull", "git pull --rebase" and others, but directs the user to the simplest solution in the vast majority of cases. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12Standardize do { ... } while (0) styleLibravatar Jonathan Nieder4-10/+10
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12t/t7003: replace \t with literal tab in sed expressionLibravatar Brandon Casey1-1/+1
The sed utilities on IRIX and Solaris do not interpret the sequence '\t' to mean a tab character; they read a literal character 't'. So, use a literal tab instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-12index-pack: Don't follow replace refs.Libravatar Nelson Elhage2-0/+8
Without this, attempting to index a pack containing objects that have been replaced results in a fatal error that looks like: fatal: SHA1 COLLISION FOUND WITH <replaced-object> ! Signed-off-by: Nelson Elhage <nelhage@ksplice.com> Acked-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11Merge branch 'maint'Libravatar Junio C Hamano6-7/+130
* maint: post-receive-email: remove spurious commas in email subject fast-import: export correctly marks larger than 2^20-1 t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH diff: strip extra "/" when stripping prefix
2010-08-11post-receive-email: remove spurious commas in email subjectLibravatar Matthieu Moy1-1/+1
The previous form produced subjects like [SCM] project.git branch, foo, updated. ... The new one will produce the lighter [SCM] project.git branch foo updated. ... Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11fast-import: export correctly marks larger than 2^20-1Libravatar Raja R Harinath2-1/+58
dump_marks_helper() has a bug when dumping marks larger than 2^20-1, i.e., when the sparse array has more than two levels. The bug was that the 'base' counter was being shifted by 20 bits at level 3, and then again by 10 bits at level 2, rather than a total shift of 20 bits in this argument to the recursive call: (base + k) << m->shift There are two ways to fix this correctly, the elegant: (base + k) << 10 and the one I chose due to edit distance: base + (k << m->shift) Signed-off-by: Raja R Harinath <harinath@hurrynot.org> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATHLibravatar Ævar Arnfjörð Bjarmason1-3/+2
Change the git-svn tests to use $PERL_PATH, not the "perl" in $PATH. Using perl in $PATH was added by Sam Vilain in v1.6.6-rc0~95^2~3, Philippe Bruhat introduced $PERL_PATH to the test suite in v1.6.6-rc0~9^2, but the lib-git-svn.sh tests weren't updated to use the new convention. This resulted in the git-svn tests always being skipped on my system. My /usr/bin/perl has access to SVN::Core and SVN::Repos, but the perl in my $PATH does not. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-11diff: strip extra "/" when stripping prefixLibravatar Jakub Narebski2-2/+69
There are two ways a user might want to use "diff --relative": 1. For a file in a directory, like "subdir/file", the user can use "--relative=subdir/" to strip the directory. 2. To strip part of a filename, like "foo-10", they can use "--relative=foo-". We currently handle both of those situations. However, if the user passes "--relative=subdir" (without the trailing slash), we produce inconsistent results. For the unified diff format, we collapse the double-slash of "a//file" correctly into "a/file". But for other formats (raw, stat, name-status), we end up with "/file". We can do what the user means here and strip the extra "/" (and only a slash). We are not hurting any existing users of (2) above with this behavior change because the existing output for this case was nonsensical. Patch by Jakub, tests and commit message by Jeff King. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Merge branch 'maint'Libravatar Junio C Hamano17-41/+123
* maint: gitweb: clarify search results page when no matching commit found Documentation: add a FILES section for show-ref Makefile: add missing dependency on http.h Makefile: add missing dependencies on url.h Documentation/git-log: Clarify --full-diff git-rebase: fix typo when parsing --force-rebase imap-send: Fix sprintf usage prune: allow --dry-run for -n and --verbose for -v notes: allow --dry-run for -n and --verbose for -v Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C Documentation: cite git-am from git-apply t7003: fix subdirectory-filter test Allow "check-ref-format --branch" from subdirectory check-ref-format: handle subcommands in separate functions pretty-options.txt: match --format's documentation with implementation.
2010-08-09gitweb: clarify search results page when no matching commit foundLibravatar Jonathan Nieder1-4/+5
When searching commits for a string that never occurs, the results page looks something like this: projects / foo.git / search \o/ summary | ... | tree [commit] search: [ kfjdkas ] [ ]re first ⋅ prev ⋅ next Merge branch 'maint' Foo: a demonstration project Without a list of hits to compare it to, the header describing the commit named by the hash parameter (usually HEAD) may itself look like a hit. Add some text (“No match.”) to replace the empty list of hits and avoid this confusion. While at it, remove some nearby dead code, left behind from a simplification a few years ago (v1.5.4-rc0~276^2~4, 2007-11-01). Noticed-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Documentation: add a FILES section for show-refLibravatar Jonathan Nieder1-1/+7
A peek at where the refs are kept might help understanding, even if, as the DESCRIPTION section suggests, direct access is not part of the public API. Balance that out with a pointer to update-ref. Suggested-by: Geoff Russell <geoffrey.russell@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Makefile: add missing dependency on http.hLibravatar Jonathan Nieder1-1/+1
v1.7.1-rc0~65^2~2 (http: init and cleanup separately from http-walker, 2010-03-02) introduced a direct dependency from http-fetch on the HTTP request library. Declare it. Detected with "make CHECK_HEADER_DEPENDENCIES=1". Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Makefile: add missing dependencies on url.hLibravatar Jonathan Nieder1-0/+1
v1.7.2-rc0~56^2 and its parent (decode file:// and ssh:// URLs, 2010-05-23) introduced a new url library. Update the Makefile with the relevant dependencies. Detected with "make CHECK_HEADER_DEPENDENCIES=1". Cc: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Documentation/git-log: Clarify --full-diffLibravatar Michael J Gruber1-0/+3
The current description gives the impression that "--full-diff" affects "log -p" only. Make it clearer that it affects all diff-based output types. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09git-rebase: fix typo when parsing --force-rebaseLibravatar Willy Tarreau1-1/+1
Due to two missing hyphens, The "force" keyword on the command line would be taken as an alias for the --force-rebase option. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09imap-send: Fix sprintf usageLibravatar Ævar Arnfjörð Bjarmason1-4/+8
When composing a command for the imap server, imap-send uses a single nfsnprintf() invocation for brevity instead of dealing separately with the case when there is a message to be sent and the case when there isn’t. The unused argument in the second case, while valid, is confusing for static analyzers and human readers. v1.6.4-rc0~117 (imap-send: add support for IPv6, 2009-05-25) mistakenly used %hu as the format for an int “port”, by analogy with existing usage for the unsigned short “addr.sin_port”.  Use %d instead. Noticed with clang. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09prune: allow --dry-run for -n and --verbose for -vLibravatar René Scharfe2-3/+4
For consistency with other git commands, let git prune accept the long options --dry-run and --verbose for the respective short ones -n and -v. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09notes: allow --dry-run for -n and --verbose for -vLibravatar René Scharfe2-2/+5
For consistency with other git commands, let the prune subcommand of git notes accept the long options --dry-run and --verbose for the respective short ones -n and -v. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Merge branch 'webrick' of git://git.bogomips.org/git-svnLibravatar Junio C Hamano1-25/+45
* 'webrick' of git://git.bogomips.org/git-svn: instaweb: add access+error logging for WEBrick instaweb: minimize moving parts for WEBrick instaweb: fix WEBrick server support
2010-08-09Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -CLibravatar Matthieu Moy2-6/+31
These options take an optional argument, but this optional argument was not documented. Original patch by Matthieu Moy, but documentation for -B mostly copied from the explanations of Junio C Hamano. While we're there, fix a typo in a comment in diffcore.h. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09Documentation: cite git-am from git-applyLibravatar Brad King1-0/+10
Users reading git-apply documentation may also be interested in git-am, especially after receiving an email created with git-format-patch. The documentation for git-am already references git-apply. Add the reverse. Signed-off-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-09t7003: fix subdirectory-filter testLibravatar Thomas Rast1-1/+2
The test would not fail if the filtering failed to do anything, since in test -z "$(git diff HEAD directorymoved:newsubdir)"' 'directorymoved:newsubdir' is not valid, so git-diff fails without printing anything on stdout. But then the exit status of git-diff is lost, whereas test -z "" succeeds. Use 'git diff --exit-code' instead, which does the right thing and has the added bonus of showing the differences if there are any. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-06smart-http: Don't deadlock on server failureLibravatar Shawn O. Pearce1-2/+3
If the remote HTTP server fails (e.g. returns 404 or 500) when we posted the RPC to it, we won't have sent anything to the background Git process that is supposed to handle the stream. Because we didn't send anything, its waiting for input from remote-curl, and remote-curl cannot read its response payload because doing so would lead to a deadlock. Send the background task EOF on its input before we try to read its response back, that way it will break out of its read loop and terminate. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>