summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2013-09-20Merge branch 'jx/branch-vv-always-compare-with-upstream'Libravatar Junio C Hamano1-4/+85
"git branch -v -v" (and "git status") did not distinguish among a branch that does not build on any other branch, a branch that is in sync with the branch it builds on, and a branch that is configured to build on some other branch that no longer exists. * jx/branch-vv-always-compare-with-upstream: status: always show tracking branch even no change branch: report invalid tracking branch as gone
2013-09-20Merge branch 'nd/fetch-into-shallow'Libravatar Junio C Hamano2-3/+11
When there is no sufficient overlap between old and new history during a fetch into a shallow repository, we unnecessarily sent objects the sending side knows the receiving end has. * nd/fetch-into-shallow: Add testcase for needless objects during a shallow fetch list-objects: mark more commits as edges in mark_edges_uninteresting list-objects: reduce one argument in mark_edges_uninteresting upload-pack: delegate rev walking in shallow fetch to pack-objects shallow: add setup_temporary_shallow() shallow: only add shallow graft points to new shallow file move setup_alternate_shallow and write_shallow_commits to shallow.c
2013-09-18Merge branch 'ks/p4-view-spec'Libravatar Junio C Hamano1-1/+2
* ks/p4-view-spec: git p4: implement view spec wildcards with "p4 where" git p4 test: sanitize P4CHARSET
2013-09-18Merge branch 'jk/duplicate-objects-in-packs'Libravatar Junio C Hamano3-0/+257
A packfile that stores the same object more than once is broken and will be rejected by "git index-pack" that is run when receiving data over the wire. * jk/duplicate-objects-in-packs: t5308: check that index-pack --strict detects duplicate objects test index-pack on packs with recoverable delta cycles add tests for indexing packs with delta cycles sha1-lookup: handle duplicate keys with GIT_USE_LOOKUP test-sha1: add a binary output mode
2013-09-18Merge branch 'nd/git-dir-pointing-at-gitfile'Libravatar Junio C Hamano1-0/+4
We made sure that we notice the user-supplied GIT_DIR is actually a gitfile, but did not do the same when the default ".git" is a gitfile. * nd/git-dir-pointing-at-gitfile: Make setup_git_env() resolve .git file when $GIT_DIR is not specified
2013-09-18Merge branch 'fc/t3200-fixes'Libravatar Junio C Hamano1-6/+7
* fc/t3200-fixes: t: branch: fix broken && chains t: branch: fix typo t: branch: trivial style fix
2013-09-18Merge branch 'fc/rev-parse-test-updates'Libravatar Junio C Hamano1-33/+80
Modernize tests. * fc/rev-parse-test-updates: rev-parse test: use standard test functions for setup rev-parse test: use test_cmp instead of "test" builtin rev-parse test: use test_must_fail, not "if <command>; then false; fi" rev-parse test: modernize quoting and whitespace
2013-09-17Merge branch 'jk/remove-remote-helpers-in-python'Libravatar Junio C Hamano2-178/+0
Remove now disused remote-helpers framework for helpers written in Python. * jk/remove-remote-helpers-in-python: git_remote_helpers: remove little used Python library
2013-09-17Merge branch 'rh/ishes-doc'Libravatar Junio C Hamano1-3/+3
We liberally use "committish" and "commit-ish" (and "treeish" and "tree-ish"); as these are non-words, let's unify these terms to their dashed form. More importantly, clarify the documentation on object peeling using these terms. * rh/ishes-doc: glossary: fix and clarify the definition of 'ref' revisions.txt: fix and clarify <rev>^{<type>} glossary: more precise definition of tree-ish (a.k.a. treeish) use 'commit-ish' instead of 'committish' use 'tree-ish' instead of 'treeish' glossary: define commit-ish (a.k.a. committish) glossary: mention 'treeish' as an alternative to 'tree-ish'
2013-09-17Merge branch 'jk/write-broken-index-with-nul-sha1'Libravatar Junio C Hamano1-0/+49
Earlier we started rejecting an attempt to add 0{40} object name to the index and to tree objects, but it sometimes is necessary to allow so to be able to use tools like filter-branch to correct such broken tree objects. * jk/write-broken-index-with-nul-sha1: write_index: optionally allow broken null sha1s
2013-09-17Merge branch 'tb/precompose-autodetect-fix'Libravatar Junio C Hamano3-2/+2
On MacOS X, we detected if the filesystem needs the "pre-composed unicode strings" workaround, but did not automatically enable it. Now we do. * tb/precompose-autodetect-fix: Set core.precomposeunicode to true on e.g. HFS+
2013-09-17Merge branch 'kk/tests-with-no-perl'Libravatar Junio C Hamano3-44/+67
Some tests were not skipped under NO_PERL build. * kk/tests-with-no-perl: reset test: modernize style t/t7106-reset-unborn-branch.sh: Add PERL prerequisite add -i test: use skip_all instead of repeated PERL prerequisite Make test "using invalid commit with -C" more strict
2013-09-17Merge branch 'ap/commit-author-mailmap'Libravatar Junio C Hamano1-0/+11
"git commit --author=$name", when $name is not in the canonical "A. U. Thor <au.thor@example.xz>" format, looks for a matching name from existing history, but did not consult mailmap to grab the preferred author name. * ap/commit-author-mailmap: commit: search author pattern against mailmap
2013-09-17Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: t7406-submodule-update: add missing &&
2013-09-17t7406-submodule-update: add missing &&Libravatar Tay Ray Chuan1-1/+1
322bb6e (2011 Aug 11) introduced a new subshell at the end of a test case but omitted a '&&' to join the two; fix this. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-12Merge branch 'mm/mediawiki-dumb-push-fix'Libravatar Junio C Hamano1-0/+11
* mm/mediawiki-dumb-push-fix: git-remote-mediawiki: no need to update private ref in non-dumb push git-remote-mediawiki: use no-private-update capability on dumb push transport-helper: add no-private-update capability git-remote-mediawiki: add test and check Makefile targets
2013-09-12Merge branch 'jc/commit-is-spelled-with-two-ems'Libravatar Junio C Hamano4-10/+10
* jc/commit-is-spelled-with-two-ems: typofix: cherry is spelled with two ars typofix: commit is spelled with two ems
2013-09-12Merge branch 'jk/config-int-range-check'Libravatar Junio C Hamano2-4/+11
"git config" did not provide a way to set or access numbers larger than a native "int" on the platform; it now provides 64-bit signed integers on all platforms. * jk/config-int-range-check: git-config: always treat --int as 64-bit internally config: make numeric parsing errors more clear config: set errno in numeric git_parse_* functions config: properly range-check integer values config: factor out integer parsing from range checks
2013-09-11Merge branch 'jc/ls-files-killed-optim'Libravatar Junio C Hamano1-8/+19
"git ls-files -k" needs to crawl only the part of the working tree that may overlap the paths in the index to find killed files, but shared code with the logic to find all the untracked files, which made it unnecessarily inefficient. * jc/ls-files-killed-optim: dir.c::test_one_path(): work around directory_exists_in_index_icase() breakage t3010: update to demonstrate "ls-files -k" optimization pitfalls ls-files -k: a directory only can be killed if the index has a non-directory dir.c: use the cache_* macro to access the current index
2013-09-11Merge branch 'es/rebase-i-no-abbrev'Libravatar Junio C Hamano1-2/+87
The commit object names in the insn sheet that was prepared at the beginning of "rebase -i" session can become ambiguous as the rebasing progresses and the repository gains more commits. Make sure the internal record is kept with full 40-hex object names. * es/rebase-i-no-abbrev: rebase -i: fix short SHA-1 collision t3404: rebase -i: demonstrate short SHA-1 collision t3404: make tests more self-contained
2013-09-11Merge branch 'rt/rebase-p-no-merge-summary'Libravatar Junio C Hamano1-0/+23
"git rebase -p" internally used the merge machinery, but when rebasing, there should not be a need for merge summary. * rt/rebase-p-no-merge-summary: rebase --preserve-merges: ignore "merge.log" config
2013-09-11Merge branch 'sh/pull-rebase-preserve'Libravatar Junio C Hamano1-0/+89
"git pull --rebase" always flattened the history; pull.rebase can now be set to "preserve" to invoke "rebase --preserve-merges". * sh/pull-rebase-preserve: pull: allow pull to preserve merges when rebasing
2013-09-11Merge branch 'nd/push-no-thin'Libravatar Junio C Hamano1-0/+17
"git push --no-thin" was a no-op by mistake. * nd/push-no-thin: push: respect --no-thin
2013-09-09Merge branch 'jk/mailmap-incomplete-line'Libravatar Junio C Hamano1-1/+15
* jk/mailmap-incomplete-line: mailmap: handle mailmap blobs without trailing newlines
2013-09-09Merge branch 'sp/clip-read-write-to-8mb'Libravatar Junio C Hamano1-0/+14
Send a large request to read(2)/write(2) as a smaller but still reasonably large chunks, which would improve the latency when the operation needs to be killed and incidentally works around broken 64-bit systems that cannot take a 2GB write or read in one go. * sp/clip-read-write-to-8mb: Revert "compat/clipped-write.c: large write(2) fails on Mac OS X/XNU" xread, xwrite: limit size of IO to 8MB
2013-09-09Merge branch 'jc/transport-do-not-use-connect-twice-in-fetch'Libravatar Junio C Hamano1-0/+72
The auto-tag-following code in "git fetch" tries to reuse the same transport twice when the serving end does not cooperate and does not give tags that point to commits that are asked for as part of the primary transfer. Unfortunately, Git-aware transport helper interface is not designed to be used more than once, hence this does not work over smart-http transfer. * jc/transport-do-not-use-connect-twice-in-fetch: builtin/fetch.c: Fix a sparse warning fetch: work around "transport-take-over" hack fetch: refactor code that fetches leftover tags fetch: refactor code that prepares a transport fetch: rename file-scope global "transport" to "gtransport" t5802: add test for connect helper
2013-09-09Merge branch 'jc/url-match'Libravatar Junio C Hamano15-0/+223
Allow section.<urlpattern>.var configuration variables to be treated as a "virtual" section.var given a URL, and use the mechanism to enhance http.* configuration variables. This is a reroll of Kyle J. McKay's work. * jc/url-match: builtin/config.c: compilation fix config: "git config --get-urlmatch" parses section.<url>.key builtin/config: refactor collect_config() config: parse http.<url>.<variable> using urlmatch config: add generic callback wrapper to parse section.<url>.key config: add helper to normalize and match URLs http.c: fix parsing of http.sslCertPasswordProtected variable
2013-09-09Merge branch 'jl/submodule-mv'Libravatar Junio C Hamano7-23/+421
"git mv A B" when moving a submodule A does "the right thing", inclusing relocating its working tree and adjusting the paths in the .gitmodules file. * jl/submodule-mv: (53 commits) rm: delete .gitmodules entry of submodules removed from the work tree mv: update the path entry in .gitmodules for moved submodules submodule.c: add .gitmodules staging helper functions mv: move submodules using a gitfile mv: move submodules together with their work trees rm: do not set a variable twice without intermediate reading. t6131 - skip tests if on case-insensitive file system parse_pathspec: accept :(icase)path syntax pathspec: support :(glob) syntax pathspec: make --literal-pathspecs disable pathspec magic pathspec: support :(literal) syntax for noglob pathspec kill limit_pathspec_to_literal() as it's only used by parse_pathspec() parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN parse_pathspec: make sure the prefix part is wildcard-free rename field "raw" to "_raw" in struct pathspec tree-diff: remove the use of pathspec's raw[] in follow-rename codepath remove match_pathspec() in favor of match_pathspec_depth() remove init_pathspec() in favor of parse_pathspec() remove diff_tree_{setup,release}_paths convert common_prefix() to use struct pathspec ...
2013-09-09Merge branch 'es/blame-L-twice'Libravatar Junio C Hamano2-7/+125
Teaches "git blame" to take more than one -L ranges. * es/blame-L-twice: line-range: reject -L line numbers less than 1 t8001/t8002: blame: add tests of -L line numbers less than 1 line-range: teach -L^:RE to search from start of file line-range: teach -L:RE to search from end of previous -L range line-range: teach -L^/RE/ to search from start of file line-range-format.txt: document -L/RE/ relative search log: teach -L/RE/ to search from end of previous -L range blame: teach -L/RE/ to search from end of previous -L range line-range: teach -L/RE/ to search relative to anchor point blame: document multiple -L support t8001/t8002: blame: add tests of multiple -L options blame: accept multiple -L ranges blame: inline one-line function into its lone caller range-set: publish API for re-use by git-blame -L line-range-format.txt: clarify -L:regex usage form git-log.txt: place each -L option variation on its own line
2013-09-09Merge branch 'tr/log-full-diff-keep-true-parents'Libravatar Junio C Hamano2-0/+28
Output from "git log --full-diff -- <pathspec>" looked strange, because comparison was done with the previous ancestor that touched the specified <pathspec>, causing the patches for paths outside the pathspec to show more than the single commit has changed. Tweak "git reflog -p" for the same reason using the same mechanism. * tr/log-full-diff-keep-true-parents: log: use true parents for diff when walking reflogs log: use true parents for diff even when rewriting
2013-09-09Merge branch 'jk/cat-file-batch-optim'Libravatar Junio C Hamano1-0/+15
Rework the reverted change to `cat-file --batch-check`. * jk/cat-file-batch-optim: cat-file: only split on whitespace when %(rest) is used
2013-09-09Merge branch 'es/blame-L-more'Libravatar Junio C Hamano2-14/+159
More fixes to the code to parse the "-L" option in "log" and "blame". * es/blame-L-more: blame: reject empty ranges -L,+0 and -L,-0 t8001/t8002: blame: demonstrate acceptance of bogus -L,+0 and -L,-0 blame: reject empty ranges -LX,+0 and -LX,-0 t8001/t8002: blame: demonstrate acceptance of bogus -LX,+0 and -LX,-0 log: fix -L bounds checking bug t4211: retire soon-to-be unimplementable tests t4211: log: demonstrate -L bounds checking bug blame: fix -L bounds checking bug t8001/t8002: blame: add empty file & partial-line tests t8001/t8002: blame: demonstrate -L bounds checking bug t8001/t8002: blame: decompose overly-large test
2013-09-09Merge branch 'db/http-savecookies'Libravatar Junio C Hamano2-0/+24
* db/http-savecookies: t5551: Remove header from curl cookie file http: add http.savecookies option to write out HTTP cookies
2013-09-09Merge branch 'jc/push-cas'Libravatar Junio C Hamano3-2/+208
Allow a safer "rewind of the remote tip" push than blind "--force", by requiring that the overwritten remote ref to be unchanged since the new history to replace it was prepared. The machinery is more or less ready. The "--force" option is again the big red button to override any safety, thanks to J6t's sanity (the original round allowed --lockref to defeat --force). The logic to choose the default implemented here is fragile (e.g. "git fetch" after seeing a failure will update the remote-tracking branch and will make the next "push" pass, defeating the safety pretty easily). It is suitable only for the simplest workflows, and it may hurt users more than it helps them. * jc/push-cas: push: teach --force-with-lease to smart-http transport send-pack: fix parsing of --force-with-lease option t5540/5541: smart-http does not support "--force-with-lease" t5533: test "push --force-with-lease" push --force-with-lease: tie it all together push --force-with-lease: implement logic to populate old_sha1_expect[] remote.c: add command line option parser for "--force-with-lease" builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN cache.h: move remote/connect API out of it
2013-09-09Merge branch 'ms/fetch-prune-configuration'Libravatar Junio C Hamano1-0/+82
Allow fetch.prune and remote.*.prune configuration variables to be set, and "git fetch" to behave as if "--prune" is given. "git fetch" that honors remote.*.prune is fine, but I wonder if we should somehow make "git push" aware of it as well. Perhaps remote.*.prune should not be just a boolean, but a 4-way "none", "push", "fetch", "both"? * ms/fetch-prune-configuration: fetch: make --prune configurable
2013-09-09git-config: always treat --int as 64-bit internallyLibravatar Jeff King1-0/+7
When you run "git config --int", the maximum size of integer you get depends on how git was compiled, and what it considers to be an "int". This is almost useful, because your scripts calling "git config" will behave similarly to git internally. But relying on this is dubious; you have to actually know how git treats each value internally (e.g., int versus unsigned long), which is not documented and is subject to change. And even if you know it is "unsigned long", we do not have a git-config option to match that behavior. Furthermore, you may simply be asking git to store a value on your behalf (e.g., configuration for a hook). In that case, the relevant range check has nothing at all to do with git, but rather with whatever scripting tools you are using (and git has no way of knowing what the appropriate range is there). Not only is the range check useless, but it is actively harmful, as there is no way at all for scripts to look at config variables with large values. For instance, one cannot reliably get the value of pack.packSizeLimit via git-config. On an LP64 system, git happily uses a 64-bit "unsigned long" internally to represent the value, but the script cannot read any value over 2G. Ideally, the "--int" option would simply represent an arbitrarily large integer. For practical purposes, however, a 64-bit integer is large enough, and is much easier to implement (and if somebody overflows it, we will still notice the problem, and not simply return garbage). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09config: make numeric parsing errors more clearLibravatar Jeff King2-4/+4
If we try to parse an integer config argument and get a number outside of the representable range, we die with the cryptic message: "bad config value for '%s'". We can improve two things: 1. Show the value that produced the error (e.g., bad config value '3g' for 'foo.bar'). 2. Mention the reason the value was rejected (e.g., "invalid unit" versus "out of range"). A few tests need to be updated with the new output, but that should not be representative of real-world breakage, as scripts should not be depending on the exact text of our stderr output, which is subject to i18n anyway. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09git_remote_helpers: remove little used Python libraryLibravatar John Keeping2-178/+0
When it was originally added, the git_remote_helpers library was used as part of the tests of the remote-helper interface, but since commit fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) a simple shell script is used for this. A search on Ohloh [1] indicates that this library isn't used by any external projects and even the Python remote helpers in contrib/ don't use this library, so it is only used by its own test suite. Since this is the only Python library in Git, removing it will make packaging easier as the Python scripts only need to be installed for one version of Python, whereas the library should be installed for all available versions. [1] http://code.ohloh.net/search?s=%22git_remote_helpers%22 Signed-off-by: John Keeping <john@keeping.me.uk> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-05typofix: cherry is spelled with two arsLibravatar Junio C Hamano2-2/+2
Do not say chery; it is spelled cherry. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-05Merge branch 'nd/fetch-pack-shallow-fix' into maintLibravatar Junio C Hamano1-0/+16
The recent "short-cut clone connectivity check" topic broke a shallow repository when a fetch operation tries to auto-follow tags. * nd/fetch-pack-shallow-fix: fetch-pack: do not remove .git/shallow file when --depth is not specified
2013-09-04typofix: commit is spelled with two emsLibravatar Junio C Hamano2-8/+8
There are a handful of instances where we say commmit when we mean commit. Fix them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04use 'commit-ish' instead of 'committish'Libravatar Richard Hansen1-3/+3
Replace 'committish' in documentation and comments with 'commit-ish' to match gitglossary(7) and to be consistent with 'tree-ish'. The only remaining instances of 'committish' are: * variable, function, and macro names * "(also committish)" in the definition of commit-ish in gitglossary[7] Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04pull: allow pull to preserve merges when rebasingLibravatar Stephen Haberman1-0/+89
If a user is working on master, and has merged in their feature branch, but now has to "git pull" because master moved, with pull.rebase their feature branch will be flattened into master. This is because "git pull" currently does not know about rebase's preserve merges flag, which would avoid this behavior, as it would instead replay just the merge commit of the feature branch onto the new master, and not replay each individual commit in the feature branch. Add a --rebase=preserve option, which will pass along --preserve-merges to rebase. Also add 'preserve' to the allowed values for the pull.rebase config setting. Signed-off-by: Stephen Haberman <stephen@exigencecorp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-04Merge branch 'jl/some-submodule-config-are-not-boolean'Libravatar Junio C Hamano1-0/+10
* jl/some-submodule-config-are-not-boolean: avoid segfault on submodule.*.path set to an empty "true"
2013-09-04Merge branch 'sg/bash-prompt-lf-in-cwd-test'Libravatar Junio C Hamano1-0/+23
* sg/bash-prompt-lf-in-cwd-test: bash prompt: test the prompt with newline in repository path
2013-09-04Merge branch 'mm/no-shell-escape-in-die-message'Libravatar Junio C Hamano1-0/+13
Fixes a minor bug in "git rebase -i" (there could be others, as the root cause is pretty generic) where the code feeds a random, data dependeant string to 'echo' and expects it to come out literally. * mm/no-shell-escape-in-die-message: die_with_status: use "printf '%s\n'", not "echo"
2013-09-04Merge branch 'tr/fd-gotcha-fixes'Libravatar Junio C Hamano1-0/+4
Finishing touches to an earlier fix already in 'master'. * tr/fd-gotcha-fixes: t0070: test that git_mkstemps correctly checks return value of open()
2013-09-04Merge branch 'jk/fast-import-empty-ls'Libravatar Junio C Hamano1-0/+65
* jk/fast-import-empty-ls: fast-import: allow moving the root tree fast-import: allow ls or filecopy of the root tree fast-import: set valid mode on root tree in "ls" t9300: document fast-import empty path issues
2013-09-04t5308: check that index-pack --strict detects duplicate objectsLibravatar Jeff King1-0/+7
Commit 68be2fea (receive-pack, fetch-pack: reject bogus pack that records objects twice, 2011-11-16) taught index-pack to notice and reject duplicate objects if --strict is given (which it is for incoming packs, if transfer.fsckObjects is set). However, it never tested the code, because we did not have an easy way of generating such a bogus pack. Now that we have test infrastructure to handle this, let's confirm that it works. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-03rev-parse test: use standard test functions for setupLibravatar Felipe Contreras1-9/+9
Save the reader from learning specialized t6* setup functions where familiar commands like test_commit, "git checkout --orphan", and "git merge" will do. While at it, wrap the setup commands in a test assertion so errors can be caught and stray output suppressed when running without --verbose as in other tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>