summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-04Merge branch 'jn/maint-commit-missing-template'Libravatar Junio C Hamano2-4/+12
* jn/maint-commit-missing-template: commit: error out for missing commit message template
2011-03-04Merge branch 'jk/diffstat-binary'Libravatar Junio C Hamano2-10/+28
* jk/diffstat-binary: diff: don't retrieve binary blobs for diffstat diff: handle diffstat of rewritten binary files
2011-03-04Merge branch 'lt/rename-no-extra-copy-detection'Libravatar Junio C Hamano9-45/+46
* lt/rename-no-extra-copy-detection: diffcore-rename: improve estimate_similarity() heuristics diffcore-rename: properly honor the difference between -M and -C for_each_hash: allow passing a 'void *data' pointer to callback
2011-03-04Merge branch 'jn/test-terminal-punt-on-osx-breakage'Libravatar Junio C Hamano1-3/+19
* jn/test-terminal-punt-on-osx-breakage: tests: skip terminal output tests on OS X
2011-03-04Merge branch 'jk/fail-null-clone'Libravatar Junio C Hamano2-1/+14
* jk/fail-null-clone: clone: die when trying to clone missing local path
2011-03-04Merge branch 'jc/grep--no-index-pathspec-fix'Libravatar Junio C Hamano1-0/+4
* jc/grep--no-index-pathspec-fix: grep --no-index: honor pathspecs correctly
2011-03-02Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: verify-pack: add --stat-only to the synopsis section
2011-03-01verify-pack: add --stat-only to the synopsis sectionLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-28Merge branch 'svn-fe' of git://repo.or.cz/git/jrnLibravatar Junio C Hamano18-233/+1571
* 'svn-fe' of git://repo.or.cz/git/jrn: (31 commits) fast-import: make code "-Wpointer-arith" clean vcs-svn: teach line_buffer about temporary files vcs-svn: allow input from file descriptor vcs-svn: allow character-oriented input vcs-svn: add binary-safe read function t0081 (line-buffer): add buffering tests vcs-svn: tweak test-line-buffer to not assume line-oriented input tests: give vcs-svn/line_buffer its own test script vcs-svn: make test-line-buffer input format more flexible vcs-svn: teach line_buffer to handle multiple input files vcs-svn: collect line_buffer data in a struct vcs-svn: replace buffer_read_string memory pool with a strbuf vcs-svn: eliminate global byte_buffer fast-import: add 'ls' command vcs-svn: Allow change nodes for root of tree (/) vcs-svn: Implement Prop-delta handling vcs-svn: Sharpen parsing of property lines vcs-svn: Split off function for handling of individual properties vcs-svn: Make source easier to read on small screens vcs-svn: More dump format sanity checks ...
2011-02-28fast-import: make code "-Wpointer-arith" cleanLibravatar Jonathan Nieder1-1/+1
The dereference() function to peel a tree-ish and find the underlying tree expects arithmetic to (void *) to work on byte addresses. We should be reading the text of objects through a char * anyway. Noticed-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-28Start preparing release notes to 1.7.5Libravatar Junio C Hamano2-1/+57
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-27Merge branch 'jh/push-default-upstream-configname'Libravatar Junio C Hamano4-9/+12
* jh/push-default-upstream-configname: push.default: Rename 'tracking' to 'upstream'
2011-02-27Merge branch 'lp/config-vername-check'Libravatar Junio C Hamano4-50/+111
* lp/config-vername-check: Disallow empty section and variable names Sanity-check config variable names
2011-02-27Merge branch 'mg/placeholders-are-lowercase'Libravatar Junio C Hamano15-42/+42
* mg/placeholders-are-lowercase: Make <identifier> lowercase in Documentation Make <identifier> lowercase as per CodingGuidelines Make <identifier> lowercase as per CodingGuidelines Make <identifier> lowercase as per CodingGuidelines CodingGuidelines: downcase placeholders in usage messages
2011-02-27Merge branch 'mg/patch-id'Libravatar Junio C Hamano2-0/+38
* mg/patch-id: git-patch-id: do not trip over "no newline" markers git-patch-id: test for "no newline" markers
2011-02-27Merge branch 'mz/rerere-remaining'Libravatar Junio C Hamano5-19/+123
* mz/rerere-remaining: mergetool: don't skip modify/remove conflicts rerere "remaining"
2011-02-27Merge branch 'nd/sorted-builtin-command-list'Libravatar Junio C Hamano1-9/+9
* nd/sorted-builtin-command-list: git.c: reorder builtin command list
2011-02-27Merge branch 'js/maint-merge-use-prepare-commit-msg-hook'Libravatar Junio C Hamano2-8/+41
* js/maint-merge-use-prepare-commit-msg-hook: merge: honor prepare-commit-msg hook
2011-02-27Merge branch 'nd/hash-object-sanity'Libravatar Junio C Hamano5-10/+63
* nd/hash-object-sanity: Make hash-object more robust against malformed objects Conflicts: cache.h
2011-02-27Merge branch 'js/detach-doc'Libravatar Junio C Hamano1-23/+121
* js/detach-doc: git-checkout.txt: improve detached HEAD documentation
2011-02-27Merge branch 'va/p4'Libravatar Junio C Hamano1-4/+31
* va/p4: git-p4: Add copy detection support git-p4: Improve rename detection support
2011-02-27Merge branch 'pw/p4'Libravatar Junio C Hamano2-11/+149
* pw/p4: git-p4: support clone --bare git-p4: decode p4 wildcard characters git-p4: better message for "git-p4 sync" when not cloned git-p4: reinterpret confusing p4 message git-p4: accommodate new move/delete type in p4 git-p4: add missing newline in initial import message git-p4: fix key error for p4 problem git-p4: test script
2011-02-27Merge branch 'uk/checkout-ambiguous-ref'Libravatar Junio C Hamano4-107/+320
* uk/checkout-ambiguous-ref: Rename t2019 with typo "amiguous" that meant "ambiguous" checkout: rearrange update_refs_for_switch for clarity checkout: introduce --detach synonym for "git checkout foo^{commit}" checkout: split off a function to peel away branchname arg checkout: fix bug with ambiguous refs Conflicts: builtin/checkout.c
2011-02-27Merge branch 'sp/maint-smart-http-sans-100-continue'Libravatar Junio C Hamano1-11/+55
* sp/maint-smart-http-sans-100-continue: smart-http: Don't use Expect: 100-Continue
2011-02-27Merge branch 'mo/perl-bidi-pipe-envfix'Libravatar Junio C Hamano2-5/+30
* mo/perl-bidi-pipe-envfix: perl: command_bidi_pipe() method should set-up git environmens
2011-02-27Merge branch 'hv/mingw-fs-funnies'Libravatar Junio C Hamano2-9/+173
* hv/mingw-fs-funnies: mingw_rmdir: set errno=ENOTEMPTY when appropriate mingw: add fallback for rmdir in case directory is in use mingw: make failures to unlink or move raise a question mingw: work around irregular failures of unlink on windows mingw: move unlink wrapper to mingw.c
2011-02-27Merge branch 'en/object-list-with-pathspec'Libravatar Junio C Hamano2-2/+79
* en/object-list-with-pathspec: Add testcases showing how pathspecs are handled with rev-list --objects Make rev-list --objects work together with pathspecs
2011-02-27Merge branch 'nd/struct-pathspec'Libravatar Junio C Hamano25-444/+649
* nd/struct-pathspec: (22 commits) t6004: add pathspec globbing test for log family t7810: overlapping pathspecs and depth limit grep: drop pathspec_matches() in favor of tree_entry_interesting() grep: use writable strbuf from caller for grep_tree() grep: use match_pathspec_depth() for cache/worktree grepping grep: convert to use struct pathspec Convert ce_path_match() to use match_pathspec_depth() Convert ce_path_match() to use struct pathspec struct rev_info: convert prune_data to struct pathspec pathspec: add match_pathspec_depth() tree_entry_interesting(): optimize wildcard matching when base is matched tree_entry_interesting(): support wildcard matching tree_entry_interesting(): fix depth limit with overlapping pathspecs tree_entry_interesting(): support depth limit tree_entry_interesting(): refactor into separate smaller functions diff-tree: convert base+baselen to writable strbuf glossary: define pathspec Move tree_entry_interesting() to tree-walk.c and export it tree_entry_interesting(): remove dependency on struct diff_options Convert struct diff_options to use struct pathspec ...
2011-02-27gitweb: Make i18n (encoding) tests in t9500 leave clean stateLibravatar Jakub Narebski1-1/+5
The most important issue is that after unsetting `i18n.commitencoding' config variable t9500 no longer will use author and comitter name containing ISO-8859-1 characters, which are invalid UTF-8 characters. Besides it is good practice in general to clean up the state in tests. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-27git-add: make -A description clearer vs. -uLibravatar Michael J Gruber1-1/+1
Currently, it sounds as if "notice removal of files" distinguishes "-A" from "-u", and there is no mention of the worktree. But both notice the removal, and only "-A" adds changes from untracked files. Say so. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-27Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: branch_merged: fix grammar in warning
2011-02-27branch_merged: fix grammar in warningLibravatar Eric Hanchrow1-1/+1
Signed-off-by: Eric Hanchrow <eric.hanchrow@gmail.com> Helped-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-26Merge commit 'jn/svn-fe' of git://github.com/gitster/git into svn-feLibravatar Jonathan Nieder7-89/+855
* git://github.com/gitster/git: vcs-svn: Allow change nodes for root of tree (/) vcs-svn: Implement Prop-delta handling vcs-svn: Sharpen parsing of property lines vcs-svn: Split off function for handling of individual properties vcs-svn: Make source easier to read on small screens vcs-svn: More dump format sanity checks vcs-svn: Reject path nodes without Node-action vcs-svn: Delay read of per-path properties vcs-svn: Combine repo_replace and repo_modify functions vcs-svn: Replace = Delete + Add vcs-svn: handle_node: Handle deletion case early vcs-svn: Use mark to indicate nodes with included text vcs-svn: Unclutter handle_node by introducing have_props var vcs-svn: Eliminate node_ctx.mark global vcs-svn: Eliminate node_ctx.srcRev global vcs-svn: Check for errors from open() vcs-svn: Allow simple v3 dumps (no deltas yet) Conflicts: t/t9010-svn-fe.sh vcs-svn/svndump.c
2011-02-26vcs-svn: teach line_buffer about temporary filesLibravatar Jonathan Nieder3-1/+52
It can sometimes be useful to write information temporarily to file, to read back later. These functions allow a program to use the line_buffer facilities when doing so. It works like this: 1. find a unique filename with buffer_tmpfile_init. 2. rewind with buffer_tmpfile_rewind. This returns a stdio handle for writing. 3. when finished writing, declare so with buffer_tmpfile_prepare_to_read. The return value indicates how many bytes were written. 4. read whatever portion of the file is needed. 5. if finished, remove the temporary file with buffer_deinit. otherwise, go back to step 2, The svn support would use this to buffer the postimage from delta application until the length is known and fast-import can receive the resulting blob. Based-on-patch-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: allow input from file descriptorLibravatar Jonathan Nieder5-7/+31
Based-on-patch-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: allow character-oriented inputLibravatar Jonathan Nieder2-0/+6
buffer_read_char can be used in place of buffer_read_string(1) to avoid consuming valuable static buffer space. The delta applier will use this to read variable-length integers one byte at a time. Underneath, it is fgetc, wrapped so the line_buffer library can maintain its role as gatekeeper of input. Later it might be worth checking if fgetc_unlocked is faster --- most line_buffer functions are not thread-safe anyway. Helpd-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: add binary-safe read functionLibravatar Jonathan Nieder4-0/+35
buffer_read_string works well for non line-oriented input except for one problem: it does not tell the caller how many bytes were actually written. This means that unless one is very careful about checking for errors (and eof) the calling program cannot tell the difference between the string "foo" followed by an early end of file and the string "foo\0bar\0baz". So introduce a variant that reports the length, too, a thinner wrapper around strbuf_fread. Its result is written to a strbuf so the caller does not need to keep track of the number of bytes read. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26t0081 (line-buffer): add buffering testsLibravatar Jonathan Nieder2-4/+128
POSIX makes the behavior of read(2) from a pipe fairly clear: a read from an empty pipe will block until there is data available and any other read will not block, prefering to return a partial result. Likewise, fread(3) and fgets(3) are clearly specified to act as though implemented by calling fgetc(3) in a simple loop. But the buffering behavior of fgetc is less clear. Luckily, no sane platform is going to implement fgetc by calling the equivalent of read(2) more than once. fgetc has to be able to return without filling its buffer to preserve errno when errors are encountered anyway. So let's assume the simpler behavior (trust) but add some tests to catch insane platforms that violate that when they come (verify). First check that fread can handle a 0-length read from an empty fifo. Because open(O_RDONLY) blocks until the writing end is open, open the writing end of the fifo in advance in a subshell. Next try short inputs from a pipe that is not filled all the way. Lastly (two tests) try very large inputs from a pipe that will not fit in the relevant buffers. The first of these tests reads a little more than 8192 bytes, which is BUFSIZ (the size of stdio's buffers) on this Linux machine. The second reads a little over 64 KiB (the pipe capacity on Linux) and is not run unless requested by setting the GIT_REMOTE_SVN_TEST_BIG_FILES environment variable. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: tweak test-line-buffer to not assume line-oriented inputLibravatar Jonathan Nieder2-17/+20
Do not expect an implicit newline after each input record. Use a separate command to exercise buffer_skip_bytes. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26tests: give vcs-svn/line_buffer its own test scriptLibravatar Jonathan Nieder2-54/+67
Split the line_buffer test into small pieces and move it to its own file as preparation for adding more tests. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: make test-line-buffer input format more flexibleLibravatar Jonathan Nieder2-29/+45
Imitate the input format of test-obj-pool to support arbitrary sequences of commands rather than alternating read/copy. This should make it easier to add tests that exercise other line_buffer functions. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: teach line_buffer to handle multiple input filesLibravatar Jonathan Nieder7-46/+50
Collect the line_buffer state in a newly public line_buffer struct. Callers can use multiple line_buffers to manage input from multiple files at a time. svn-fe's delta applier will use this to stream a delta from svnrdump and the preimage it applies to from fast-import at the same time. The tests don't take advantage of the new features, but I think that's okay. It is easier to find lingering examples of nonreentrant code by searching for "static" in line_buffer.c. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: collect line_buffer data in a structLibravatar Jonathan Nieder2-23/+33
Prepare for the line_buffer lib to support input from multiple files, by collecting global state in a struct that can be easily passed around. No API change yet. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: replace buffer_read_string memory pool with a strbufLibravatar Jonathan Nieder1-10/+6
obj_pool is inherently global and does not use the standard growing factor alloc_nr, which makes it feel out of place in the git codebase. Plus it is overkill for this application: all that is needed is a buffer that can grow between requests to accomodate larger strings. Use a strbuf instead. As a side effect, this improves the error handling: allocation failures will result in a clean exit instead of segfaults. It would be nice to add a test case (using ulimit or failmalloc) but that can wait for another day. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26vcs-svn: eliminate global byte_bufferLibravatar Jonathan Nieder1-1/+2
The data stored in byte_buffer[] is always either discarded or written to stdout immediately. No need for it to persist between function calls. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-02-26fast-import: add 'ls' commandLibravatar David Barr3-14/+303
Lazy fast-import frontend authors that want to rely on the backend to keep track of the content of the imported trees _almost_ have what they need in the 'cat-blob' command (v1.7.4-rc0~30^2~3, 2010-11-28). But it is not quite enough, since (1) cat-blob can be used to retrieve the content of files, but not their mode, and (2) using cat-blob requires the frontend to keep track of a name (mark number or object id) for each blob to be retrieved Introduce an 'ls' command to complement cat-blob and take care of the remaining needs. The 'ls' command finds what is at a given path within a given tree-ish (tag, commit, or tree): 'ls' SP <dataref> SP <path> LF or in fast-import's active commit: 'ls' SP <path> LF The response is a single line sent through the cat-blob channel, imitating ls-tree output. So for example: FE> ls :1 Documentation gfi> 040000 tree 9e6c2b599341d28a2a375f8207507e0a2a627fe9 Documentation FE> ls 9e6c2b599341d28a2a375f8207507e0a2a627fe9 git-fast-import.txt gfi> 100644 blob 4f92954396e3f0f97e75b6838a5635b583708870 git-fast-import.txt FE> ls :1 RelNotes gfi> 120000 blob b942e499449d97aeb50c73ca2bdc1c6e6d528743 RelNotes FE> cat-blob b942e499449d97aeb50c73ca2bdc1c6e6d528743 gfi> b942e499449d97aeb50c73ca2bdc1c6e6d528743 blob 32 gfi> Documentation/RelNotes/1.7.4.txt The most interesting parts of the reply are the first word, which is a 6-digit octal mode (regular file, executable, symlink, directory, or submodule), and the part from the second space to the tab, which is a <dataref> that can be used in later cat-blob, ls, and filemodify (M) commands to refer to the content (blob, tree, or commit) at that path. If there is nothing there, the response is "missing some/path". The intent is for this command to be used to read files from the active commit, so a frontend can apply patches to them, and to copy files and directories from previous revisions. For example, proposed updates to svn-fe use this command in place of its internal representation of the repository directory structure. This simplifies the frontend a great deal and means support for resuming an import in a separate fast-import run (i.e., incremental import) is basically free. Signed-off-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Improved-by: Junio C Hamano <gitster@pobox.com> Improved-by: Sverre Rabbelier <srabbelier@gmail.com>
2011-02-25commit: error out for missing commit message templateLibravatar Jonathan Nieder2-4/+12
When "git commit" was rewritten in C (v1.5.4-rc0~78^2~30, 2007-11-08), a subtle bug in --template was introduced. If the file named by a --template parameter is missing, previously git would error out with a message: Commit template file does not exist. but in the C version the --template parameter gets ignored and the default template is used. t7500 has two tests for this case which would have caught it, except that with the default $EDITOR, the commit message template is left unmodified, causing 'git commit' to error out and the test to succeed. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-22update-index --refresh --porcelain: add missing constLibravatar Jonathan Nieder2-3/+3
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-22checkout: add missing const to describe_detached_headLibravatar Jonathan Nieder1-1/+1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-22Disallow empty section and variable namesLibravatar Libor Pechacek2-1/+10
It is possible to break your repository config by creating an invalid key. The config parser in turn chokes on it: $ git init Initialized empty Git repository in /tmp/gittest/.git/ $ git config .foo false $ git config core.bare fatal: bad config file line 6 in .git/config This patch makes git-config reject keys which start or end with a dot and adds tests for these cases. Signed-off-by: Libor Pechacek <lpechacek@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>