summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-02-10Merge branch 'jc/unpack-trees'Junio C Hamano
* jc/unpack-trees: unpack_trees(): skip trees that are the same in all input unpack-trees.c: cosmetic fix Conflicts: unpack-trees.c
2011-02-10Merge branch 'jc/fsck-fixes'Junio C Hamano
* jc/fsck-fixes: fsck: do not give up too early in fsck_dir() fsck: drop unused parameter from traverse_one_object()
2011-02-10Merge branch 'tr/diff-words-test'Junio C Hamano
* tr/diff-words-test: t4034 (diff --word-diff): add a minimum Perl drier test vector t4034 (diff --word-diff): style suggestions userdiff: simplify word-diff safeguard t4034: bulk verify builtin word regex sanity
2011-02-10Merge branch 'rr/fi-import-marks-if-exists'Junio C Hamano
* rr/fi-import-marks-if-exists: fast-import: Introduce --import-marks-if-exists
2011-02-10Merge branch 'jn/unpack-lstat-failure-report'Junio C Hamano
* jn/unpack-lstat-failure-report: unpack-trees: handle lstat failure for existing file unpack-trees: handle lstat failure for existing directory
2011-02-10Merge branch 'ef/alias-via-run-command'Junio C Hamano
* ef/alias-via-run-command: alias: use run_command api to execute aliases
2011-02-10Merge branch 'cb/setup'Junio C Hamano
* cb/setup: setup: translate symlinks in filename when using absolute paths
2011-02-10Merge branch 'ae/better-template-failure-report'Junio C Hamano
* ae/better-template-failure-report: Improve error messages when temporary file creation fails
2011-02-10Merge branch 'jn/cherry-pick-strategy-option'Junio C Hamano
* jn/cherry-pick-strategy-option: cherry-pick/revert: add support for -X/--strategy-option
2011-02-10Merge branch 'maint-1.7.0' into maintJunio C Hamano
* maint-1.7.0: fast-import: introduce "feature notes" command fast-import: clarify documentation of "feature" command Conflicts: Documentation/git-fast-import.txt
2011-02-10fast-import: introduce "feature notes" commandJonathan Nieder
Here is a 'feature' command for streams to use to require support for the notemodify (N) command. When the 'feature' facility was introduced (v1.7.0-rc0~95^2~4, 2009-12-04), the notes import feature was old news (v1.6.6-rc0~21^2~8, 2009-10-09) and it was not obvious it deserved to be a named feature. But now that is clear, since all major non-git fast-import backends lack support for it. Details: on git version with this patch applied, any "feature notes" command in the features/options section at the beginning of a stream will be treated as a no-op. On fast-import implementations without the feature (and older git versions), the command instead errors out with a message like This version of fast-import does not support feature notes. So by declaring use of notes at the beginning of a stream, frontends can avoid wasting time and other resources when the backend does not support notes. (This would be especially important for backends that do not support rewinding history after a botched import.) Improved-by: Thomas Rast <trast@student.ethz.ch> Improved-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-10fast-import: clarify documentation of "feature" commandJonathan Nieder
The "feature" command allows streams to specify options for the import that must not be ignored. Logically, they are part of the stream, even though technically most supported features are synonyms to command-line options. Make this more obvious by being more explicit about how the analogy between most "feature" commands and command-line options works. Treat the feature (import-marks) that does not fit this analogy separately. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-09Documentation/merge subtree How-To: fix typoUwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07pull: Document the "--[no-]recurse-submodules" optionsJens Lehmann
In commits be254a0ea9 and 7dce19d374 the handling of the new fetch options "--[no-]recurse-submodules" had been added to git-pull.sh. But they were not documented as the pull options they now are, so let's fix that. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07quote.h: simplify the inclusionJonathan Nieder
Attempting to include quote.h without first including strbuf.h results in warnings: ./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list ./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want ./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list ... Add a toplevel declaration for struct strbuf to avoid this. While at it, stop including system headers from quote.h. git source files already need to include git-compat-util.h sooner to ensure the appropriate feature test macros are defined. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07sha1_object_info: examine cached_object store tooNguyễn Thái Ngọc Duy
Cached object store was added in d66b37b (Add pretend_sha1_file() interface. - 2007-02-04) as a way to temporarily inject some objects to object store. But only read_sha1_file() knows about this store. While it will return an object from this store, sha1_object_info() will happily say "object not found". Teach sha1_object_info() about the cached store for consistency. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07sha1_file.c: move find_cached_object up so sha1_object_info can use itNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07Add const to parse_{commit,tag}_buffer()Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07diff: support --cached on unborn branchesNguyễn Thái Ngọc Duy
"git diff --cached" (without revision) used to mean "git diff --cached HEAD" (i.e. the user was too lazy to type HEAD). This "correctly" failed when there was no commit yet. But was that correctness useful? This patch changes the definition of what particular command means. It is a request to show what _would_ be committed without further "git add". The internal implementation is the same "git diff --cached HEAD" when HEAD exists, but when there is no commit yet, it compares the index with an empty tree object to achieve the desired result. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07gitweb: Mention optional Perl modules in INSTALLJakub Narebski
Some optional additional Perl modules are required for some of extra features. Mention those in gitweb/INSTALL. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07post-receive-email: suppress error if description file missingSitaram Chamarty
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07t7407: fix line endings for mingw buildPat Thoyts
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07t4120-apply-popt: help systems with core.filemode=falseJohannes Sixt
A test case verifies that filemode-only patches work as expected. Help systems where "test -x" does not work by applying the test patch also to the index, where the effects can be verified even on such systems. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07t3509: use unconstrained initial test to setup repository.Pat Thoyts
The first test did not run on msysGit due to the SYMLINKS constraint and so subsequent tests failed because the test repository was not initialized. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07start_command: flush buffers in the WIN32 code path as wellJohannes Sixt
The POSIX code path did The Right Thing already, but we have to do the same on Windows. This bug caused failures in t5526-fetch-submodules, where the output of 'git fetch --recurse-submodules' was in the wrong order. Debugged-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-07bundle: Use OFS_DELTA in bundle filesShawn O. Pearce
git-bundle first appeared in 2e0afafe ("Add git-bundle") in Feb 2007, and first shipped in Git 1.5.1. However, OFS_DELTA is an even earlier invention, coming about in eb32d236 ("introduce delta objects with offset to base") in Sep 2006, and first shipped in Git 1.4.4.5. OFS_DELTA is smaller, about 3.2%-5% smaller, and is typically faster to access than REF_DELTA because the exact location of the delta base is available after parsing the object header. Since all bundle aware versions of Git are also OFS_DELTA aware, just make it the default. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-31Merge branch 'jl/fetch-submodule-recursive' into maintJunio C Hamano
* jl/fetch-submodule-recursive: t5526: Fix wrong argument order in "git config"
2011-01-31t5526: Fix wrong argument order in "git config"Jens Lehmann
This fixes a typo where the "git config" arguments "-f" and "--unset" were swapped leading to the creation of a "--unset" file. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-31Git 1.7.4v1.7.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27fsck: do not give up too early in fsck_dir()Junio C Hamano
When there is a random garbage file whose name happens to be 38-byte long in a .git/objects/??/ directory, the loop terminated prematurely without marking all the other files that it hasn't checked in the readdir() loop. Treat such a file just like any other garbage file, and do not break out of the readdir() loop. While at it, replace repeated sprintf() calls to a single one outside the loop. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27fsck: drop unused parameter from traverse_one_object()Junio C Hamano
Also add comments to seemingly unsafe pointer dereferences, that are all safe. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27Don't pass "--xhtml" to hightlight in gitweb.perl script.Adam Tkac
The "--xhtml" option is supported only in highlight < 3.0. There is no option to enforce (X)HTML output format compatible with both highlight < 3.0 and highlight >= 3.0. However default output format is HTML so we don't need to explicitly specify it. Signed-off-by: Adam Tkac <atkac@redhat.com> Helped-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27Merge branch 'maint'Junio C Hamano
* maint: rebase -i: clarify in-editor documentation of "exec" tests: sanitize more git environment variables fast-import: treat filemodify with empty tree as delete rebase: give a better error message for bogus branch rebase: use explicit "--" with checkout Conflicts: t/t9300-fast-import.sh
2011-01-27rebase -i: clarify in-editor documentation of "exec"Jonathan Nieder
The hints in the current "instruction sheet" template look like so: # Rebase 3f14246..a1d7e01 onto 3f14246 # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # This does not make it clear that the format of each line is <insn> <commit id> <explanatory text that will be printed> but the reader will probably infer that from the automatically generated pick examples above it. What about the "exec" instruction? By analogy, I might imagine that the format of that line is "exec <command> <explanatory text>", and the "x <cmd>" hint does not address that question (at first I read it as taking an argument <cmd> that is the name of a shell). Meanwhile, the mention of <cmd> makes the hints harder to scan as a table. So remove the <cmd> and add some words to remind the reader that "exec" runs a command named by the rest of the line. To make room, it is left to the manpage to explain that that command is run using $SHELL and that nonzero status from that command will pause the rebase. Wording from Junio. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27tests: sanitize more git environment variablesJeff King
These variables should generally not be set in one's environment, but they do get set by rebase, which means doing an interactive rebase like: pick abcd1234 foo exec make test will cause false negatives in the test suite. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27Merge branch 'jn/fast-import-empty-tree-removal' into maintJunio C Hamano
* jn/fast-import-empty-tree-removal: fast-import: treat filemodify with empty tree as delete
2011-01-27fast-import: treat filemodify with empty tree as deleteJonathan Nieder
Normal git processes do not allow one to build a tree with an empty subtree entry without trying hard at it. This is in keeping with the general UI philosophy: git tracks content, not empty directories. v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include an empty subtree in fast-import's active commit: M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir One can trigger this by reading an empty tree (for example, the tree corresponding to an empty root commit) and trying to move it to a subtree. It is better and more closely analogous to 'git read-tree --prefix' to treat such commands as requests to remove the subtree. Noticed-by: David Barr <david.barr@cordelta.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27rebase: give a better error message for bogus branchJeff King
When you give a non-existent branch to git-rebase, it spits out the usage. This can be confusing, since you may understand the usage just fine, but simply have made a mistake in the branch name. Before: $ git rebase origin bogus Usage: git rebase ... After: $ git rebase origin bogus fatal: no such branch: bogus Usage: git rebase ... Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-27rebase: use explicit "--" with checkoutJeff King
In the case of a ref/pathname conflict, checkout will already do the right thing and checkout the ref. However, for a non-existant ref, this has two advantages: 1. If a file with that pathname exists, rebase will refresh the file from the index and then rebase the current branch instead of producing an error. 2. If no such file exists, the error message using an explicit "--" is better: # before $ git rebase -i origin bogus error: pathspec 'bogus' did not match any file(s) known to git. Could not checkout bogus # after $ git rebase -i origin bogus fatal: invalid reference: bogus Could not checkout bogus The problems seem to be trigger-able only through "git rebase -i", as regular git-rebase checks the validity of the branch parameter as a ref very early on. However, it doesn't hurt to be defensive. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-24Git 1.7.4-rc3v1.7.4-rc3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-24Merge branch 'as/userdiff-pascal'Junio C Hamano
* as/userdiff-pascal: userdiff: match Pascal class methods
2011-01-24Merge branch 'jn/setup-fixes'Junio C Hamano
* jn/setup-fixes: t1510: fix typo in the comment of a test Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase Subject: setup: officially support --work-tree without --git-dir tests: compress the setup tests tests: cosmetic improvements to the repo-setup test t/README: hint about using $(pwd) rather than $PWD in tests Fix expected values of setup tests on Windows
2011-01-24t1510: fix typo in the comment of a testJonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-24Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecaseJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-21Subject: setup: officially support --work-tree without --git-dirJonathan Nieder
The original intention of --work-tree was to allow people to work in a subdirectory of their working tree that does not have an embedded .git directory. Because their working tree, which their $cwd was in, did not have an embedded .git, they needed to use $GIT_DIR to specify where it is, and because this meant there was no way to discover where the root level of the working tree was, so we needed to add $GIT_WORK_TREE to tell git where it was. However, this facility has long been (mis)used by people's scripts to start git from a working tree _with_ an embedded .git directory, let git find .git directory, and then pretend as if an unrelated directory were the associated working tree of the .git directory found by the discovery process. It happens to work in simple cases, and is not worth causing "regression" to these scripts. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-21Documentation: do not treat reset --keep as a special caseJonathan Nieder
The current treatment of "git reset --keep" emphasizes how it differs from --hard (treatment of local changes) and how it breaks down into plumbing (git read-tree -m -u HEAD <commit> followed by git update-ref HEAD <commit>). This can discourage people from using it, since it might seem to be a complex or niche option. Better to emphasize what the --keep flag is intended for --- moving the index and worktree from one commit to another, like "git checkout" would --- so the reader can make a more informed decision about the appropriate situations in which to use it. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-20Correctly report corrupted objectsBjörn Steinbrink
The errno check added in commit 3ba7a06 "A loose object is not corrupt if it cannot be read due to EMFILE" only checked for whether errno is not ENOENT and thus incorrectly treated "no error" as an error condition. Because of that, it never reached the code path that would report that the object is corrupted and instead caused funny errors like: fatal: failed to read object 333c4768ce595793fdab1ef3a036413e2a883853: Success So we have to extend the check to cover the case in which the object file was successfully read, but its contents are corrupted. Reported-by: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-19tests: compress the setup testsJonathan Nieder
New test helpers: - setup_repo, to initialize a repository or gitfile pointing to a repository, with core.bare and core.worktree set as specified; - try_case, to run setup from a given directory and validate the result, with GIT_DIR and GIT_WORK_TREE set as specified; - try_repo, to initialize a repository and call "try_case" from the toplevel and a subdirectory; - run_wt_tests, to run a battery of tests that check for sane behavior when GIT_WORK_TREE is set to various positions relative to the .git dir and cwd. Use these helpers to make the test shorter, less repetitive, and (one hopes) easier to understand and modify. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-19tests: cosmetic improvements to the repo-setup testJonathan Nieder
Give an overview in "sh t1510-repo-setup.sh --help" output. Waste some vertical and horizontal space for clearer code. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-19Merge branch 'maint'Junio C Hamano
* maint: exec_cmd: remove unused extern