summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-09-07Merge branch 'jc/mailinfo-scissors'Libravatar Junio C Hamano8-8/+265
* jc/mailinfo-scissors: mailinfo.scissors: new configuration am/mailinfo: Disable scissors processing by default Documentation: describe the scissors mark support of "git am" Teach mailinfo to ignore everything before -- >8 -- mark builtin-mailinfo.c: fix confusing internal API to mailinfo()
2009-09-07Merge branch 'jk/clone-b'Libravatar Junio C Hamano1-0/+68
* jk/clone-b: clone: add --branch option to select a different HEAD
2009-09-07Merge branch 'jc/upload-pack-hook'Libravatar Junio C Hamano1-0/+69
* jc/upload-pack-hook: upload-pack: feed "kind [clone|fetch]" to post-upload-pack hook upload-pack: add a trigger for post-upload-pack hook
2009-09-07Merge branch 'tr/reset-checkout-patch'Libravatar Junio C Hamano5-0/+291
* tr/reset-checkout-patch: stash: simplify defaulting to "save" and reject unknown options Make test case number unique tests: disable interactive hunk selection tests if perl is not available DWIM 'git stash save -p' for 'git stash -p' Implement 'git stash save --patch' Implement 'git checkout --patch' Implement 'git reset --patch' builtin-add: refactor the meat of interactive_add() Add a small patch-mode testing library git-apply--interactive: Refactor patch mode code Make 'git stash -k' a short form for 'git stash save --keep-index'
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-09-01stash: simplify defaulting to "save" and reject unknown optionsLibravatar Matthieu Moy1-0/+11
With the earlier DWIM patches, certain combination of options defaulted to the "save" command correctly while certain equally valid combination did not. For example, "git stash -k" were Ok but "git stash -q -k" did not work. This makes the logic of defaulting to "save" much simpler. If there are no non-flag arguments, it is clear that there is no command word, and we default to "save" subcommand. This rule prevents "git stash -q apply" from quietly creating a stash with "apply" as the message. This also teaches "git stash save" to reject an unknown option. This is to keep a mistyped "git stash save --quite" from creating a stash with a message "--quite", and this safety is more important with the new logic to default to "save" with any option-looking argument without an explicit comand word. [jc: this is based on Matthieu's 3-patch series, and a follow-up discussion, and he and Peff take all the credit; if I have introduced bugs while reworking, they are mine.] Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> 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-28upload-pack: feed "kind [clone|fetch]" to post-upload-pack hookLibravatar Junio C Hamano1-2/+22
A request to clone the repository does not give any "have" but asks for all the refs we offer with "want". When a request does not ask to clone the repository fully, but asks to fetch some refs into an empty repository, it will not give any "have" but its "want" won't ask for all the refs we offer. If we suppose (and I would say this is a rather big if) that it makes sense to distinguish these two cases, a hook cannot reliably do this alone. The hook can detect lack of "have" and bunch of "want", but there is no direct way to tell if the other end asked for all refs we offered, or merely most of them. Between the time we talked with the other end and the time the hook got called, we may have acquired more refs or lost some refs in the repository by concurrent operations. Given that we plan to introduce selective advertisement of refs with a protocol extension, it would become even more difficult for hooks to guess between these two cases. This adds "kind [clone|fetch]" to hook's input, as a stable interface to allow the hooks to tell these cases apart. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-28upload-pack: add a trigger for post-upload-pack hookLibravatar Junio C Hamano1-0/+49
After upload-pack successfully finishes its operation, post-upload-pack hook can be called for logging purposes. The hook is passed various pieces of information, one per line, from its standard input. Currently the following items can be fed to the hook, but more types of information may be added in the future: want SHA-1:: 40-byte hexadecimal object name the client asked to include in the resulting pack. Can occur one or more times in the input. have SHA-1:: 40-byte hexadecimal object name the client asked to exclude from the resulting pack, claiming to have them already. Can occur zero or more times in the input. time float:: Number of seconds spent for creating the packfile. size decimal:: Size of the resulting packfile in bytes. 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-27Make test case number uniqueLibravatar Johannes Sixt1-0/+0
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26am/mailinfo: Disable scissors processing by defaultLibravatar Junio C Hamano6-10/+105
You can enable it by giving --scissors to "git am". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26Teach mailinfo to ignore everything before -- >8 -- markLibravatar Junio C Hamano5-1/+163
This teaches mailinfo the scissors -- >8 -- mark; the command ignores everything before it in the message body. For lefties among us, we also support -- 8< -- ;-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26clone: add --branch option to select a different HEADLibravatar Jeff King1-0/+68
We currently point the HEAD of a newly cloned repo to the same ref as the parent repo's HEAD. While a user can then "git checkout -b foo origin/foo" whichever branch they choose, it is more convenient and more efficient to tell clone which branch you want in the first place. Based on a patch by Kirill A. Korinskiy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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