summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2010-01-28grep --quiet: finishing touchesJunio C Hamano
Name the option "--quiet" not "--quick", document it, and add tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28reject @{-1} not at beginning of object nameJeff King
Something like foo@{-1} is nonsensical, as the @{-N} syntax is reserved for "the Nth last branch", and is not an actual reflog selector. We should not feed such nonsense to approxidate at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28fix parsing of @{-1}@{u} combinationJeff King
Previously interpret_branch_name would see @{-1} and stop parsing, leaving the @{u} as cruft that provoked an error. Instead, we should recurse if there is more to parse. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28test combinations of @{} syntaxJeff King
Now that we have several different types of @{} syntax, it is a good idea to test them together, which reveals some failures. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28t0101: use absolute dateJeff King
The original version used relative approxidates, which don't reproduce as reliably as absolute ones. Commit 6c647a fixed this for one case, but missed the "silly" case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28tests: update tests that used to failJunio C Hamano
"diff --cc" output t4038 tests was fixed by b810cbb (diff --cc: a lost line at the beginning of the file is shown incorrectly, 2009-07-22), which was actually the commit that introduced this test.. An error in "git merge -s resolve" t6035 tests was fixed by 730f728 (unpack-trees.c: look ahead in the index, 2009-09-20). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-27Merge branch 'jc/upstream-reflog'Junio C Hamano
* jc/upstream-reflog: Fix log -g this@{upstream}
2010-01-27Merge branch 'jc/maint-reflog-bad-timestamp'Junio C Hamano
* jc/maint-reflog-bad-timestamp: t0101: use a fixed timestamp when searching in the reflog Update @{bogus.timestamp} fix not to die() approxidate_careful() reports errorneous date string
2010-01-27Merge branch 'jh/maint-config-file-prefix'Junio C Hamano
* jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
2010-01-27t0101: use a fixed timestamp when searching in the reflogJunio C Hamano
That will give us a better reproducibility during tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-27Merge branch 'jl/diff-submodule-ignore'Junio C Hamano
* jl/diff-submodule-ignore: Teach diff --submodule that modified submodule directory is dirty git diff: Don't test submodule dirtiness with --ignore-submodules Make ce_uptodate() trustworthy again
2010-01-26fix portability issues with $ in double quotesStephen Boyd
Using a dollar sign in double quotes isn't portable. Escape them with a backslash or replace the double quotes with single quotes. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26approxidate_careful() reports errorneous date stringJunio C Hamano
For a long time, the time based reflog syntax (e.g. master@{yesterday}) didn't complain when the "human readable" timestamp was misspelled, as the underlying mechanism tried to be as lenient as possible. The funny thing was that parsing of "@{now}" even relied on the fact that anything not recognized by the machinery returned the current timestamp. Introduce approxidate_careful() that takes an optional pointer to an integer, that gets assigned 1 when the input does not make sense as a timestamp. As I am too lazy to fix all the callers that use approxidate(), most of the callers do not take advantage of the error checking, but convert the code to parse reflog to use it as a demonstration. Tests are mostly from Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Fix log -g this@{upstream}Junio C Hamano
It showed the correct objects but walked a wrong reflog. Again, tests are from Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26builtin-config: Fix crash when using "-f <relative path>" from non-root dirJohan Herland
When your current directory is not at the root of the working tree, and you use the "-f" option with a relative path, the current code tries to read from a wrong file, since argv[2] is now beyond the end of the rearranged argument list. This patch replaces the incorrect argv[2] with the variable holding the given config file name. The bug was introduced by d64ec16 (git config: reorganize to use parseopt). [jc: added test] Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26am: fix patch format detection for Thunderbird "Save As" emailsStephen Boyd
The patch detection wants to inspect all the headers of a rfc2822 message and ensure that they look like header fields. The headers are always separated from the message body with a blank line. When Thunderbird saves the message the blank line separating the headers from the body includes a CR. The patch detection is failing because a CRLF doesn't match /^$/. Fix this by allowing a CR to exist on the separating line. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26t0022: replace non-portable literal CRStephen Boyd
We shouldn't have literal CR's in tests as they aren't portable. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26tests: consolidate CR removal/addition functionsStephen Boyd
append_cr(), remove_cr(), q_to_nul() and q_to_cr() are defined in multiple tests. Consolidate them into test-lib.sh so we can stop redefining them. The use of remove_cr() in t0020 to test for a CR is replaced with a new function has_cr() to accurately reflect what is intended (the output of remove_cr() was being thrown away). Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-25t5541-http-push: make grep expression check for one line onlyTay Ray Chuan
Don't feed a multiple-line pattern to grep and expect the them to match with lines in order. Simplify the grep expressions in the non-fast-forward tests to check only for the first line of the non-fast-forward warning - having that line should be enough assurance that the full warning is printed. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-25Teach diff --submodule that modified submodule directory is dirtyJens Lehmann
Since commit 8e08b4 git diff does append "-dirty" to the work tree side if the working directory of a submodule contains new or modified files. Lets do the same when the --submodule option is used. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-25Merge branch 'jc/fix-tree-walk'Junio C Hamano
* jc/fix-tree-walk: read-tree --debug-unpack unpack-trees.c: look ahead in the index unpack-trees.c: prepare for looking ahead in the index Aggressive three-way merge: fix D/F case traverse_trees(): handle D/F conflict case sanely more D/F conflict tests tests: move convenience regexp to match object names to test-lib.sh Conflicts: builtin-read-tree.c unpack-trees.c unpack-trees.h
2010-01-24Make test numbers uniqueJohannes Sixt
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-24pull: re-fix command line generationJunio C Hamano
14e5d40 (pull: Fix parsing of -X<option>, 2010-01-17) forgot that merge_name needs to stay as a single non-interpolated string. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-23Merge git://git.bogomips.org/git-svnJunio C Hamano
* git://git.bogomips.org/git-svn: git-svn: allow subset of branches/tags to be specified in glob spec git-svn: allow UUID to be manually remapped via rewriteUUID git-svn: update svn mergeinfo test suite git-svn: document --username/commit-url for branch/tag git-svn: add --username/commit-url options for branch/tag git-svn: respect commiturl option for branch/tag git-svn: fix mismatched src/dst errors for branch/tag git-svn: handle merge-base failures git-svn: ignore changeless commits when checking for a cherry-pick
2010-01-23git-svn: allow subset of branches/tags to be specified in glob specJay Soffian
For very large projects it is useful to be able to clone a subset of the upstream SVN repo's branches. Allow for this by letting the left-side of the branches and tags glob specs contain a brace-delineated comma-separated list of names. e.g.: branches = branches/{red,green}/src:refs/remotes/branches/* Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-01-23git-svn: allow UUID to be manually remapped via rewriteUUIDJay Soffian
In certain situations it may be necessary to manually remap an svn repostitory UUID. For example: o--- [git-svn clone] / [origin svn repo] \ o--- [svnsync clone] Imagine that only "git-svn clone" and "svnsync clone" are made available to external users. Furthur, "git-svn clone" contains only trunk, and for reasons unknown, "svnsync clone" is missing the revision properties that normally provide the origin svn repo's UUID. A git user who has cloned the "git-svn clone" repo now wishes to use git-svn to pull in the missing branches from the "synsync clone" repo. In order for git-svn to get the history correct for those branches, it needs to know the origin svn repo's UUID. Hence rewriteUUID. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-01-23git-svn: update svn mergeinfo test suiteAndrew Myrick
Add a partial branch (e.g., a branch from a project subdirectory) to the git-svn mergeinfo test repository. Add a tag and a branch from that tag to the git-svn mergeinfo test repository. Update the test script to expect a known failure in git-svn exposed by these additions where merge info for partial branches is not preserved. Signed-off-by: Andrew Myrick <amyrick@apple.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-01-23t7800-difftool.sh: Test mergetool.prompt fallbackDavid Aguilar
4cacc621 made difftool fall back to mergetool.prompt when difftool.prompt is unconfigured. This adds a test. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-23Merge branch 'maint'Junio C Hamano
* maint: ignore duplicated slashes in make_relative_path()
2010-01-23Merge branch 'jc/branch-d'Junio C Hamano
* jc/branch-d: branch -d: base the "already-merged" safety on the branch it merges with
2010-01-23Merge branch 'il/rev-glob'Junio C Hamano
* il/rev-glob: Documentation: improve description of --glob=pattern and friends rev-parse --branches/--tags/--remotes=pattern rev-parse --glob
2010-01-23Merge branch 'js/refer-upstream'Junio C Hamano
* js/refer-upstream: Teach @{upstream} syntax to strbuf_branchanme() t1506: more test for @{upstream} syntax Introduce <branch>@{upstream} notation
2010-01-23Merge branch 'jl/submodule-diff'Junio C Hamano
* jl/submodule-diff: Performance optimization for detection of modified submodules git status: Show uncommitted submodule changes too when enabled Teach diff that modified submodule directory is dirty Show submodules as modified when they contain a dirty work tree
2010-01-23Merge branch 'il/remote-updates'Junio C Hamano
* il/remote-updates: Add git remote set-url
2010-01-23Merge branch 'il/branch-set-upstream'Junio C Hamano
* il/branch-set-upstream: branch: warn and refuse to set a branch as a tracking branch of itself. Add branch --set-upstream
2010-01-23Merge branch 'jc/maint-limit-note-output'Junio C Hamano
* jc/maint-limit-note-output: Fix "log --oneline" not to show notes Fix "log" family not to be too agressive about showing notes
2010-01-22ignore duplicated slashes in make_relative_path()Junio C Hamano
The function takes two paths, an early part of abs is supposed to match base; otherwise abs is not a path under base and the function returns the full path of abs. The caller can easily confuse the implementation by giving duplicated and needless slashes in these path arguments. Credit for test script, motivation and initial patch goes to Thomas Rast. A follow-up fix (squashed) is by Hannes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22git-mv: fix moving more than one source to a single destinationJunio C Hamano
The code used as if return value from basename(3) were stable, but often the function is implemented to return a pointer to a static storage internal to it. Because basename(3) is also allowed to modify its input parameter in place, casting constness away from the strings we obtained from the caller and giving them to basename is a no-no. Reported, and initial fix and test supplied by David Rydh. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-22rebase -i: Enclose sed command substitution in quotesMichael Haggerty
Reported by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21Fix "log --oneline" not to show notesJunio C Hamano
This option should be treated pretty much the same as --format="%h %s". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21Make 'rerere forget' work from a subdirectory.Johannes Sixt
It forgot to apply the prefix to the paths given on the command line. [jc: added test] Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21Make test case numbers uniqueJohannes Sixt
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21conflict-marker-size: add test and docsJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-21Merge branch 'ag/patch-header-verify'Junio C Hamano
* ag/patch-header-verify: builtin-apply.c: fix the --- and +++ header filename consistency check
2010-01-21Merge branch 'ag/maint-apply-too-large-p'Junio C Hamano
* ag/maint-apply-too-large-p: builtin-apply.c: Skip filenames without enough components
2010-01-21Merge branch 'ap/merge-backend-opts'Junio C Hamano
* ap/merge-backend-opts: Document that merge strategies can now take their own options Extend merge-subtree tests to test -Xsubtree=dir. Make "subtree" part more orthogonal to the rest of merge-recursive. pull: Fix parsing of -X<option> Teach git-pull to pass -X<option> to git-merge git merge -X<option> git-merge-file --ours, --theirs Conflicts: git-compat-util.h
2010-01-21Merge branch 'jh/notes' (early part)Junio C Hamano
* 'jh/notes' (early part): Add more testcases to test fast-import of notes Rename t9301 to t9350, to make room for more fast-import tests fast-import: Proper notes tree manipulation
2010-01-21Fix "log" family not to be too agressive about showing notesJunio C Hamano
Giving "Notes" information in the default output format of "log" and "show" is a sensible progress (the user has asked for it by having the notes), but for some commands (e.g. "format-patch") spewing notes into the formatted commit log message without being asked is too aggressive. Enable notes output only for "log", "show", "whatchanged" by default and only when the user didn't ask any specific --pretty/--format from the command line; users can explicitly override this default with --show-notes and --no-notes option. Parts of tests are taken from Jeff King's fix. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20Merge branch 'jc/cache-unmerge'Junio C Hamano
* jc/cache-unmerge: rerere forget path: forget recorded resolution rerere: refactor rerere logic to make it independent from I/O rerere: remove silly 1024-byte line limit resolve-undo: teach "update-index --unresolve" to use resolve-undo info resolve-undo: "checkout -m path" uses resolve-undo information resolve-undo: allow plumbing to clear the information resolve-undo: basic tests resolve-undo: record resolved conflicts in a new index extension section builtin-merge.c: use standard active_cache macros Conflicts: builtin-ls-files.c builtin-merge.c builtin-rerere.c
2010-01-20Merge branch 'js/exec-error-report'Junio C Hamano
* js/exec-error-report: Improve error message when a transport helper was not found start_command: detect execvp failures early run-command: move wait_or_whine earlier start_command: report child process setup errors to the parent's stderr Conflicts: Makefile