summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2010-02-10Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-2/+4
* maint-1.6.5: t8003: check exit code of command and error message separately
2010-02-10t8003: check exit code of command and error message separatelyLibravatar Junio C Hamano1-2/+4
Shell reports exit status only from the most downstream command in a pipeline. In these tests, we want to make sure that the command fails in a controlled way, and produces a correct error message. This issue was known by Jay who submitted the patch, and also was pointed out by Hannes during the review process, but I forgot to fix it up before applying. Sorry about that. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Merge branch 'sp/maint-fast-import-large-blob' into maintLibravatar Junio C Hamano2-1/+47
* sp/maint-fast-import-large-blob: fast-import: Stream very large blobs directly to pack
2010-02-10Merge branch 'jc/maint-reflog-bad-timestamp' into maintLibravatar Junio C Hamano1-0/+45
* 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-02-10Merge branch 'jh/maint-config-file-prefix' into maintLibravatar Junio C Hamano1-0/+11
* jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
2010-02-10Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maintLibravatar Junio C Hamano1-0/+57
* jc/maint-1.6.1-checkout-m-custom-merge: checkout -m path: fix recreating conflicts Conflicts: t/t7201-co.sh
2010-02-08Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-0/+8
* maint-1.6.5: blame: prevent a segv when -L given start > EOF
2010-02-08blame: prevent a segv when -L given start > EOFLibravatar Jay Soffian1-0/+8
blame would segv if given -L <lineno> with <lineno> past the end of the file. While we're fixing the bug, add test cases for an invalid <start> when called as -L <start>,<end> or -L<start>. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-07archive: simplify archive format guessingLibravatar René Scharfe1-0/+10
The code to guess an output archive's format consumed any --format options and built a new one. Jonathan noticed that it does so in an unsafe way, risking to overflow the static buffer fmt_opt. Change the code to keep the existing --format options intact and to only add a new one if a format could be guessed based on the output file name. The new option is added as the first one, allowing the existing ones to overrule it, i.e. explicit --format options given on the command line win over format guesses, as before. To simplify the code further, format_from_name() is changed to return the full --format option, thus no potentially dangerous sprintf() calls are needed any more. Reported-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-05Merge branch 'jc/maint-limit-note-output' into maintLibravatar Junio C Hamano1-0/+59
* jc/maint-limit-note-output: Fix "log --oneline" not to show notes Fix "log" family not to be too agressive about showing notes
2010-02-01fast-import: Stream very large blobs directly to packLibravatar Shawn O. Pearce2-1/+47
If a blob is larger than the configured big-file-threshold, instead of reading it into a single buffer obtained from malloc, stream it onto the end of the current pack file. Streaming the larger objects into the pack avoids the 4+ GiB memory footprint that occurs when fast-import is processing 2+ GiB blobs. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-01Merge branch 'sb/maint-octopus' into maint-1.6.5Libravatar Junio C Hamano1-0/+51
* sb/maint-octopus: octopus: remove dead code octopus: reenable fast-forward merges octopus: make merge process simpler to follow
2010-01-27t0101: use a fixed timestamp when searching in the reflogLibravatar Junio C Hamano1-2/+2
That will give us a better reproducibility during tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26approxidate_careful() reports errorneous date stringLibravatar Junio C Hamano1-0/+45
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-26builtin-config: Fix crash when using "-f <relative path>" from non-root dirLibravatar Johan Herland1-0/+11
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-22ignore duplicated slashes in make_relative_path()Libravatar Junio C Hamano1-0/+6
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-21Fix "log --oneline" not to show notesLibravatar Junio C Hamano1-2/+4
This option should be treated pretty much the same as --format="%h %s". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20Fix "log" family not to be too agressive about showing notesLibravatar Junio C Hamano1-0/+57
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 'bg/maint-remote-update-default' into maintLibravatar Junio C Hamano1-0/+14
* bg/maint-remote-update-default: Fix "git remote update" with remotes.defalt set
2010-01-20Merge branch 'sb/maint-octopus' into maintLibravatar Junio C Hamano1-0/+51
* sb/maint-octopus: octopus: remove dead code octopus: reenable fast-forward merges octopus: make merge process simpler to follow Conflicts: git-merge-octopus.sh
2010-01-20Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-0/+6
* maint-1.6.5: Git 1.6.5.8 Fix mis-backport of t7002 bash completion: factor submodules into dirty state reset: unbreak hard resets with GIT_WORK_TREE Conflicts: Documentation/git.txt GIT-VERSION-GEN RelNotes
2010-01-20Merge branch 'jk/maint-1.6.5-reset-hard' into maint-1.6.5Libravatar Junio C Hamano1-0/+6
* jk/maint-1.6.5-reset-hard: reset: unbreak hard resets with GIT_WORK_TREE
2010-01-18Merge branch 'maint-1.6.4' into maint-1.6.5Libravatar Junio C Hamano2-20/+20
* maint-1.6.4: Fix mis-backport of t7002 base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails
2010-01-18Merge branch 'maint-1.6.3' into maint-1.6.4Libravatar Junio C Hamano2-20/+20
* maint-1.6.3: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: builtin-commit.c
2010-01-18Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano2-20/+20
* maint-1.6.2: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: diff.c
2010-01-18Merge commit 'v1.6.4.4-8-g8de6518' into maint-1.6.4Libravatar Junio C Hamano1-1/+5
* commit 'v1.6.4.4-8-g8de6518': Fix mis-backport of t7002
2010-01-18Fix mis-backport of t7002Libravatar Junio C Hamano1-1/+5
The original patch that became cfe370c (grep: do not segfault when -f is used, 2009-10-16), was made against "maint" or newer branch back then, but the fix addressed the issue that was present as far as in 1.6.4 series. The maintainer backported the patch to the 1.6.4 maintenance branch, but failed to notice that the new tests assumed the setup done by the script in "maint", which did quite a lot more than the same test script in 1.6.4 series, and the output didn't match the expected result. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-12remote-curl: Fix Accept header for smart HTTP connectionsLibravatar Shawn O. Pearce1-1/+1
We actually expect to see an application/x-git-upload-pack-result but we lied and said we Accept *-response. This was a typo on my part when I was writing the code. Fortunately the wrong Accept header had no real impact, as the deployed git-http-backend servers were not testing the Accept header before they returned their content. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-10Merge branch 'maint-1.6.1' into maint-1.6.2Libravatar Junio C Hamano2-20/+20
* maint-1.6.1: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname". textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: diff.c
2010-01-10Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-13/+13
* maint-1.6.0: base85: Make the code more obvious instead of explaining the non-obvious base85: encode_85() does not use the decode table base85 debug code: Fix length byte calculation checkout -m: do not try to fall back to --merge from an unborn branch branch: die explicitly why when calling "git branch [-a|-r] branchname".
2010-01-06checkout -m path: fix recreating conflictsLibravatar Junio C Hamano1-0/+57
We should tell ll_merge() that the 3-way merge between stages #2 and #3 is an outermost merge, not a virtual-ancestor creation. Back when this code was originally written, users couldn't write custom merge drivers easily, so the bug didn't matter, but these days it does. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-31Merge branch 'maint-1.6.0' into maintLibravatar Junio C Hamano1-13/+13
* maint-1.6.0: branch: die explicitly why when calling "git branch [-a|-r] branchname".
2009-12-31branch: die explicitly why when calling "git branch [-a|-r] branchname".Libravatar Matthieu Moy1-13/+13
The -a and -r options used to be silently ignored in such a command. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-31Fix "git remote update" with remotes.defalt setLibravatar Björn Gustavsson1-0/+14
Starting from commit 8db35596, "git remote update" (with no group name given) will fail with the following message if remotes.default has been set in the config file: fatal: 'default' does not appear to be a git repository fatal: The remote end hung up unexpectedly The problem is that the --multiple option is not passed to "git fetch" if no remote or group name is given on the command line. Fix the problem by always passing the --multiple option to "git fetch" (which actually simplifies the code). Reported-by: YONETANI Tomokazu Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-30Merge branch 'maint-1.6.1' into maintLibravatar Junio C Hamano1-7/+7
* maint-1.6.1: textconv: stop leaking file descriptors commit: --cleanup is a message option git count-objects: handle packs bigger than 4G t7102: make the test fail if one of its check fails Conflicts: builtin-commit.c diff.c
2009-12-30reset: unbreak hard resets with GIT_WORK_TREELibravatar Jeff King1-0/+6
Commit 952dfc6 tried to tighten the safety valves for doing a "reset --hard" in a bare repository or outside the work tree, but accidentally broke the case for GIT_WORK_TREE. This patch unbreaks it. Most git commands which need a work tree simply use NEED_WORK_TREE in git.c to die before they get to their cmd_* function. Reset, however, only needs a work tree in some cases, and so must handle the work tree itself. The error that 952dfc6 made was to simply forbid certain operations if the work tree was not set up; instead, we need to do the same thing that NEED_WORK_TREE does, which is to call setup_work_tree(). We no longer have to worry about dying in the non-worktree case, as setup_work_tree handles that for us. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-29Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano1-7/+7
* maint-1.6.0: commit: --cleanup is a message option t7102: make the test fail if one of its check fails
2009-12-29t7102: make the test fail if one of its check failsLibravatar Nguyễn Thái Ngọc Duy1-7/+7
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-26t4019 "grep" portability fixLibravatar Junio C Hamano1-28/+28
Input to "grep" is supposed to be "text", but we deliberately feed output from "git diff --color" to sift it into two sets of lines (ones with errors, the other without). Some implementations of "grep" only report matches with the exit status, without showing the matched lines in their output (e.g. OpenBSD 4.6, which says "Binary file .. matches"). Fortunately, "grep -a" is often a way to force the command to treat its input as text. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-26t1200: work around a bug in some implementations of "find"Libravatar Junio C Hamano1-1/+1
"find path ..." command should exit with zero status only when all path operands were traversed successfully. When a non-existent path is given, however, some implementations of "find" (e.g. OpenBSD 4.6) exit with zero status and break the last test in t1200. Rewrite the test to check that there is no regular files in the objects fan-out directories to work around this bug; it is closer to what we are testing anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-23git svn: add test for a git svn gc followed by a git svn mkdirsLibravatar Robert Zeh1-0/+40
git svn gc will compress the unhandled.log files that git svn mkdirs reads, causing git svn mkdirs to skip directory creation. [ew: trivial whitespace cleanups] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Robert Zeh <robert.a.zeh@gmail.com>
2009-12-22Merge branch 'maint'Libravatar Junio C Hamano1-0/+13
* maint: Prevent git blame from segfaulting on a missing author name
2009-12-22Prevent git blame from segfaulting on a missing author nameLibravatar David Reiss1-0/+13
The human-readable author and committer name can be missing from commits imported from foreign SCM interfaces. Make sure we parse the "author" and "committer" line a bit more leniently and avoid segfaulting by assuming the name always exists. Signed-off-by: David Reiss <dreiss@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-21git-svn: detect cherry-picks correctly.Libravatar Sam Vilain1-2/+2
The old function was incorrect; in some instances it marks a cherry picked range as a merged branch (because of an incorrect assumption that 'rev-list COMMIT --not RANGE' would work). This is replaced with a function which should detect them correctly, memoized to limit the expense of dealing with branches with many cherry picks to one 'merge-base' call per merge, per branch which used cherry picking. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: fix some mistakes with interpreting SVN mergeinfo commit rangesLibravatar Sam Vilain1-1/+1
SVN's list of commit ranges in mergeinfo tickets is inclusive, whereas git commit ranges are exclusive on the left hand side. Also, the end points of the commit ranges may not exist; they simply delineate ranges of commits which may or may not exist. Fix these two mistakes. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-21git-svn: expand the svn mergeinfo test suite, highlighting some failuresLibravatar Sam Vilain3-172/+860
As shown, git-svn has some problems; not all svn merges are correctly detected, and cherry picks may incorrectly be detected as real merges. These test cases will be marked as _success once the relevant fixes are in. Signed-off-by: Sam Vilain <sam@vilain.net> Acked-by: Eric Wong <normalperson@yhbt.net>
2009-12-19t9146: use 'svn_cmd' wrapperLibravatar Eric Wong1-1/+1
Using 'svn' directly may not work for all users. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-19git svn: make empty directory creation gc-awareLibravatar Eric Wong1-0/+24
The "git svn gc" command creates and appends to unhandled.log.gz files which should be parsed before the uncompressed unhandled.log files. Reported-by: Robert Zeh Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-12-16Merge branch 'maint' to sync with 1.6.5.7Libravatar Junio C Hamano2-0/+32
* maint: Git 1.6.5.7 worktree: don't segfault with an absolute pathspec without a work tree ignore unknown color configuration help.autocorrect: do not run a command if the command given is junk Illustrate "filter" attribute with an example
2009-12-16worktree: don't segfault with an absolute pathspec without a work treeLibravatar Junio C Hamano1-0/+15
If a command is run with an absolute path as a pathspec inside a bare repository, e.g. "rev-list HEAD -- /home", the code tried to run strlen() on NULL, which is the result of get_git_work_tree(), and segfaulted. It should just fail instead. Currently the function returns NULL even inside .git/ in a repository with a work tree, but that is a separate issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>