summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2011-05-06Merge branch 'jn/run-command-error-failure'Libravatar Junio C Hamano1-0/+23
* jn/run-command-error-failure: run-command: handle short writes and EINTR in die_child tests: check error message from run_command
2011-05-06Merge branch 'jk/merge-one-file-working-tree'Libravatar Junio C Hamano1-0/+100
* jk/merge-one-file-working-tree: merge-one-file: fix broken merges with alternate work trees add tests for merge-index / merge-one-file
2011-05-06Merge branch 'jc/fix-diff-files-unmerged'Libravatar Junio C Hamano13-22/+102
* jc/fix-diff-files-unmerged: diff-files: show unmerged entries correctly diff: remove often unused parameters from diff_unmerge() diff.c: return filepair from diff_unmerge() test: use $_z40 from test-lib
2011-05-06Merge branch 'js/blame-parsename'Libravatar Junio C Hamano2-2/+13
* js/blame-parsename: t/annotate-tests: Use echo & cat instead of sed blame: tolerate bogus e-mail addresses a bit better
2011-05-06Merge branch 'jk/format-patch-quote-special-in-from'Libravatar Junio C Hamano1-0/+43
* jk/format-patch-quote-special-in-from: pretty: quote rfc822 specials in email addresses Conflicts: pretty.c t/t4014-format-patch.sh
2011-05-06Merge branch 'nd/struct-pathspec'Libravatar Junio C Hamano1-0/+22
* nd/struct-pathspec: pathspec: rename per-item field has_wildcard to use_wildcard Improve tree_entry_interesting() handling code Convert read_tree{,_recursive} to support struct pathspec Reimplement read_tree_recursive() using tree_entry_interesting()
2011-05-06Merge branch 'aw/maint-rebase-i-p-no-ff'Libravatar Junio C Hamano1-1/+31
* aw/maint-rebase-i-p-no-ff: git-rebase--interactive.sh: preserve-merges fails on merges created with no-ff Conflicts: git-rebase--interactive.sh
2011-05-06Merge branch 'mg/alias-expose-prefix'Libravatar Junio C Hamano1-0/+21
* mg/alias-expose-prefix: handle_alias: provide GIT_PREFIX to !alias t1020: test !alias in subdirectory
2011-05-05Merge branch 'maint'Libravatar Junio C Hamano1-3/+2
* maint: t3701: fix here document git-fast-import.txt: --relative-marks takes no parameter shell: add missing initialization of argv0_path
2011-05-05t3701: fix here documentLibravatar Junio C Hamano1-3/+2
A broken here-document was not caught because end of file is taken by an implicit end of the here document (POSIX does not seem to say it is an error to lack the delimiter), and everything in the test just turned into a single "cat into a file". Noticed-by: Kacper Kornet <draenog@pld-linux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-05t/annotate-tests: Use echo & cat instead of sedLibravatar Brian Gernhardt1-1/+2
The use of the sed command "1i No robots allowed" caused the version of sed in OS X to die with sed: 1: "1i "No robots allowed"\n": command i expects \ followed by text Since this command was just trying to add a single line to the beginning of the file, do the same with "echo" followed by "cat". Unbreaks t8001 and t8002 on OS X 10.6.7 Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-04Merge branch 'ml/test-readme'Libravatar Junio C Hamano1-8/+9
* ml/test-readme: t/README: unify documentation of test function args
2011-05-04Merge branch 'mg/rev-list-count-cherry'Libravatar Junio C Hamano1-0/+27
* mg/rev-list-count-cherry: rev-list --count: separate count for --cherry-mark
2011-05-04Merge branch 'jk/format-patch-multiline-header'Libravatar Junio C Hamano1-0/+15
* jk/format-patch-multiline-header: format-patch: wrap email addresses after long names
2011-05-04Merge branch 'jm/mergetool-submodules'Libravatar Junio C Hamano1-3/+287
* jm/mergetool-submodules: mergetool: Teach about submodules
2011-05-04Merge branch 'jh/dirstat' into maintLibravatar Junio C Hamano6-7/+40
* jh/dirstat: --dirstat: In case of renames, use target filename instead of source filename Teach --dirstat not to completely ignore rearranged lines within a file --dirstat-by-file: Make it faster and more correct --dirstat: Describe non-obvious differences relative to --stat or regular diff
2011-05-04Merge branch 'jk/maint-stash-oob' into maintLibravatar Junio C Hamano1-5/+11
* jk/maint-stash-oob: stash: fix false positive in the invalid ref test. stash: fix accidental apply of non-existent stashes Conflicts: t/t3903-stash.sh
2011-05-04Merge branch 'dm/stash-k-i-p' into maintLibravatar Junio C Hamano2-0/+20
* dm/stash-k-i-p: stash: ensure --no-keep-index and --patch can be used in any order stash: add two more tests for --no-keep-index
2011-05-04Merge branch 'mg/reflog-with-options' into maintLibravatar Junio C Hamano1-0/+18
* mg/reflog-with-options: reflog: fix overriding of command line options t/t1411: test reflog with formats builtin/log.c: separate default and setup of cmd_log_init()
2011-05-04Merge branch 'jk/stash-loosen-safety' into maintLibravatar Junio C Hamano1-4/+16
* jk/stash-loosen-safety: stash: drop dirty worktree check on apply
2011-05-04Merge branch 'ar/clean-rmdir-empty' into maintLibravatar Junio C Hamano1-0/+7
* ar/clean-rmdir-empty: clean: unreadable directory may still be rmdir-able if it is empty
2011-05-04Merge branch 'mg/sha1-path-advise' into maintLibravatar Junio C Hamano1-5/+12
* mg/sha1-path-advise: sha1_name: Suggest commit:./file for path in subdir t1506: factor out test for "Did you mean..."
2011-05-02Merge branch 'jk/notes-ui-updates'Libravatar Junio C Hamano1-0/+38
* jk/notes-ui-updates: contrib/completion: --notes, --no-notes log/pretty-options: Document --[no-]notes and deprecate old notes options revision.c: make --no-notes reset --notes list revision.c: support --notes command-line option notes: refactor display notes default handling notes: refactor display notes extra refs field revision.c: refactor notes ref expansion notes: make expand_notes_ref globally accessible
2011-05-02Merge branch 'ab/i18n-fixup'Libravatar Junio C Hamano36-363/+343
* ab/i18n-fixup: (24 commits) i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811 i18n: use test_i18n{grep,cmp} in t7508 i18n: use test_i18ngrep in t7506 i18n: use test_i18ngrep and test_i18ncmp in t7502 i18n: use test_i18ngrep in t7501 i18n: use test_i18ncmp in t7500 i18n: use test_i18ngrep in t7201 i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110 i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060 i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014 i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507 i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200 i18n: use test_i18ngrep in lib-httpd and t2019 i18n: do not overuse C_LOCALE_OUTPUT (grep) i18n: use test_i18ncmp in t1200 and t2200 i18n: .git file is not a human readable message (t5601) i18n: do not overuse C_LOCALE_OUTPUT i18n: mark init-db messages for translation i18n: mark checkout plural warning for translation i18n: mark checkout --detach messages for translation ...
2011-05-02Merge branch 'nm/submodule-update-force'Libravatar Junio C Hamano1-0/+23
* nm/submodule-update-force: submodule: Add --force option for git submodule update Conflicts: t/t7406-submodule-update.sh
2011-05-02Merge branch 'jh/notes-add-ui'Libravatar Junio C Hamano1-2/+27
* jh/notes-add-ui: Make "git notes add" more user-friendly when there are existing notes Conflicts: builtin/notes.c
2011-05-02Merge branch 'mz/maint-rename-unmerged'Libravatar Junio C Hamano1-0/+62
* mz/maint-rename-unmerged: diffcore-rename: don't consider unmerged path as source
2011-04-29merge-one-file: fix broken merges with alternate work treesLibravatar Jeff King1-2/+2
The merge-one-file tool predates the invention of GIT_WORK_TREE. By the time GIT_WORK_TREE was invented, most people were using the merge-recursive strategy, which handles resolving internally. Therefore these features have had very little testing together. For the most part, merge-one-file just works with GIT_WORK_TREE; most of its heavy lifting is done by plumbing commands which do respect GIT_WORK_TREE properly. The one exception is a shell redirection which touches the worktree directly, writing results to the wrong place in the presence of a GIT_WORK_TREE variable. This means that merges won't even fail; they will silently produce incorrect results, throwing out the entire "theirs" side of files which need content-level merging! This patch makes merge-one-file chdir to the toplevel of the working tree (and exit if we don't have one). This most closely matches the assumption made by the original script (before separate work trees were invented), and matches what happens when the script is called as part of a merge strategy. While we're at it, we'll also error-check the call to cat. Merging a file in a subdirectory could in fact fail, as the redirection relies on the "checkout-index" call just prior to create leading directories. But we never noticed, since we ignored the error return from running cat. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29add tests for merge-index / merge-one-fileLibravatar Jeff King1-0/+100
There were no tests for either, except a brief use in t1200-tutorial. These tools are not used much these days, as most people use the merge-recursive strategy, which handles everything internally. However, they are used by the "octopus" and "resolve" strategies, as well as any custom strategies or merge scripts people have built around them. For example, together with read-tree, they are the simplest way to do a basic content-level merge without checking out the entire repository contents beforehand. This script adds a basic test of the tools to perform one content-level merge. It also shows a failure of the tools to work properly in the face of GIT_WORK_TREE or core.worktree. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29Merge branch 'mg/x-years-12-months' into maintLibravatar Junio C Hamano1-0/+1
* mg/x-years-12-months: date: avoid "X years, 12 months" in relative dates
2011-04-29blame: tolerate bogus e-mail addresses a bit betterLibravatar Josh Stone2-2/+12
The names and e-mails are sanitized by fmt_ident() when creating commits, so that they do not contain "<" nor ">", and the "committer" and "author" lines in the commit object will always be in the form: ("author" | "committer") name SP "<" email ">" SP timestamp SP zone When parsing the email part out, the current code looks for SP starting from the end of the email part, but the author could obfuscate the address as "author at example dot com". We should instead look for SP followed by "<", to match the logic of the side that formats these lines. Signed-off-by: Josh Stone <jistone@redhat.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29t/test-lib.sh: minor readability improvementsLibravatar Mathias Lafeldt1-7/+9
Apply parameter expansion. Also use here document to save test results instead of appending each line with ">>". Signed-off-by: Mathias Lafeldt <misfire@debugon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-28Merge branch 'jc/diff-irreversible-delete'Libravatar Junio C Hamano1-1/+42
* jc/diff-irreversible-delete: git diff -D: omit the preimage of deletes
2011-04-28Merge branch 'jc/rename-degrade-cc-to-c'Libravatar Junio C Hamano1-0/+25
* jc/rename-degrade-cc-to-c: diffcore-rename: fall back to -C when -C -C busts the rename limit diffcore-rename: record filepair for rename src diffcore-rename: refactor "too many candidates" logic builtin/diff.c: remove duplicated call to diff_result_code()
2011-04-28Merge branch 'mz/rebase'Libravatar Junio C Hamano4-9/+88
* mz/rebase: (34 commits) rebase: define options in OPTIONS_SPEC Makefile: do not install sourced rebase scripts rebase: use @{upstream} if no upstream specified rebase -i: remove unnecessary state rebase-root rebase -i: don't read unused variable preserve_merges git-rebase--am: remove unnecessary --3way option rebase -m: don't print exit code 2 when merge fails rebase -m: remember allow_rerere_autoupdate option rebase: remember strategy and strategy options rebase: remember verbose option rebase: extract code for writing basic state rebase: factor out sub command handling rebase: make -v a tiny bit more verbose rebase -i: align variable names rebase: show consistent conflict resolution hint rebase: extract am code to new source file rebase: extract merge code to new source file rebase: remove $branch as synonym for $orig_head rebase -i: support --stat rebase: factor out call to pre-rebase hook ...
2011-04-28Merge branch 'en/merge-recursive'Libravatar Junio C Hamano1-0/+63
* en/merge-recursive: merge-recursive: tweak magic band-aid merge-recursive: When we detect we can skip an update, actually skip it t6022: New test checking for unnecessary updates of files in D/F conflicts t6022: New test checking for unnecessary updates of renamed+modified files
2011-04-28Merge branch 'jh/dirstat'Libravatar Junio C Hamano6-7/+40
* jh/dirstat: --dirstat: In case of renames, use target filename instead of source filename Teach --dirstat not to completely ignore rearranged lines within a file --dirstat-by-file: Make it faster and more correct --dirstat: Describe non-obvious differences relative to --stat or regular diff
2011-04-28git-rebase--interactive.sh: preserve-merges fails on merges created with no-ffLibravatar Andrew Wong1-1/+31
'git rebase' uses 'git merge' to preserve merges (-p). This preserves the original merge commit correctly, except when the original merge commit was created by 'git merge --no-ff'. In this case, 'git rebase' will fail to preserve the merge, because during 'git rebase', 'git merge' will simply fast-forward and skip the commit. For example: B / \ A---M / ---o---O---P---Q If we try to rebase M onto P, we lose the merge commit and this happens: A---B / ---o---O---P---Q To correct this, we simply do a "no fast-forward" on all merge commits when rebasing. Since by the time we decided to do a 'git merge' inside 'git rebase', it means there was a merge originally, so 'git merge' should always create a merge commit regardless of what the merge branches look like. This way, when rebase M onto P from the above example, we get: B / \ A---M / ---o---O---P---Q Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-27Merge branch 'mg/x-years-12-months'Libravatar Junio C Hamano1-0/+1
* mg/x-years-12-months: date: avoid "X years, 12 months" in relative dates
2011-04-27Merge branch 'ef/maint-strbuf-init'Libravatar Junio C Hamano1-1/+1
* ef/maint-strbuf-init: config: support values longer than 1023 bytes strbuf: make sure buffer is zero-terminated
2011-04-27Merge branch 'dm/stash-k-i-p'Libravatar Junio C Hamano2-0/+20
* dm/stash-k-i-p: stash: ensure --no-keep-index and --patch can be used in any order stash: add two more tests for --no-keep-index
2011-04-27Merge branch 'jk/maint-stash-oob'Libravatar Junio C Hamano1-5/+11
* jk/maint-stash-oob: stash: fix false positive in the invalid ref test. stash: fix accidental apply of non-existent stashes Conflicts: t/t3903-stash.sh
2011-04-27Merge branch 'jk/stash-loosen-safety'Libravatar Junio C Hamano1-4/+16
* jk/stash-loosen-safety: stash: drop dirty worktree check on apply
2011-04-27Merge branch 'mh/git-svn-automkdirs'Libravatar Junio C Hamano1-0/+17
* mh/git-svn-automkdirs: git-svn: add an option to skip the creation of empty directories
2011-04-27Merge branch 'mg/reflog-with-options'Libravatar Junio C Hamano1-0/+18
* mg/reflog-with-options: reflog: fix overriding of command line options t/t1411: test reflog with formats builtin/log.c: separate default and setup of cmd_log_init()
2011-04-27Merge branch 'ar/clean-rmdir-empty'Libravatar Junio C Hamano1-0/+7
* ar/clean-rmdir-empty: clean: unreadable directory may still be rmdir-able if it is empty
2011-04-27Merge branch 'mg/sha1-path-advise'Libravatar Junio C Hamano1-5/+12
* mg/sha1-path-advise: sha1_name: Suggest commit:./file for path in subdir t1506: factor out test for "Did you mean..."
2011-04-27handle_alias: provide GIT_PREFIX to !aliasLibravatar Michael J Gruber1-0/+10
Provide an environment variable GIT_PREFIX which contains the subdirectory from which a !alias was called (i.e. 'git rev-parse --show-prefix') since these cd to the to level directory before they are executed. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-27t1020: test !alias in subdirectoryLibravatar Michael J Gruber1-0/+11
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-26pretty: quote rfc822 specials in email addressesLibravatar Jeff King1-0/+42
If somebody has a name that includes an rfc822 special, we will output it literally in the "From:" header. This is usually OK, but certain characters (like ".") are supposed to be enclosed in double-quotes in a mail header. In practice, whether this matters may depend on your MUA. Some MUAs will happily take in: From: Foo B. Bar <author@example.com> without quotes, and properly quote the "." when they send the actual mail. Others may not, or may screw up harder things like: From: Foo "The Baz" Bar <author@example.com> For example, mutt will strip the quotes, thinking they are actual syntactic rfc822 quotes. So let's quote properly, and then (if necessary) we still apply rfc2047 encoding on top of that, which should make all MUAs happy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>