summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-03-20Merge branch 'maint'Libravatar Junio C Hamano1-1/+4
* maint: doc: clarify how -S works
2009-03-20Merge branch 'mv/parseopt-ls-files'Libravatar Junio C Hamano10-163/+163
* mv/parseopt-ls-files: ls-files: fix broken --no-empty-directory t3000: use test_cmp instead of diff parse-opt: migrate builtin-ls-files. Turn the flags in struct dir_struct into a single variable Conflicts: builtin-ls-files.c t/t3000-ls-files-others.sh
2009-03-20Merge branch 'bw/autoconf'Libravatar Junio C Hamano1-118/+268
* bw/autoconf: configure: rework pthread handling to allow for user defined flags configure: make iconv tests aware of user arguments configure: asciidoc version test cleanup configure: wrap some library tests with GIT_STASH_FLAGS configure: add macros to stash FLAG variables configure: reorganize flow of argument checks configure: ensure settings from user are also usable in the script
2009-03-20Merge branch 'xx/db-refspec-vs-js-remote'Libravatar Junio C Hamano5-64/+90
* xx/db-refspec-vs-js-remote: Support '*' in the middle of a refspec Keep '*' in pattern refspecs Use the matching function to generate the match results Use a single function to match names against patterns Make clone parse the default refspec with the normal code
2009-03-20Merge branch 'jc/clone-branch-rebase'Libravatar Junio C Hamano4-31/+69
* jc/clone-branch-rebase: Improve "git branch --tracking" output Make git-clone respect branch.autosetuprebase Conflicts: builtin-clone.c
2009-03-20Merge branch 'js/rebase-i-opt'Libravatar Junio C Hamano2-0/+37
* js/rebase-i-opt: rebase -i: avoid 'git reset' when possible
2009-03-20Merge branch 'fc/parseopt-config'Libravatar Junio C Hamano4-200/+255
* fc/parseopt-config: config: test for --replace-all with one argument and fix documentation. config: set help text for --bool-or-int git config: don't allow --get-color* and variable type git config: don't allow extra arguments for -e or -l. git config: don't allow multiple variable types git config: don't allow multiple config file locations git config: reorganize to use parseopt git config: reorganize get_color* git config: trivial rename in preparation for parseopt git_config(): not having a per-repo config file is not an error
2009-03-20Microoptimize strbuf_cmpLibravatar Alex Riesen1-8/+5
It can be less object code and may be even faster, even if at the moment there is no callers to take an advantage of that. This implementation can be trivially made inlinable later. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-20Produce a nicer output in case of sha1_object_info failures in ls-tree -lLibravatar Alex Riesen1-10/+12
An error message is already printed by sha1_object_info itself, and the failed entries are additionally marked in the listing. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-20import-tars: separate author from committerLibravatar Giuseppe Bilotta1-5/+11
The import-tars script is typically employed to (re)create the past history of a project from stored tars. Although assigning authorship in these cases can be a somewhat arbitrary process, it makes sense to set the author to whoever created the tars in the first place (if it's known), and (s)he can in general be different from the committer (whoever is running the script). Implement this by having separate author and committer data, making them settable from the usual GIT_* environment variables. Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-19Merge branch 'js/windows-tests'Libravatar Junio C Hamano26-119/+98
* js/windows-tests: t5602: Work around path mangling on MSYS t5300, t5302, t5303: Do not use /dev/zero t2200, t7004: Avoid glob pattern that also matches files t7300: fix clean up on Windows test-lib: Introduce test_chmod and use it instead of update-index --chmod test-lib: Simplify test counting. test-lib: Replace uses of $(expr ...) by POSIX shell features. Call 'say' outside test_expect_success test suite: Use 'say' to say something instead of 'test_expect_success' t9400, t9401: Do not force hard-linked clone
2009-03-19t5602: Work around path mangling on MSYSLibravatar Johannes Sixt1-2/+2
MSYS's bash rewrites /something/bin/... into a Windows path that looks like c:/msysgit/something/bin/... before git sees it. But later the test case verifies that the path was used and compares it to the unmangled version. This fails, of course. This make the path relative so that the path mangling is not triggered. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19t5300, t5302, t5303: Do not use /dev/zeroLibravatar Johannes Sixt3-15/+16
We do not have /dev/zero on Windows. This replaces it by data generated with printf, perl, or echo. Most of the cases do not depend on that the data is a stream of zero bytes, so we use something printable; nor is an unlimited stream of data needed, so we produce only as many bytes as the test cases need. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19t2200, t7004: Avoid glob pattern that also matches filesLibravatar Johannes Sixt2-3/+4
On Windows, there is an unfortunate interaction between the MSYS bash and git's command line processing: - Since Windows's CMD does not do the wildcard expansion, but passes arguments like path* through to the programs, the programs must do the expansion themselves. This happens in the startup code before main() is entered. - bash, however, passes the argument "path*" to git, assuming that git will see the unquoted word unchanged as a single argument. But actually git expands the unquoted word before main() is entered. In t2200, not all names that the test case is interested in exist as files at the time when 'git ls-files' is invoked. git expands "path?" to only the subset of files the exist, and only that subset was listed, so that the test failed. We now list all interesting paths explicitly. In t7004, git exanded the pattern "*a*" to "actual" (the file that stdout was redirected to), which is not what the was tested for. We fix it by renaming the output file (and removing any existing files matching *a*). This was originally fixed by Johannes Schindelin. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19t7300: fix clean up on WindowsLibravatar Johannes Schindelin1-3/+3
On Windows, you cannot remove files that are in use, not even with 'rm -rf'. So we need to run 'exec <foo/bar' inside a subshell lest removing the whole test repository fail. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19test-lib: Introduce test_chmod and use it instead of update-index --chmodLibravatar Johannes Sixt7-43/+24
This function replaces sequences of 'chmod +x' and 'git update-index --chmod=+x' in the test suite, whose purpose is to help filesystems that need core.filemode=false. Two places where only 'chmod +x' was used we also use this new function. The function calls 'git update-index --chmod' without checking core.filemode (unlike some of the call sites did). We do this because the call sites *expect* that the executable bit ends up in the index (ie. it is not the purpose of the call sites to *test* whether git treats 'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on filesystems with core.filemode=true the 'git update-index --chmod' is a no-op. The function uses --add with update-index to help one call site in t6031-merge-recursive. It makes no difference for the other callers. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19test-lib: Simplify test counting.Libravatar Johannes Sixt3-11/+5
Since the test case counter was incremented very late, there were a few users of the counter had to do their own incrementing. Now we increment it early and simplify these users. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19test-lib: Replace uses of $(expr ...) by POSIX shell features.Libravatar Johannes Sixt1-12/+11
In particular: - Test case counting can be achieved by arithmetic expansion. - The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19Call 'say' outside test_expect_successLibravatar Johannes Sixt3-19/+22
There were some uses of 'say' inside test_expect_success. But if the tests were not run in verbose mode, this message went to /dev/null. Pull them out of test_expect_success. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19test suite: Use 'say' to say something instead of 'test_expect_success'Libravatar Johannes Sixt10-15/+15
Some tests report that some tests will be skipped. They used 'test_expect_success' with a trivially successful test. Nowadays we have the helper function 'say' for this purpose. In on case, 'say_color skip' is replaced by 'say' because the former is not intended as a public API. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-19doc: clarify how -S worksLibravatar Jeff King1-1/+4
The existing text was very vague about what exactly it means for difference to "contain" a change. This seems to cause confusion on the mailing list every month or two. To fix it we: 1. use "introduce or remove an instance of" instead of "contain" 2. point the user to gitdiffcore(7), which contains a more complete explanation Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18rebase: add options passed to git-amLibravatar Michele Ballabio2-0/+9
Add the options --committer-date-is-author-date and --ignore-date to git-rebase. They were introduced in commit a79ec62d0 for git-am. These options imply --force-rebase. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18document --force-rebaseLibravatar Michele Ballabio1-0/+7
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18MinGW: implement mmapLibravatar Janos Laube4-4/+73
Add USE_WIN32_MMAP which triggers the use of windows' native file memory mapping functionality in git_mmap()/git_munmap() functions. As git functions currently use mmap with MAP_PRIVATE set only, this implementation supports only that mode for now. On Windows, offsets for memory mapped files need to match the allocation granularity. Take this into account when calculating the packed git- windowsize and file offsets. At the moment, the only function which makes use of offsets in conjunction with mmap is use_pack() in sha1-file.c. Git fast-import's code path tries to map a portion of the temporary packfile that exceeds the current filesize, i.e. offset+length is greater than the filesize. The NO_MMAP code worked with that since pread() just reads the file content until EOF and returns gracefully, while MapViewOfFile() aborts the mapping and returns 'Access Denied'. Working around that by determining the filesize and adjusting the length parameter. Signed-off-by: Janos Laube <janos.dev@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18gc --aggressive: make it really aggressiveLibravatar Johannes Schindelin1-1/+2
The default was not to change the window or depth at all. As suggested by Jon Smirl, Linus Torvalds and others, default to --window=250 --depth=250 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18git log: avoid segfault with --all-matchLibravatar Michele Ballabio1-1/+2
Avoid a segfault when the command git log --all-match was issued, by ignoring the option. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18apply: hide unused options from short helpLibravatar Michele Ballabio1-4/+4
The options "--binary" and "--allow-binary-replacement" of git-apply are no-op and maintained for backward compatibility, so avoid to show them in the short help screen. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18apply: consistent spelling of "don't"Libravatar Michele Ballabio1-1/+1
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18format-patch: Respect --quiet optionLibravatar Nate Case1-4/+6
Hide the patch filename output from 'git format-patch' when --quiet is used. The man pages suggested that this should have already worked. Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-18t9400, t9401: Do not force hard-linked cloneLibravatar Johannes Sixt2-3/+3
The tests do not depend on that the clones are hard-linked, but used --local only as an optimization: At the time that --local was used first in t9400 hard-linked clones were not the default, yet. By removing --local, we help filesystems that do not support hard-links. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-17Update draft release notes to 1.6.3Libravatar Junio C Hamano1-3/+32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17Merge branch 'jc/maint-1.6.0-read-tree-overlay'Libravatar Junio C Hamano2-3/+34
* jc/maint-1.6.0-read-tree-overlay: read-tree A B C: do not create a bogus index and do not segfault
2009-03-17Merge branch 'db/maint-missing-origin'Libravatar Junio C Hamano3-8/+20
* db/maint-missing-origin: Remove total confusion from git-fetch and git-push Give error when no remote is configured
2009-03-17Merge branch 'js/sideband-stderr'Libravatar Junio C Hamano5-17/+26
* js/sideband-stderr: winansi: support ESC [ K (erase in line) recv_sideband: Bands #2 and #3 always go to stderr
2009-03-17Merge branch 'js/rsync-local'Libravatar Junio C Hamano2-27/+35
* js/rsync-local: rsync transport: allow local paths, and fix tests
2009-03-17Merge branch 'rs/color-grep'Libravatar Junio C Hamano5-42/+205
* rs/color-grep: grep: prefer builtin over external one when coloring results grep: cast printf %.*s "precision" argument explicitly to int grep: add support for coloring with external greps grep: color patterns in output grep: add pmatch and eflags arguments to match_one_pattern() grep: remove grep_opt argument from match_expr_eval() grep: micro-optimize hit collection for AND nodes
2009-03-17Merge branch 'js/remote-improvements'Libravatar Junio C Hamano17-330/+820
* js/remote-improvements: (23 commits) builtin-remote.c: no "commented out" code, please builtin-remote: new show output style for push refspecs builtin-remote: new show output style remote: make guess_remote_head() use exact HEAD lookup if it is available builtin-remote: add set-head subcommand builtin-remote: teach show to display remote HEAD builtin-remote: fix two inconsistencies in the output of "show <remote>" builtin-remote: make get_remote_ref_states() always populate states.tracked builtin-remote: rename variables and eliminate redundant function call builtin-remote: remove unused code in get_ref_states builtin-remote: refactor duplicated cleanup code string-list: new for_each_string_list() function remote: make match_refs() not short-circuit remote: make match_refs() copy src ref before assigning to peer_ref remote: let guess_remote_head() optionally return all matches remote: make copy_ref() perform a deep copy remote: simplify guess_remote_head() move locate_head() to remote.c move duplicated ref_newer() to remote.c move duplicated get_local_heads() to remote.c ... Conflicts: builtin-clone.c
2009-03-17Merge branch 'tr/maint-1.6.0-send-email-irt'Libravatar Junio C Hamano2-1/+12
* tr/maint-1.6.0-send-email-irt: send-email: test --no-thread --in-reply-to combination send-email: respect in-reply-to regardless of threading Conflicts: t/t9001-send-email.sh
2009-03-17Merge branch 'kb/checkout-optim'Libravatar Junio C Hamano15-170/+296
* kb/checkout-optim: Revert "lstat_cache(): print a warning if doing ping-pong between cache types" checkout bugfix: use stat.mtime instead of stat.ctime in two places Makefile: Set compiler switch for USE_NSEC Create USE_ST_TIMESPEC and turn it on for Darwin Not all systems use st_[cm]tim field for ns resolution file timestamp Record ns-timestamps if possible, but do not use it without USE_NSEC write_index(): update index_state->timestamp after flushing to disk verify_uptodate(): add ce_uptodate(ce) test make USE_NSEC work as expected fix compile error when USE_NSEC is defined check_updates(): effective removal of cache entries marked CE_REMOVE lstat_cache(): print a warning if doing ping-pong between cache types show_patch_diff(): remove a call to fstat() write_entry(): use fstat() instead of lstat() when file is open write_entry(): cleanup of some duplicated code create_directories(): remove some memcpy() and strchr() calls unlink_entry(): introduce schedule_dir_for_removal() lstat_cache(): swap func(length, string) into func(string, length) lstat_cache(): generalise longest_match_lstat_cache() lstat_cache(): small cleanup and optimisation
2009-03-17grep: prefer builtin over external one when coloring resultsLibravatar Nguyễn Thái Ngọc Duy1-0/+2
As far as I know, not all grep programs support coloring, so we should rely on builtin grep. If you want external grep, set color.grep.external to empty string. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17config.txt: Describe special 'none' handling in core.gitProxy.Libravatar Emil Sit1-0/+5
Signed-off-by: Emil Sit <sit@emilsit.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17ls-files: require worktree when --deleted is givenLibravatar Jeff King1-0/+1
The code will end up calling lstat() to check whether the file still exists; obviously this doesn't work if we're not in the worktree. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17git-branch.txt: document -f correctlyLibravatar Michael J Gruber1-2/+2
'git branch -f a b' resets a to b when a exists, rather then deleting a. Say so in the documentation. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17pickaxe: count regex matches only onceLibravatar René Scharfe1-2/+4
When --pickaxe-regex is used, forward past the end of matches instead of advancing to the byte after their start. This way matches count only once, even if the regular expression matches their tail -- like in the fixed-string fork of the code. E.g.: /.*/ used to count the number of bytes instead of the number of lines. /aa/ resulted in a count of two in "aaa" instead of one. Also document the fact that regexec() needs a NUL-terminated string as its second argument by adding an assert(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17git-send-email.txt: describe --compose betterLibravatar Stephen Boyd1-7/+6
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17Tests: use test_cmp instead of diff where possibleLibravatar Miklos Vajna7-24/+24
Several old tests were written before test_cmp was introduced, convert these to test_cmp. If were are at it, fix the order of the arguments where necessary to make expected come first, so the command shows how the test result deviates from the correct output. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17Documentation: remove extra quoting/emphasis around literal textsLibravatar Chris Johnsen7-37/+37
If literal text (asciidoc `...`) can be rendered in a differently from normal text for each output format (man, HTML), then we do not need extra quotes or other wrapping around inline literal text segments. config.txt Change '`...`' to `...`. In asciidoc, the single quotes provide emphasis, literal text should be distintive enough. Change "`...`" to `...`. These double quotes do not work if present in the described config value, so drop them. git-checkout.txt Change "`...`" to `...` or `"..."`. All instances are command line argument examples. One "`-`" becomes `-`. Two others are involve curly braces, so move the double quotes inside the literal region to indicate that they might need to be quoted on the command line of certain shells (tcsh). git-merge.txt Change "`...`" to `...`. All instances are used to describe merge conflict markers. The quotes should are not important. git-rev-parse.txt Change "`...`" to `...`. All instances are around command line arguments where no in-shell quoting should be necessary. gitcli.txt Change `"..."` to `...`. All instances are around command line examples or single command arguments. They do not semanticly belong inside the literal text, and they are not needed outside it. glossary-content.txt user-manual.txt Change "`...`" to `...`. All instances were around command lines. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17git-push.txt: describe how to default to pushing only current branchLibravatar Chris Johnsen1-2/+24
Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17disable post-checkout test on CygwinLibravatar Alex Riesen1-0/+2
It is broken because of the tricks we have to play with lstat to get the bearable perfomance out of the call. Sadly, it disables access to Cygwin's executable attribute, which Windows filesystems do not have at all. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-17Revert "lstat_cache(): print a warning if doing ping-pong between cache types"Libravatar Kjetil Barvik1-23/+0
This reverts commit 7734f04873cfaddd0b148074a633f1f824fd961f. I guess that the reverted commit, 7734f048, has been in test long enough, and should now be reverted. I have not received any info regarding any debug output of the reverted commit, so lets hope that the lstat_cache() function do not cause any ping-pong. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>