summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-09-02Merge branch 'maint'Libravatar Junio C Hamano1-2/+4
* maint: git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-02Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano1-2/+4
* maint-1.6.3: git-cvsserver: no longer use deprecated 'git-subcommand' commands clone: disconnect transport after fetching
2009-09-02Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano1-2/+4
* maint-1.6.2: clone: disconnect transport after fetching
2009-09-02clone: disconnect transport after fetchingLibravatar Jeff King1-2/+4
The current code just leaves the transport in whatever state it was in after performing the fetch. For a non-empty clone over the git protocol, the transport code already disconnects at the end of the fetch. But for an empty clone, we leave the connection hanging, and eventually close the socket when clone exits. This causes the remote upload-pack to complain "the remote end hung up unexpectedly". While this message is harmless to the clone itself, it is unnecessarily scary for a user to see and may pollute git-daemon logs. This patch just explicitly calls disconnect after we are done with the remote end, which sends a flush packet to upload-pack and cleanly disconnects, avoiding the error message. Other transports are unaffected or slightly improved: - for a non-empty repo over the git protocol, the second disconnect is a no-op (since we are no longer connected) - for "walker" transports (like HTTP or FTP), we actually free some used memory (which previously just sat until the clone process exits) - for "rsync", disconnect is always a no-op anyway Signed-off-by: Jeff King <peff@peff.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-31Merge branch 'lt/approxidate'Libravatar Junio C Hamano1-0/+75
* lt/approxidate: fix approxidate parsing of relative months and years tests: add date printing and parsing tests refactor test-date interface Add date formatting and parsing functions relative to a given time Further 'approxidate' improvements Improve on 'approxidate' Conflicts: date.c
2009-08-31Merge branch 'mr/gitweb-snapshot'Libravatar Junio C Hamano3-66/+152
* mr/gitweb-snapshot: gitweb: add t9501 tests for checking HTTP status codes gitweb: split test suite into library and tests gitweb: improve snapshot error handling
2009-08-30fix approxidate parsing of relative months and yearsLibravatar Jeff King1-2/+2
These were broken by b5373e9. The problem is that the code marks the month and year with "-1" for "we don't know it yet", but the month and year code paths were not adjusted to fill in the current time before doing their calculations (whereas other units follow a different code path and are fine). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-30tests: add date printing and parsing testsLibravatar Jeff King1-0/+75
Until now, there was no coverage of relative date printing or approxidate parsing routines (mainly because we had no way of faking the "now" time for relative date calculations, which made consistent testing impossible). This new script tries to exercise the basic features of show_date and approxidate. Most of the tests are just "this obvious thing works" to prevent future regressions, with a few exceptions: - We confirm the fix in 607a9e8 that relative year/month dates in the latter half of a year round correctly. - We confirm that the improvements in b5373e9 and 1bddb25 work. - A few tests are marked to expect failure, which are regressions recently introduced by the two commits above. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29Sync with 1.6.4.2Libravatar Junio C Hamano1-2/+0
2009-08-29Remove unused t/t8005/iso8859-5.txtLibravatar Nanako Shiraishi1-2/+0
This file is no longer used since 54bc13c (t8005: Nobody writes Russian in shift_jis, 2009-06-18). Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28Merge branch 'mm/reset-report'Libravatar Junio C Hamano1-1/+2
* mm/reset-report: reset: make the reminder output consistent with "checkout" Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.
2009-08-28Merge branch 'jk/maint-1.6.3-checkout-unborn'Libravatar Junio C Hamano1-0/+40
* jk/maint-1.6.3-checkout-unborn: checkout: do not imply "-f" on unborn branches
2009-08-28Merge branch 'np/maint-1.6.3-deepen'Libravatar Junio C Hamano1-0/+47
* np/maint-1.6.3-deepen: fix simple deepening of a repo Conflicts: t/t5500-fetch-pack.sh
2009-08-28Merge branch 'jc/shortstatus'Libravatar Junio C Hamano1-0/+58
* jc/shortstatus: git commit --dry-run -v: show diff in color when asked Documentation/git-commit.txt: describe --dry-run wt-status: collect untracked files in a separate "collect" phase Make git_status_config() file scope static to builtin-commit.c wt-status: move wt_status_colors[] into wt_status structure wt-status: move many global settings to wt_status structure commit: --dry-run status: show worktree status of conflicted paths separately wt-status.c: rework the way changes to the index and work tree are summarized diff-index: keep the original index intact diff-index: report unmerged new entries
2009-08-28t/test-lib.sh: provide a shell implementation of the 'yes' utilityLibravatar Brandon Casey1-0/+15
Some platforms (IRIX 6.5, Solaris 7) do not provide the 'yes' utility. Currently, some tests, including t7610 and t9001, try to call this program. Due to the way the tests are structured, the tests still pass even though this program is missing. Rather than succeeding by chance, let's provide an implementation of the simple 'yes' utility in shell for all platforms to use. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27gitweb: add t9501 tests for checking HTTP status codesLibravatar Mark Rada1-0/+78
Adds a new test file, t9501, that checks HTTP status codes and messages from gitweb. Currently, the only tests are for the snapshot feature. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27gitweb: split test suite into library and testsLibravatar Mark Rada2-66/+74
To accommodate additions to the test cases for gitweb, the preamble from t9500 is now in its own library so that new sets of tests for gitweb can use the same setup without copying the code. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27Merge branch 'as/maint-graph-interesting-fix'Libravatar Junio C Hamano2-0/+307
* as/maint-graph-interesting-fix: Add tests for rev-list --graph with options that simplify history graph API: fix bug in graph_is_interesting()
2009-08-27Merge branch 'jh/submodule-foreach'Libravatar Junio C Hamano1-0/+237
* jh/submodule-foreach: git clone: Add --recursive to automatically checkout (nested) submodules t7407: Use 'rev-parse --short' rather than bash's substring expansion notation git submodule status: Add --recursive to recurse into nested submodules git submodule update: Introduce --recursive to update nested submodules git submodule foreach: Add --recursive to recurse into nested submodules git submodule foreach: test access to submodule name as '$name' Add selftest for 'git submodule foreach' git submodule: Cleanup usage string and add option parsing to cmd_foreach() git submodule foreach: Provide access to submodule name, as '$name' Conflicts: Documentation/git-submodule.txt git-submodule.sh
2009-08-27Merge branch 'jc/maint-unpack-objects-strict'Libravatar Junio C Hamano1-0/+35
* jc/maint-unpack-objects-strict: Fix "unpack-objects --strict" Conflicts: builtin-unpack-objects.c
2009-08-27Merge branch 'nd/sparse' (early part)Libravatar Junio C Hamano1-0/+31
* 'nd/sparse' (early part): Prevent diff machinery from examining assume-unchanged entries on worktree
2009-08-26Merge branch 'maint'Libravatar Junio C Hamano1-9/+9
* maint: git-log: allow --decorate[=short|full] Minor improvement to the write-tree documentation git-bisect: call the found commit "*the* first bad commit"
2009-08-26git-log: allow --decorate[=short|full]Libravatar Lars Hjemli2-0/+35
Commit de435ac0 changed the behavior of --decorate from printing the full ref (e.g., "refs/heads/master") to a shorter, more human-readable version (e.g., just "master"). While this is nice for human readers, external tools using the output from "git log" may prefer the full version. This patch introduces an extension to --decorate to allow the caller to specify either the short or the full versions. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26git-bisect: call the found commit "*the* first bad commit"Libravatar Nanako Shiraishi1-9/+9
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26Merge branch 'jc/maint-clean-nested-dir-safety' into maintLibravatar Junio C Hamano1-0/+39
* jc/maint-clean-nested-dir-safety: clean: require double -f options to nuke nested git repository and work tree
2009-08-26Merge branch 'jk/maint-merge-msg-fix' into maintLibravatar Junio C Hamano3-3/+63
* jk/maint-merge-msg-fix: merge: indicate remote tracking branches in merge message merge: fix incorrect merge message for ambiguous tag/branch add tests for merge message headings
2009-08-26Merge branch 'jc/apply-epoch-patch' into maintLibravatar Junio C Hamano1-0/+95
* jc/apply-epoch-patch: apply: notice creation/removal patches produced by GNU diff
2009-08-26Merge branch 'jp/symlink-dirs' into maintLibravatar Junio C Hamano1-0/+93
* jp/symlink-dirs: t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite git-checkout: be careful about untracked symlinks lstat_cache: guard against full match of length of 'name' parameter Demonstrate bugs when a directory is replaced with a symlink
2009-08-26Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano1-0/+11
* maint-1.6.3: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
2009-08-26Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3Libravatar Junio C Hamano1-0/+11
* tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
2009-08-25Merge branch 'aj/fix-read-tree-from-scratch'Libravatar Junio C Hamano1-0/+25
* aj/fix-read-tree-from-scratch: read-tree: Fix regression with creation of a new index file.
2009-08-25Merge branch 'jc/maint-checkout-index-to-prefix'Libravatar Junio C Hamano1-0/+9
* jc/maint-checkout-index-to-prefix: check_path(): allow symlinked directories to checkout-index --prefix
2009-08-25Merge branch 'jl/submodule-summary-diff-files'Libravatar Junio C Hamano1-0/+22
* jl/submodule-summary-diff-files: Documentaqtion/git-submodule.txt: Typofix git submodule summary: add --files option
2009-08-25Merge branch 'lh/short-decorate'Libravatar Junio C Hamano2-0/+35
* lh/short-decorate: git-log: allow --decorate[=short|full]
2009-08-25checkout: do not imply "-f" on unborn branchesLibravatar Jeff King1-0/+40
When checkout sees that HEAD points to a non-existent ref, it currently acts as if "-f" was given; this behavior dates back to 5a03e7f, which enabled checkout from unborn branches in the shell version of "git-checkout". The reasoning given is to avoid the code path which tries to merge the tree contents. When checkout was converted to C, this code remained intact. The unfortunate side effect of this strategy is that the "force" code path will overwrite working tree and index state that may be precious to the user. Instead of enabling "force", this patch uses the normal "merge" codepath for an unborn branch, but substitutes the empty tree for the "old" commit. This means that in the absence of an index, any files in the working tree will be treated as untracked files, and a checkout which would overwrite them is aborted. Similarly, any paths in the index will be merged with an empty entry as the base, meaning that unless the new branch's content is identical to what's in the index, there will be a conflict and the checkout will be aborted. The user is then free to correct the situation or proceed with "-f" as appropriate. This patch also removes the "warning: you are on a branch yet to be born" message. Its function was to warn the user that we were enabling the "-f" option. Since we are no longer doing that, there is no reason for the user to care whether we are switching away from an unborn branch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-24fix simple deepening of a repoLibravatar Nicolas Pitre1-1/+46
If all refs sent by the remote repo during a fetch are reachable locally, then no further conversation is performed with the remote. This check is skipped when the --depth argument is provided to allow the deepening of a shallow clone which corresponding remote repo has no changed. However, some additional filtering was added in commit c29727d5 to remove those refs which are equal on both sides. If the remote repo has not changed, then the list of refs to give the remote process becomes empty and simply attempting to deepen a shallow repo always fails. Let's stop being smart in that case and simply send the whole list over when that condition is met. The remote will do the right thing anyways. Test cases for this issue are also provided. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-24Add tests for rev-list --graph with options that simplify historyLibravatar Adam Simpkins1-0/+276
These tests help make sure graph_is_interesting() is doing the right thing. Signed-off-by: Adam Simpkins <simpkins@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-21reset: make the reminder output consistent with "checkout"Libravatar Matthieu Moy1-1/+2
git reset without argument displays a summary of the local modification, like this: $ git reset Makefile: locally modified Some people have problems with this; they look like an error message. This patch makes its output mimic how "git checkout $another_branch" reports the paths with local modifications. "git add --refresh --verbose" is changed in the same way. It also adds a header to make it clear that the output is informative, and not an error. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
2009-08-21Merge branch 'bc/maint-am-email' into maintLibravatar Junio C Hamano1-0/+15
* bc/maint-am-email: git-am: print fair error message when format detection fails am: allow individual e-mail files as input
2009-08-21Merge branch 'cc/replace'Libravatar Junio C Hamano1-0/+200
* cc/replace: t6050: check pushing something based on a replaced commit Documentation: add documentation for "git replace" Add git-replace to .gitignore builtin-replace: use "usage_msg_opt" to give better error messages parse-options: add new function "usage_msg_opt" builtin-replace: teach "git replace" to actually replace Add new "git replace" command environment: add global variable to disable replacement mktag: call "check_sha1_signature" with the replacement sha1 replace_object: add a test case object: call "check_sha1_signature" with the replacement sha1 sha1_file: add a "read_sha1_file_repl" function replace_object: add mechanism to replace objects found in "refs/replace/" refs: add a "for_each_replace_ref" function
2009-08-21Merge branch 'gb/apply-ignore-whitespace'Libravatar Junio C Hamano1-0/+185
* gb/apply-ignore-whitespace: git apply: option to ignore whitespace differences
2009-08-21Merge branch 'bc/mailsplit-cr-at-eol'Libravatar Junio C Hamano1-2/+24
* bc/mailsplit-cr-at-eol: Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used builtin-mailinfo,builtin-mailsplit: use strbufs strbuf: add new function strbuf_getwholeline()
2009-08-21graph API: fix bug in graph_is_interesting()Libravatar Adam Simpkins1-0/+31
Previously, graph_is_interesting() did not behave quite the same way as the code in get_revision(). As a result, it would sometimes think commits were uninteresting, even though get_revision() would return them. This resulted in incorrect lines in the graph output. This change creates a get_commit_action() function, which graph_is_interesting() and simplify_commit() both now use to determine if a commit will be shown. It is identical to the old simplify_commit() behavior, except that it never calls rewrite_parents(). This problem was reported by Santi BĂ©jar. The following command would exhibit the problem before, but now works correctly: git log --graph --simplify-by-decoration --oneline v1.6.3.3 Previously git graph did not display the output for this command correctly between f29ac4f and 66996ec, among other places. Signed-off-by: Adam Simpkins <simpkins@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-21Merge branch 'jc/maint-merge-recursive-fix' into maintLibravatar Junio C Hamano1-0/+55
* jc/maint-merge-recursive-fix: merge-recursive: don't segfault while handling rename clashes
2009-08-21Merge branch 'sb/maint-pull-rebase' into maintLibravatar Junio C Hamano1-0/+13
* sb/maint-pull-rebase: pull: support rebased upstream + fetch + pull --rebase t5520-pull: Test for rebased upstream + fetch + pull --rebase
2009-08-21Make test number t7406- uniqueLibravatar Johannes Sixt1-0/+0
We skip t7407 because a patch series is cooking that uses is. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-20git clone: Add --recursive to automatically checkout (nested) submodulesLibravatar Johan Herland1-0/+12
Many projects using submodules expect all submodules to be checked out in order to build/work correctly. A common command sequence for developers on such projects is: git clone url/to/project cd project git submodule update --init (--recursive) This patch introduces the --recursive option to git-clone. The new option causes git-clone to recursively clone and checkout all submodules of the cloned project. Hence, the above command sequence can be reduced to: git clone --recursive url/to/project --recursive is ignored if no checkout is done by the git-clone. The patch also includes documentation and a selftest. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-20t7407: Use 'rev-parse --short' rather than bash's substring expansion notationLibravatar Johan Herland1-2/+4
The substring expansion notation is a bashism that we have not so far adopted. Use 'git rev-parse --short' instead, as this also handles the case where the unique abbreviation is longer than 7 characters. Also fix the typo; the object name for submodule #2 was copied from submodule #1's by mistake. Suggested-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix'Libravatar Junio C Hamano1-0/+11
* tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
2009-08-18git submodule status: Add --recursive to recurse into nested submodulesLibravatar Johan Herland1-0/+26
In very large and hierarchically structured projects, one may encounter nested submodules. In these situations, it is valuable to not only show status for all the submodules in the current repo (which is what is currently done by 'git submodule status'), but also to show status for all submodules at all levels (i.e. recursing into nested submodules as well). This patch teaches the new --recursive option to the 'git submodule status' command. The patch also includes documentation and selftests. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>