summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2009-06-18t4150: test applying with a newline in subjectLibravatar Stephen Boyd1-0/+8
Commit 4b7cc26 (git-am: use printf instead of echo on user-supplied strings, 2007-05-25) fixed a bug where subjects with newlines would cause git-am to echo multiple lines when it says "Applying: <subject>". This test ensures that fix stays valid. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-13Merge branch 'mh/fix-send-email-threaded'Libravatar Junio C Hamano1-0/+21
* mh/fix-send-email-threaded: send-email: fix a typo in a comment send-email: fix threaded mails without chain-reply-to add a test for git-send-email for threaded mails without chain-reply-to doc/send-email: clarify the behavior of --in-reply-to with --no-thread send-email: fix non-threaded mails add a test for git-send-email for non-threaded mails
2009-06-13Merge branch 'rc/http-push'Libravatar Junio C Hamano2-0/+44
* rc/http-push: (22 commits) http*: add helper methods for fetching objects (loose) http*: add helper methods for fetching packs http: use new http API in fetch_index() http*: add http_get_info_packs http-push.c::fetch_symref(): use the new http API http-push.c::remote_exists(): use the new http API http.c::http_fetch_ref(): use the new http API transport.c::get_refs_via_curl(): use the new http API http.c: new functions for the http API http: create function end_url_with_slash http*: move common variables and macros to http.[ch] transport.c::get_refs_via_curl(): do not leak refs_url Don't expect verify_pack() callers to set pack_size http-push: do not SEGV after fetching a bad pack idx file http*: copy string returned by sha1_to_hex http-walker: verify remote packs http-push, http-walker: style fixes t5550-http-fetch: test fetching of packed objects http-push: fix missing "#ifdef USE_CURL_MULTI" around "is_running_queue" http-push: send out fetch requests on queue ...
2009-06-13Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano1-0/+12
* 'cc/bisect' (early part): t6030: test skipping away from an already skipped commit bisect: when skipping, choose a commit away from a skipped commit bisect: add parameters to "filter_skipped" bisect: display first bad commit without forking a new process bisect: drop unparse_commit() and use clear_commit_marks()
2009-06-13Merge branch 'cb/maint-no-double-merge'Libravatar Junio C Hamano1-0/+3
* cb/maint-no-double-merge: refuse to merge during a merge
2009-06-13Merge branch 'ph/submodule-rebase' (early part)Libravatar Junio C Hamano1-0/+140
* 'ph/submodule-rebase' (early part): Rename submodule.<name>.rebase to submodule.<name>.update git-submodule: add support for --rebase. Conflicts: Documentation/git-submodule.txt git-submodule.sh
2009-06-13Merge branch 'nw/maint-cvsexportcommit'Libravatar Junio C Hamano1-0/+18
* nw/maint-cvsexportcommit: git-cvsexportcommit can't commit files which have been removed from CVS
2009-06-12Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threadedLibravatar Junio C Hamano1-0/+10
* mh/maint-fix-send-email-threaded: doc/send-email: clarify the behavior of --in-reply-to with --no-thread send-email: fix non-threaded mails add a test for git-send-email for non-threaded mails Conflicts: git-send-email.perl t/t9001-send-email.sh
2009-06-12send-email: fix threaded mails without chain-reply-toLibravatar Markus Heidelberg1-1/+1
An earlier commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) broke logic to set up threading information for the next message by rewriting "!" to "not" without understanding the precedence rules of the language. Namely, ! defined $reply_to || length($reply_to) == 0 was changed to not defined $reply_to || length($reply_to) == 0 which is not (defined $reply_to || length($reply_to) == 0) and different from what was intended, which is (not defined $reply_to) || (length($reply_to) == 0) Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12add a test for git-send-email for threaded mails without chain-reply-toLibravatar Markus Heidelberg1-0/+11
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12send-email: fix non-threaded mailsLibravatar Markus Heidelberg1-1/+1
After commit 3e0c4ff (send-email: respect in-reply-to regardless of threading, 2009-03-01) the variable $thread was only used for prompting for an "In-Reply-To", but not for controlling whether the "In-Reply-To" and "References" fields should be written into the email. Thus these fields were always used beginning with the second mail and it was not possible to produce non-threaded mails anymore. However, a later commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) introduced a regression with the side effect to make non-threaded mails possible again, but only when --no-chain-reply-to was used. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-12add a test for git-send-email for non-threaded mailsLibravatar Markus Heidelberg1-0/+10
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-09send-email: use UTF-8 rather than utf-8 for consistencyLibravatar Brandon Casey1-4/+4
The rest of the git source has been converted to use upper-case character encoding names to assist older platforms. The charset attribute of MIME is defined to be case-insensitive, but older platforms may still have an easier time dealing with upper-case rather than lower-case. So do so for send-email too. Update t9001 to handle the changes. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06t6030: test skipping away from an already skipped commitLibravatar Christian Couder1-0/+12
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06t5550-http-fetch: test fetching of packed objectsLibravatar Tay Ray Chuan1-0/+8
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06http-push: send out fetch requests on queueLibravatar Tay Ray Chuan1-2/+2
Previously, requests for remote files were simply added to the queue (pointed to by request_queue_head) and no transfer actually takes place (the fill function add_fill_function() is not added until line 2441), even though code that followed may rely on these remote files to be present (eg. the setup_revisions invocation). The code that sends out the requests on the request queue is refactored into the method run_request_queue. After the get_dav_remote_heads invocation (ie. after fetch requests are added to the queue), the requests on the queue are sent out through an invocation to run_request_queue. This invocation to run_request_queue entails adding a fill function before pushing checks take place, which may lead to accidental, unwanted pushes previously. The flag is_running_queue is introduced to prevent this from occurring. fill_active_slot is made to check the flag is_running_queue before the sending of the requests proceeds. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06t5540-http-push: test fetching of packed objectsLibravatar Tay Ray Chuan1-0/+20
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06t5540-http-push: test fetching of loose objectsLibravatar Tay Ray Chuan1-0/+16
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03Merge branch 'da/pretty-tempname'Libravatar Junio C Hamano1-0/+9
* da/pretty-tempname: diff: generate pretty filenames in prep_temp_blob() compat: add a basename() compatibility function compat: add a mkstemps() compatibility function Conflicts: Makefile
2009-06-03Merge branch 'maint'Libravatar Junio C Hamano2-0/+21
* maint: blame: correctly handle a path that used to be a directory add -i: do not dump patch during application Update draft release notes for 1.6.3.2 grep: fix colouring of matches with zero length Documentation: teach stash/pop workflow instead of stash/apply Change xdl_merge to generate output even for null merges t6023: merge-file fails to output anything for a degenerate merge
2009-06-03blame: correctly handle a path that used to be a directoryLibravatar Junio C Hamano1-0/+15
When trying to see if the same path exists in the parent, we ran "diff-tree" with pathspec set to the path we are interested in with the parent, and expect either to have exactly one resulting filepair (either "changed from the parent", "created when there was none") or nothing (when there is no change from the parent). If the path used to be a directory, however, we will also see unbounded number of entries that talk about the files that used to exist underneath the directory in question. Correctly pick only the entry that describes the path we are interested in in such a case (namely, the creation of the path as a regular file). Noticed by Ben Willard. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03Rename submodule.<name>.rebase to submodule.<name>.updateLibravatar Johan Herland1-8/+8
The addition of "submodule.<name>.rebase" demonstrates the usefulness of alternatives to the default behaviour of "git submodule update". However, by naming the config variable "submodule.<name>.rebase", and making it a boolean choice, we are artificially constraining future git versions that may want to add _more_ alternatives than just "rebase". Therefore, while "submodule.<name>.rebase" is not yet in a stable git release, future-proof it, by changing it from submodule.<name>.rebase = true/false to submodule.<name>.update = rebase/checkout where "checkout" specifies the default behaviour of "git submodule update" (checking out the new commit to a detached HEAD), and "rebase" specifies the --rebase behaviour (where the current local branch in the submodule is rebase onto the new commit). Thus .update == checkout is equivalent to .rebase == false, and .update == rebase is equivalent to .rebase == true. Finally, leaving .update unset is equivalent to leaving .rebase unset. In future git versions, other alternatives to "git submodule update" behaviour can be included by adding them to the list of allowable values for the submodule.<name>.update variable. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-02Merge branch 'cb/maint-1.6.0-xdl-merge-fix' into maintLibravatar Junio C Hamano1-0/+6
* cb/maint-1.6.0-xdl-merge-fix: Change xdl_merge to generate output even for null merges t6023: merge-file fails to output anything for a degenerate merge Conflicts: xdiff/xmerge.c
2009-06-02Merge branch 'rs/maint-grep-word-regexp-fix' into maintLibravatar Junio C Hamano1-1/+8
* rs/maint-grep-word-regexp-fix: grep: fix colouring of matches with zero length grep: fix word-regexp at the beginning of lines
2009-06-02Merge branch 'sb/maint-1.6.2-opt-filename-fix' into maintLibravatar Junio C Hamano3-0/+84
* sb/maint-1.6.2-opt-filename-fix: apply, fmt-merge-msg: use relative filenames commit: -F overrides -t
2009-06-02Merge branch 'jc/maint-add-p-coalesce-fix' into maintLibravatar Junio C Hamano1-0/+38
* jc/maint-add-p-coalesce-fix: t3701: ensure correctly set up repository after skipped tests Revert "git-add--interactive: remove hunk coalescing" Splitting a hunk that adds a line at the top fails in "add -p"
2009-06-01test-lib: fix http exit codesLibravatar Clemens Buchacher1-2/+4
Previously, die() would report the exit code of stop_httpd. Instead, save and reset the exit code before dying. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01test-lib: allow exit trap to be used for cleanup by testsLibravatar Clemens Buchacher1-7/+14
Exit trap should not be removed in case tests require cleanup code. This is especially important if tests are executed with the --immediate option. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01test-lib: fail if invalid options are passedLibravatar Clemens Buchacher1-1/+1
Previously, unknown options would be ignored, including any subsequent valid options. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01refuse to merge during a mergeLibravatar Clemens Buchacher1-0/+3
The following is an easy mistake to make for users coming from version control systems with an "update and commit"-style workflow. 1. git pull 2. resolve conflicts 3. git pull Step 3 overrides MERGE_HEAD, starting a new merge with dirty index. IOW, probably not what the user intended. Instead, refuse to merge again if a merge is in progress. Reported-by: Dave Olszewski <cxreg@pobox.com> Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31diff: generate pretty filenames in prep_temp_blob()Libravatar David Aguilar1-0/+9
Naturally, prep_temp_blob() did not care about filenames. As a result, GIT_EXTERNAL_DIFF and textconv generated filenames such as ".diff_XXXXXX". This modifies prep_temp_blob() to generate user-friendly filenames when creating temporary files. Diffing "name.ext" now generates "XXXXXX_name.ext". Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-31Merge branch 'sb/opt-filename'Libravatar Junio C Hamano1-2/+17
* sb/opt-filename: parse-opts: add OPT_FILENAME and transition builtins parse-opts: prepare for OPT_FILENAME Conflicts: builtin-log.c
2009-05-31Merge branch 'jc/mktree'Libravatar Junio C Hamano1-0/+71
* jc/mktree: mktree: validate entry type in input mktree --batch: build more than one tree object mktree --missing: updated usage message and man page mktree --missing: allow missing objects t1010: add mktree test mktree: do not barf on a submodule commit builtin-mktree.c: use a helper function to handle one line of input mktree: use parse-options build-in git-mktree
2009-05-31Merge branch 'ew/svn-test-and-old-i18n'Libravatar Junio C Hamano13-82/+82
* ew/svn-test-and-old-i18n: t8005: fix typo, it's ISO-8859-5, not KOI8-R t8005: convert CP1251 character set to ISO8859-5 t8005: use more portable character encoding names t5100: use ancient encoding syntax for backwards compatibility t9301: use ISO8859-1 rather than ISO-8859-1 t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility t3901: avoid negation on right hand side of '|' builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding builtin-mailinfo.c: compare character encodings case insensitively Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility t3900: use ancient iconv names for backward compatibility
2009-05-31Merge branch 'cc/bisect' (early part)Libravatar Junio C Hamano1-12/+1
* 'cc/bisect' (early part): bisect: check ancestors without forking a "git rev-list" process commit: add function to unparse a commit and its parents bisect: rework some rev related functions to make them more reusable
2009-05-31git-add: no need for -f when resolving a conflict in already tracked pathLibravatar Jeff King1-0/+12
When a path F that matches ignore pattern has a conflict, "git add F" insisted the -f option be given, which did not make sense. It would have required -f when the path was originally added, but when resolving a conflict, it already is tracked. So this should work (and does): $ echo file >.gitignore $ echo content >file $ git add -f file ;# need -f because we are adding new path $ echo more content >>file $ git add file ;# don't need -f; it is not actually an "other" file This is handled under the hood by the COLLECT_IGNORED option to read_directory. When that code finds an ignored file, it checks the index to make sure it is not actually a tracked file. However, the test it uses does not take into account unmerged entries, and considers them to still be ignored. "git ls-files" uses a more elaborate test and gets the right answer and the same test should be used here. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-30t9139 uses ancient, backwards-compatible iconv namesLibravatar Eric Wong13-82/+82
This resolves a semantic conflicts early to work with 5ae93df (t3900: use ancient iconv names for backward compatibility, 2009-05-18). Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-30Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano1-0/+47
* git://git.bogomips.org/git-svn: git-svn: refuse to dcommit non-UTF-8 messages
2009-05-29Merge branch 'sb/maint-1.6.2-opt-filename-fix'Libravatar Junio C Hamano3-0/+84
* sb/maint-1.6.2-opt-filename-fix: apply, fmt-merge-msg: use relative filenames commit: -F overrides -t
2009-05-29Merge branch 'jc/maint-add-p-coalesce-fix'Libravatar Junio C Hamano1-0/+38
* jc/maint-add-p-coalesce-fix: t3701: ensure correctly set up repository after skipped tests Revert "git-add--interactive: remove hunk coalescing" Splitting a hunk that adds a line at the top fails in "add -p"
2009-05-29Merge branch 'rs/maint-grep-word-regexp-fix'Libravatar Junio C Hamano1-1/+8
* rs/maint-grep-word-regexp-fix: grep: fix word-regexp at the beginning of lines
2009-05-29t9120: don't expect failure with SVN_HTTPD_PORT unsetLibravatar Stephen Boyd1-11/+6
The test still passes when SVN_HTTPD_PORT is not set. Futhermore, t9115 and t9118 don't check if SVN_HTTPD_PORT is set even though they both use start_httpd() from lib-git-svn.sh. Admittedly, the test is not very meaningful without SVN_HTTPD_PORT, as commit f5530b (support for funky branch and project names over HTTP(S) 2007-11-11) states that the URI escaping is only done over HTTP(S). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-28git-cvsexportcommit can't commit files which have been removed from CVSLibravatar Nick Woolley1-0/+18
If a file X is removed from CVS, it goes into the Attic directory, and CVS reports it as 'no file X' but with status 'Up-to-date'. cvsexportcommit misinterprets this as an existing file and tries to commit a file with the same name. Correctly identify these files, so that new files with the same name can be committed. Add a test to t9200-git-cvsexportcommit.sh, which tests that we can re-commit a removed filename which remains in CVS's attic. This adds a file 'attic_gremlin' in CVS, then "removes" it, then tries to commit a file with the same name from git. Signed-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-28Merge branch 'maint'Libravatar Junio C Hamano1-0/+10
* maint: fix segfault showing an empty remote
2009-05-28git-svn: refuse to dcommit non-UTF-8 messagesLibravatar Eric Wong1-0/+47
...without i18n.commitencoding set in the config. SVN tries to store all commit messages in UTF-8, however it is up to the job of the clients to enforce this rule. SVN servers themselves do not always enforce this; allowing clients to commit malformed UTF-8 messages and break repositories. So git-svn will enforce this and tell the user to set i18n.commitencoding when a git commit is is not in UTF-8. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-05-27fix segfault showing an empty remoteLibravatar Clemens Buchacher1-0/+10
In case of an empty list, the search for its tail caused a NULL-pointer dereference. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Reported-by: Erik Faye-Lund <kusmabite@googlemail.com> Acked-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27t8005: fix typo, it's ISO-8859-5, not KOI8-RLibravatar Brandon Casey1-1/+1
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-27t5500: Modernize test styleLibravatar Stephen Boyd1-127/+149
Code outside of the test harness was emitting "Initializing..." from git-init. Fixup this test to be more modern: - test_expect_object_count() and count_objects() are unused - use grep directly instead of test "..." = $(grep ...) - end the test_expect_success line with a single-quote and put the test on a new line - put as much code inside the test harness as possible - no_strict_count_check is unused and duplicates the test "new object count" - use && whenever possible to catch errors early - use test_tick instead of GIT_AUTHOR_DATE=$sec - remove debugging aid log.txt - use subshells instead of cd-ing around Also merge the pull test into one large test. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-05-25Merge branch 'jm/format-patch-no-auto-n-when-k-is-given' into maintLibravatar Junio C Hamano1-0/+7
* jm/format-patch-no-auto-n-when-k-is-given: format-patch let -k override a config-specified format.numbered
2009-05-25Merge branch 'do/maint-merge-recursive-fix' into maintLibravatar Junio C Hamano1-0/+95
* do/maint-merge-recursive-fix: merge-recursive: never leave index unmerged while recursing