swh:1:snp:47f1e8bb459169b0feb652a9c3d9cbabd8526d4a

sort by:
Revision Author Date Message Commit Date
ee6ad5f Git 2.5.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 September 2015, 19:16:17 UTC
8833ccd Merge branch 'dt/untracked-subdir' into maint The experimental untracked-cache feature were buggy when paths with a few levels of subdirectories are involved. * dt/untracked-subdir: untracked cache: fix entry invalidation untracked-cache: fix subdirectory handling t7063: use --force-untracked-cache to speed up a bit untracked-cache: support sparse checkout 17 September 2015, 19:12:29 UTC
d6579d9 Merge branch 'br/svn-doc-include-paths-config' into maint * br/svn-doc-include-paths-config: git-svn doc: mention "svn-remote.<name>.include-paths" 17 September 2015, 19:11:46 UTC
cfc3e0e Merge branch 'ah/submodule-typofix-in-error' into maint Error string fix. * ah/submodule-typofix-in-error: git-submodule: remove extraneous space from error message 17 September 2015, 19:11:08 UTC
02dad26 Merge branch 'js/maint-am-skip-performance-regression' into maint * js/maint-am-skip-performance-regression: am --skip/--abort: merge HEAD/ORIG_HEAD tree into index 17 September 2015, 19:03:02 UTC
b9d6689 am --skip/--abort: merge HEAD/ORIG_HEAD tree into index f8da6801 (am --skip: support skipping while on unborn branch, 2015-06-06) introduced a performance regression to "git am --skip", where it used "read-tree" to reconstruct the index from scratch without reusing the cached stat information. This is a backport of the corresponding patch to the builtin am in 2.6: 3ecc704 (am --skip/--abort: merge HEAD/ORIG_HEAD tree into index, 2015-08-19). Reportedly, it can make a huge difference on Windows, in one case a `git rebase --skip` took 1m40s without, and 5s with, this patch. cf. https://github.com/git-for-windows/git/issues/365 Reported-and-suggested-by: Kim Gybels <kgybels@infogroep.be> Acked-by: Paul Tan <pyokagan@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 September 2015, 21:22:56 UTC
27ea6f8 Git 2.5.2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 17:46:07 UTC
3d3caf0 Sync with 2.4.9 04 September 2015, 17:43:23 UTC
74b6763 Git 2.4.9 Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 17:36:14 UTC
ef0e938 Sync with 2.3.9 04 September 2015, 17:34:19 UTC
ecad27c Git 2.3.9 Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 17:32:15 UTC
8267cd1 Sync with 2.2.3 04 September 2015, 17:29:28 UTC
441c4a4 Git 2.2.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 17:26:23 UTC
f54cb05 Merge branch 'jk/long-paths' into maint-2.2 04 September 2015, 17:25:23 UTC
78f23bd show-branch: use a strbuf for reflog descriptions When we show "branch@{0}", we format into a fixed-size buffer using sprintf. This can overflow if you have long branch names. We can fix it by using a temporary strbuf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 16:48:26 UTC
5015f01 read_info_alternates: handle paths larger than PATH_MAX This function assumes that the relative_base path passed into it is no larger than PATH_MAX, and writes into a fixed-size buffer. However, this path may not have actually come from the filesystem; for example, add_submodule_odb generates a path using a strbuf and passes it in. This is hard to trigger in practice, though, because the long submodule directory would have to exist on disk before we would try to open its info/alternates file. We can easily avoid the bug, though, by simply creating the filename on the heap. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 16:36:51 UTC
c29edfe notes: use a strbuf in add_non_note When we are loading a notes tree into our internal hash table, we also collect any files that are clearly non-notes. We format the name of the file into a PATH_MAX buffer, but unlike true notes (which cannot be larger than a fanned-out sha1 hash), these tree entries can be arbitrarily long, overflowing our buffer. We can fix this by switching to a strbuf. It doesn't even cost us an extra allocation, as we can simply hand ownership of the buffer over to the non-note struct. This is of moderate security interest, as you might fetch notes trees from an untrusted remote. However, we do not do so by default, so you would have to manually fetch into the notes namespace. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 16:36:28 UTC
f514ef9 verify_absent: allow filenames longer than PATH_MAX When unpack-trees wants to know whether a path will overwrite anything in the working tree, we use lstat() to see if there is anything there. But if we are going to write "foo/bar", we can't just lstat("foo/bar"); we need to look for leading prefixes (e.g., "foo"). So we use the lstat cache to find the length of the leading prefix, and copy the filename up to that length into a temporary buffer (since the original name is const, we cannot just stick a NUL in it). The copy we make goes into a PATH_MAX-sized buffer, which will overflow if the prefix is longer than PATH_MAX. How this happens is a little tricky, since in theory PATH_MAX is the biggest path we will have read from the filesystem. But this can happen if: - the compiled-in PATH_MAX does not accurately reflect what the filesystem is capable of - the leading prefix is not _quite_ what is on disk; it contains the next element from the name we are checking. So if we want to write "aaa/bbb/ccc/ddd" and "aaa/bbb" exists, the prefix of interest is "aaa/bbb/ccc". If "aaa/bbb" approaches PATH_MAX, then "ccc" can overflow it. So this can be triggered, but it's hard to do. In particular, you cannot just "git clone" a bogus repo. The verify_absent checks happen before unpack-trees writes anything to the filesystem, so there are never any leading prefixes during the initial checkout, and the bug doesn't trigger. And by definition, these files are larger than PATH_MAX, so writing them will fail, and clone will complain (though it may write a partial path, which will cause a subsequent "git checkout" to hit the bug). We can fix it by creating the temporary path on the heap. The extra malloc overhead is not important, as we are already making at least one stat() call (and probably more for the prefix discovery). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 September 2015, 15:50:50 UTC
fb8880d Merge branch 'ee/clean-test-fixes' into maint * ee/clean-test-fixes: t7300: fix broken && chains 04 September 2015, 02:18:05 UTC
5af77d1 Merge branch 'jk/log-missing-default-HEAD' into maint "git init empty && git -C empty log" said "bad default revision 'HEAD'", which was found to be a bit confusing to new users. * jk/log-missing-default-HEAD: log: diagnose empty HEAD more clearly 04 September 2015, 02:18:04 UTC
9d93988 Merge branch 'cc/trailers-corner-case-fix' into maint The "interpret-trailers" helper mistook a multi-paragraph title of a commit log message with a colon in it as the end of the trailer block. * cc/trailers-corner-case-fix: trailer: support multiline title trailer: retitle a test and correct an in-comment message trailer: ignore first line of message 04 September 2015, 02:18:03 UTC
311e5ce Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint When re-priming the cache-tree opportunistically while committing the in-core index as-is, we mistakenly invalidated the in-core index too aggressively, causing the experimental split-index code to unnecessarily rewrite the on-disk index file(s). * dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update: commit: don't rewrite shared index unnecessarily 04 September 2015, 02:18:02 UTC
1c82039 Merge branch 'rs/archive-zip-many' into maint "git archive" did not use zip64 extension when creating an archive with more than 64k entries, which nobody should need, right ;-)? * rs/archive-zip-many: archive-zip: support more than 65535 entries archive-zip: use a local variable to store the creator version t5004: test ZIP archives with many entries 04 September 2015, 02:18:01 UTC
ae6ac84 Merge branch 'jc/calloc-pathspec' into maint Minor code cleanup. * jc/calloc-pathspec: ps_matched: xcalloc() takes nmemb and then element size 04 September 2015, 02:18:00 UTC
8136099 Merge branch 'ss/fix-config-fd-leak' into maint * ss/fix-config-fd-leak: config: close config file handle in case of error 04 September 2015, 02:17:59 UTC
dc4e7b0 Merge branch 'sg/wt-status-header-inclusion' into maint * sg/wt-status-header-inclusion: wt-status: move #include "pathspec.h" to the header 04 September 2015, 02:17:57 UTC
659227b Merge branch 'po/po-readme' into maint Doc updates for i18n. * po/po-readme: po/README: Update directions for l10n contributors 04 September 2015, 02:17:56 UTC
57a2bb1 Merge branch 'sg/t3020-typofix' into maint * sg/t3020-typofix: t3020: fix typo in test description 04 September 2015, 02:17:55 UTC
c1fa16b Merge branch 'as/docfix-reflog-expire-unreachable' into maint Docfix. * as/docfix-reflog-expire-unreachable: Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable 04 September 2015, 02:17:53 UTC
d6c196a Merge branch 'nd/fixup-linked-gitdir' into maint The code in "multiple-worktree" support that attempted to recover from an inconsistent state updated an incorrect file. * nd/fixup-linked-gitdir: setup: update the right file in multiple checkouts 04 September 2015, 02:17:53 UTC
e654e3b Merge branch 'jk/rev-list-has-no-notes' into maint "git rev-list" does not take "--notes" option, but did not complain when one is given. * jk/rev-list-has-no-notes: rev-list: make it obvious that we do not support notes 04 September 2015, 02:17:53 UTC
fa6d374 Merge branch 'jk/fix-alias-pager-config-key-warnings' into maint Because the configuration system does not allow "alias.0foo" and "pager.0foo" as the configuration key, the user cannot use '0foo' as a custom command name anyway, but "git 0foo" tried to look these keys up and emitted useless warnings before saying '0foo is not a git command'. These warning messages have been squelched. * jk/fix-alias-pager-config-key-warnings: config: silence warnings for command names with invalid keys 04 September 2015, 02:17:52 UTC
0b2cef2 Merge branch 'nd/dwim-wildcards-as-pathspecs' into maint Test updates for Windows. * nd/dwim-wildcards-as-pathspecs: t2019: skip test requiring '*' in a file name non Windows 04 September 2015, 02:17:51 UTC
969560b Merge branch 'sg/help-group' into maint We rewrote one of the build scripts in Perl but this reimplements in Bourne shell. * sg/help-group: generate-cmdlist: re-implement as shell script 04 September 2015, 02:17:51 UTC
d11448f Merge branch 'ps/t1509-chroot-test-fixup' into maint t1509 test that requires a dedicated VM environment had some bitrot, which has been corrected. * ps/t1509-chroot-test-fixup: tests: fix cleanup after tests in t1509-root-worktree tests: fix broken && chains in t1509-root-worktree 04 September 2015, 02:17:50 UTC
8b27071 Merge branch 'jh/strbuf-read-use-read-in-full' into maint strbuf_read() used to have one extra iteration (and an unnecessary strbuf_grow() of 8kB), which was eliminated. * jh/strbuf-read-use-read-in-full: strbuf_read(): skip unnecessary strbuf_grow() at eof 04 September 2015, 02:17:50 UTC
6c0850f Merge branch 'jk/long-error-messages' into maint The codepath to produce error messages had a hard-coded limit to the size of the message, primarily to avoid memory allocation while calling die(). * jk/long-error-messages: vreportf: avoid intermediate buffer vreportf: report to arbitrary filehandles 04 September 2015, 02:17:49 UTC
cbcd3dc Merge branch 'cb/open-noatime-clear-errno' into maint When trying to see that an object does not exist, a state errno leaked from our "first try to open a packfile with O_NOATIME and then if it fails retry without it" logic on a system that refuses O_NOATIME. This confused us and caused us to die, saying that the packfile is unreadable, when we should have just reported that the object does not exist in that packfile to the caller. * cb/open-noatime-clear-errno: git_open_noatime: return with errno=0 on success 04 September 2015, 02:17:49 UTC
03ea027 Merge branch 'mh/get-remote-group-fix' into maint An off-by-one error made "git remote" to mishandle a remote with a single letter nickname. * mh/get-remote-group-fix: get_remote_group(): use skip_prefix() get_remote_group(): eliminate superfluous call to strcspn() get_remote_group(): rename local variable "space" to "wordlen" get_remote_group(): handle remotes with single-character names 04 September 2015, 02:17:48 UTC
5c99995 trailer: support multiline title We currently ignore the first line passed to `git interpret-trailers`, when looking for the beginning of the trailers. Unfortunately this does not work well when a commit is created with a line break in the title, using for example the following command: git commit -m 'place of code: change we made' That's why instead of ignoring only the first line, it is better to ignore the first paragraph. Signed-off-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2015, 18:14:08 UTC
1733ed3 t7300: fix broken && chains While we are here, remove some boilerplate by using test_commit. Signed-off-by: Erik Elfström <erik.elfstrom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2015, 16:46:36 UTC
ce11360 log: diagnose empty HEAD more clearly If you init or clone an empty repository, the initial message from running "git log" is not very friendly: $ git init Initialized empty Git repository in /home/peff/foo/.git/ $ git log fatal: bad default revision 'HEAD' Let's detect this situation and write a more friendly message: $ git log fatal: your current branch 'master' does not have any commits yet We also detect the case that 'HEAD' points to a broken ref; this should be even less common, but is easy to see. Note that we do not diagnose all possible cases. We rely on resolve_ref, which means we do not get information about complex cases. E.g., "--default master" would use dwim_ref to find "refs/heads/master", but we notice only that "master" does not exist. Similarly, a complex sha1 expression like "--default HEAD^2" will not resolve as a ref. But that's OK. We fall back to a generic error message in those cases, and they are unlikely to be used anyway. Catching an empty or broken "HEAD" improves the common case, and the other cases are not regressed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2015, 16:34:20 UTC
475a344 commit: don't rewrite shared index unnecessarily Remove a cache invalidation which would cause the shared index to be rewritten on as-is commits. When the cache-tree has changed, we need to update it. But we don't necessarily need to update the shared index. So setting active_cache_changed to SOMETHING_CHANGED is unnecessary. Instead, we let update_main_cache_tree just update the CACHE_TREE_CHANGED bit. In order to test this, make test-dump-split-index not segfault on missing replace_bitmap/delete_bitmap. This new codepath is not called now that the test passes, but is necessary to avoid a segfault when the new test is run with the old builtin/commit.c code. Signed-off-by: David Turner <dturner@twopensource.com> Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2015, 15:41:07 UTC
b80fa84 git-submodule: remove extraneous space from error message Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Acked-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 18:57:24 UTC
c415fb7 Git 2.5.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 18:19:57 UTC
c3cb7b6 Mingw: verify both ends of the pipe () call The code to open and test the second end of the pipe clearly imitates the code for the first end. A little too closely, though... Let's fix the obvious copy-edit bug. Signed-off-by: Jose F. Morales <jfmcjf@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 18:11:50 UTC
88329ca archive-zip: support more than 65535 entries Support more than 65535 entries cleanly by writing a "zip64 end of central directory record" (with a 64-bit field for the number of entries) before the usual "end of central directory record" (which contains only a 16-bit field). InfoZIP's zip does the same. Archives with 65535 or less entries are not affected. Programs that extract all files like InfoZIP's zip and 7-Zip ignored the field and could extract all files already. Software that relies on the ZIP file directory to show a list of contained files quickly to simulate to normal directory like Windows' built-in ZIP functionality only saw a subset of the included files. Windows supports ZIP64 since Vista according to https://en.wikipedia.org/wiki/Zip_%28file_format%29#ZIP64. Suggested-by: Johannes Schauer <josch@debian.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 15:54:57 UTC
0f747f9 archive-zip: use a local variable to store the creator version Use a simpler conditional right next to the code which makes a higher creator version necessary -- namely symlink handling and support for executable files -- instead of a long line with a ternary operator. The resulting code has more lines but is simpler and allows reuse of the value easily. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 15:52:22 UTC
19ee294 t5004: test ZIP archives with many entries A ZIP file directory has a 16-bit field for the number of entries it contains. There are 64-bit extensions to deal with that. Demonstrate that git archive --format=zip currently doesn't use them and instead overflows the field. InfoZIP's unzip doesn't care about this field and extracts all files anyway. Software that uses the directory for presenting a filesystem like view quickly -- notably Windows -- depends on it, but doesn't lend itself to an automatic test case easily. Use InfoZIP's zipinfo, which probably isn't available everywhere but at least can provides *some* way to check this field. To speed things up a bit create and commit only a subset of the files and build a fake tree out of duplicates and pass that to git archive. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 August 2015, 15:52:10 UTC
6262fe9 trailer: retitle a test and correct an in-comment message Signed-off-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2015, 19:16:56 UTC
486e1e1 git-svn doc: mention "svn-remote.<name>.include-paths" Mention the configuration variable in a way similar to how "svn-remote.<name>.ignore-paths" is mentioned. Signed-off-by: Brett Randall <javabrett@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2015, 17:27:26 UTC
52f6893 Merge branch 'jk/guess-repo-name-regression-fix' into maint "git clone $URL" in recent releases of Git contains a regression in the code that invents a new repository name incorrectly based on the $URL. This has been corrected. * jk/guess-repo-name-regression-fix: clone: use computed length in guess_dir_name clone: add tests for output directory 25 August 2015, 23:09:17 UTC
84deb3e Merge branch 'jk/test-with-x' into maint Running tests with the "-x" option to make them verbose had some unpleasant interactions with other features of the test suite. * jk/test-with-x: test-lib: disable trace when test is not verbose test-lib: turn off "-x" tracing during chain-lint check 25 August 2015, 23:09:16 UTC
7a23807 Merge branch 'sb/check-return-from-read-ref' into maint * sb/check-return-from-read-ref: transport-helper: die on errors reading refs. 25 August 2015, 23:09:16 UTC
425a4c7 Merge branch 'mm/pull-upload-pack' into maint "git pull" in recent releases of Git has a regression in the code that allows custom path to the --upload-pack=<program>. This has been corrected. Note that this is irrelevant for 'master' with "git pull" rewritten in C. * mm/pull-upload-pack: pull: pass upload_pack only when it was given pull.sh: quote $upload_pack when passing it to git-fetch 25 August 2015, 23:09:15 UTC
13e0e28 pull: pass upload_pack only when it was given The upload_pack shell variable is initialized to an empty string, so conditional expansion with ${upload_pack+"$upload_pack"} would not work very well. You need a colon there. Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 August 2015, 23:08:58 UTC
82aec45 generate-cmdlist: re-implement as shell script 527ec39 (generate-cmdlist: parse common group commands, 2015-05-21) replaced generate-cmdlist.sh with a more functional Perl version, generate-cmdlist.perl. The Perl version gleans named tags from a new "common groups" section in command-list.txt and recognizes those tags in "command list" section entries in place of the old 'common' tag. This allows git-help to, not only recognize, but also group common commands. Although the tests require Perl, 527ec39 creates an unconditional dependence upon Perl in the build system itself, which can not be overridden with NO_PERL. Such a dependency may be undesirable; for instance, the 'git-lite' package in the FreeBSD ports tree is intended as a minimal Git installation (which may, for example, be useful on servers needing only local clone and update capability), which, historically, has not depended upon Perl[1]. Therefore, revive generate-cmdlist.sh and extend it to recognize "common groups" and its named tags. Retire generate-cmdlist.perl. [1]: http://thread.gmane.org/gmane.comp.version-control.git/275905/focus=276132 Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 August 2015, 18:24:31 UTC
82fde87 setup: update the right file in multiple checkouts This code is introduced in 23af91d (prune: strategies for linked checkouts - 2014-11-30), and it's supposed to implement this rule from that commit's message: - linked checkouts are supposed to keep its location in $R/gitdir up to date. The use case is auto fixup after a manual checkout move. Note the name, "$R/gitdir", not "$R/gitfile". Correct the path to be updated accordingly. While at there, make sure I/O errors are not silently dropped. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 August 2015, 16:39:08 UTC
2aea7a5 rev-list: make it obvious that we do not support notes The rev-list command does not have the internal infrastructure to display notes. Running: git rev-list --notes HEAD will silently ignore the "--notes" option. Running: git rev-list --notes --grep=. HEAD will crash on an assert. Running: git rev-list --format=%N HEAD will place a literal "%N" in the output (it does not even expand to an empty string). Let's have rev-list tell the user that it cannot fill the user's request, rather than silently producing wrong data. Likewise, let's remove mention of the notes options from the rev-list documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2015, 17:33:15 UTC
9e9de18 config: silence warnings for command names with invalid keys When we are running the git command "foo", we may have to look up the config keys "pager.foo" and "alias.foo". These config schemes are mis-designed, as the command names can be anything, but the config syntax has some restrictions. For example: $ git foo_bar error: invalid key: pager.foo_bar error: invalid key: alias.foo_bar git: 'foo_bar' is not a git command. See 'git --help'. You cannot name an alias with an underscore. And if you have an external command with one, you cannot configure its pager. In the long run, we may develop a different config scheme for these features. But in the near term (and because we'll need to support the existing scheme indefinitely), we should at least squelch the error messages shown above. These errors come from git_config_parse_key. Ideally we would pass a "quiet" flag to the config machinery, but there are many layers between the pager code and the key parsing. Passing a flag through all of those would be an invasive change. Instead, let's provide a config function to report on whether a key is syntactically valid, and have the pager and alias code skip lookup for bogus keys. We can build this easily around the existing git_config_parse_key, with two minor modifications: 1. We now handle a NULL store_key, to validate but not write out the normalized key. 2. We accept a "quiet" flag to avoid writing to stderr. This doesn't need to be a full-blown public "flags" field, because we can make the existing implementation a static helper function, keeping the mess contained inside config.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2015, 15:52:23 UTC
7aa9b9b wt-status: move #include "pathspec.h" to the header The declaration of 'struct wt_status' requires the declararion of 'struct pathspec'. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2015, 21:49:27 UTC
dc5d553 trailer: ignore first line of message When looking for the start of the trailers in the message we are passed, we should ignore the first line of the message. The reason is that if we are passed a patch or commit message then the first line should be the patch title. If we are passed only trailers we can expect that they start with an empty line that can be ignored too. This way we can properly process commit messages that have only one line with something that looks like a trailer, for example like "area of code: change we made". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2015, 17:17:47 UTC
f04c690 Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable Change <ref> to <pattern> in the description of gc.*.reflogExpireUnreachable, since that is what the text refers to. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2015, 17:15:13 UTC
1269847 t3020: fix typo in test description Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2015, 20:14:21 UTC
8b54c23 ps_matched: xcalloc() takes nmemb and then element size Even though multiplication is commutative, the order of arguments should be xcalloc(nmemb, size). ps_matched is an array of 1-byte element whose size is the same as the number of pathspec elements. Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2015, 16:57:38 UTC
552a736 Start preparing for 2.5.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2015, 21:48:13 UTC
91db009 Merge branch 'ta/docfix-index-format-tech' into maint * ta/docfix-index-format-tech: typofix for index-format.txt 19 August 2015, 21:41:34 UTC
b994b9b Merge branch 'sb/parse-options-codeformat' into maint * sb/parse-options-codeformat: parse-options: align curly braces for all options 19 August 2015, 21:41:34 UTC
223b55a Merge branch 'sb/remove-unused-var-from-builtin-add' into maint * sb/remove-unused-var-from-builtin-add: add: remove dead code 19 August 2015, 21:41:33 UTC
24493ff Merge branch 'kn/tag-doc-fix' into maint * kn/tag-doc-fix: Documentation/tag: remove double occurance of "<pattern>" 19 August 2015, 21:41:32 UTC
cacee08 Merge branch 'es/doc-clean-outdated-tools' into maint * es/doc-clean-outdated-tools: Documentation/git-tools: retire manually-maintained list Documentation/git-tools: drop references to defunct tools Documentation/git-tools: fix item text formatting Documentation/git-tools: improve discoverability of Git wiki Documentation/git: drop outdated Cogito reference 19 August 2015, 21:41:31 UTC
25a294e Merge branch 'nd/export-worktree' into maint Running an aliased command from a subdirectory when the .git thing in the working tree is a gitfile pointing elsewhere did not work. * nd/export-worktree: setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR 19 August 2015, 21:41:30 UTC
f9610bc Merge branch 'mh/fast-import-optimize-current-from' into maint Often a fast-import stream builds a new commit on top of the previous commit it built, and it often unconditionally emits a "from" command to specify the first parent, which can be omitted in such a case. This caused fast-import to forget the tree of the previous commit and then re-read it from scratch, which was inefficient. Optimize for this common case. * mh/fast-import-optimize-current-from: fast-import: do less work when given "from" matches current branch head 19 August 2015, 21:41:29 UTC
d3ac359 Merge branch 'ib/scripted-parse-opt-better-hint-string' into maint The "rev-parse --parseopt" mode parsed the option specification and the argument hint in a strange way to allow '=' and other special characters in the option name while forbidding them from the argument hint. This made it impossible to define an option like "--pair <key>=<value>" with "pair=key=value" specification, which instead would have defined a "--pair=key <value>" option. * ib/scripted-parse-opt-better-hint-string: rev-parse --parseopt: allow [*=?!] in argument hints 19 August 2015, 21:41:29 UTC
204ea3c Merge branch 'se/doc-checkout-ours-theirs' into maint A "rebase" replays changes of the local branch on top of something else, as such they are placed in stage #3 and referred to as "theirs", while the changes in the new base, typically a foreign work, are placed in stage #2 and referred to as "ours". Clarify the "checkout --ours/--theirs". * se/doc-checkout-ours-theirs: checkout: document subtlety around --ours/--theirs 19 August 2015, 21:41:28 UTC
b083703 Merge branch 'cb/uname-in-untracked' into maint An experimental "untracked cache" feature used uname(2) in a slightly unportable way. * cb/uname-in-untracked: untracked: fix detection of uname(2) failure 19 August 2015, 21:41:28 UTC
4f66e44 Merge branch 'as/sparse-checkout-removal' into maint "sparse checkout" misbehaved for a path that is excluded from the checkout when switching between branches that differ at the path. * as/sparse-checkout-removal: unpack-trees: don't update files with CE_WT_REMOVE set 19 August 2015, 21:41:27 UTC
7e7ce32 Merge branch 'db/send-pack-user-signingkey' into maint The low-level "git send-pack" did not honor 'user.signingkey' configuration variable when sending a signed-push. * db/send-pack-user-signingkey: builtin/send-pack.c: respect user.signingkey 19 August 2015, 21:41:26 UTC
17850ef Merge branch 'jx/do-not-crash-receive-pack-wo-head' into maint An attempt to delete a ref by pushing into a repositorywhose HEAD symbolic reference points at an unborn branch that cannot be created due to ref D/F conflict (e.g. refs/heads/a/b exists, HEAD points at refs/heads/a) failed. * jx/do-not-crash-receive-pack-wo-head: receive-pack: crash when checking with non-exist HEAD 19 August 2015, 21:41:26 UTC
5a30374 Merge branch 'da/subtree-date-confusion' into maint "git subtree" (in contrib/) depended on "git log" output to be stable, which was a no-no. Apply a workaround to force a particular date format. * da/subtree-date-confusion: contrib/subtree: ignore log.date configuration 19 August 2015, 21:41:25 UTC
73f9145 untracked cache: fix entry invalidation First, the current code in untracked_cache_invalidate_path() is wrong because it can only handle paths "a" or "a/b", not "a/b/c" because lookup_untracked() only looks for entries directly under the given directory. In the last case, it will look for the entry "b/c" in directory "a" instead. This means if you delete or add an entry in a subdirectory, untracked cache may become out of date because it does not invalidate properly. This is noticed by David Turner. The second problem is about invalidation inside a fully untracked/excluded directory. In this case we may have to invalidate back to root. See the comment block for detail. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2015, 17:40:55 UTC
2e5910f untracked-cache: fix subdirectory handling Previously, some calls lookup_untracked would pass a full path. But lookup_untracked assumes that the portion of the path up to and including to the untracked_cache_dir has been removed. So lookup_untracked would be looking in the untracked_cache for 'foo' for 'foo/bar' (instead of just looking for 'bar'). This would cause untracked cache corruption. Instead, treat_directory learns to track the base length of the parent directory, so that only the last path component is passed to lookup_untracked. Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2015, 17:40:24 UTC
f178136 t7063: use --force-untracked-cache to speed up a bit When in the middle of t7063, we are sure untracked cache is supported, so we can use --force-untracked-cache to skip the support detection phase and save a few seconds. It's also good that --force-untracked-cache is exercised in the test suite. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2015, 17:37:13 UTC
a6926b8 po/README: Update directions for l10n contributors Some Linux distributions (such as Ubuntu) have their own l10n workflows, and their translations may be different. Add notes for this case for l10n translators. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2015, 19:12:26 UTC
54d160e config: close config file handle in case of error When updating an existing configuration file, we did not always close the filehandle that is reading from the current configuration file when we encountered an error (e.g. when unsetting a variable that does not exist). Signed-off-by: Sven Strickroth <email@cs-ware.de> Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 August 2015, 20:49:41 UTC
dff6f28 git_open_noatime: return with errno=0 on success In read_sha1_file_extended we die if read_object fails with a fatal error. We detect a fatal error if errno is non-zero and is not ENOENT. If the object could not be read because it does not exist, this is not considered a fatal error and we want to return NULL. Somewhere down the line, read_object calls git_open_noatime to open a pack index file, for example. We first try open with O_NOATIME. If O_NOATIME fails with EPERM, we retry without O_NOATIME. When the second open succeeds, errno is however still set to EPERM from the first attempt. When we finally determine that the object does not exist, read_object returns NULL and read_sha1_file_extended dies with a fatal error: fatal: failed to read object <sha1>: Operation not permitted Fix this by resetting errno to zero before we call open again. Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Clemens Buchacher <clemens.buchacher@intel.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2015, 20:56:19 UTC
b3325df t2019: skip test requiring '*' in a file name non Windows A test case introduced by ae454f61 (Add tests for wildcard "path vs ref" disambiguation) allocates a file named '*.c'. This does not work on Windows, because the OS forbids file names containing wildcard characters. The test case fails where the shell attempts to allocate the file. Skip the test on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 August 2015, 22:17:30 UTC
f4c3edc vreportf: avoid intermediate buffer When we call "die(fmt, args...)", we end up in vreportf with two pieces of information: 1. The prefix "fatal: " 2. The original fmt and va_list of args. We format item (2) into a temporary buffer, and then fprintf the prefix and the temporary buffer, along with a newline. This has the unfortunate side effect of truncating any error messages that are longer than 4096 bytes. Instead, let's use separate calls for the prefix and newline, letting us hand the item (2) directly to vfprintf. This is essentially undoing d048a96 (print warning/error/fatal messages in one shot, 2007-11-09), which tried to have the whole output end up in a single `write` call. But we can address this instead by explicitly requesting line-buffering for the output handle, and by making sure that the buffer is empty before we start (so that outputting the prefix does not cause a flush due to hitting the buffer limit). We may still break the output into two writes if the content is larger than our buffer, but there's not much we can do there; depending on the stdio implementation, that might have happened even with a single fprintf call. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 August 2015, 21:29:36 UTC
3b331e9 vreportf: report to arbitrary filehandles The vreportf function always goes to stderr, but run-command wants child errors to go to the parent's original stderr. To solve this, commit a5487dd duplicates the stderr fd and installs die and error handlers to direct the output appropriately (which later turned into the vwritef function). This has two downsides, though: - we make multiple calls to write(), which contradicts the "write at once" logic from d048a96 (print warning/error/fatal messages in one shot, 2007-11-09). - the custom handlers basically duplicate the normal handlers. They're only a few lines of code, but we should not have to repeat the magic "exit(128)", for example. We can solve the first by using fdopen() on the duplicated descriptor. We can't pass this to vreportf, but we could introduce a new vreportf_to to handle it. However, to fix the second problem, we instead introduce a new "set_error_handle" function, which lets the normal vreportf calls output to a handle besides stderr. Thus we can get rid of our custom handlers entirely, and just ask the regular handlers to output to our new descriptor. And as vwritef has no more callers, it can just go away. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 August 2015, 21:24:50 UTC
3ebbd00 strbuf_read(): skip unnecessary strbuf_grow() at eof The loop in strbuf_read() uses xread() repeatedly while extending the strbuf until the call returns zero. If the buffer is sufficiently large to begin with, this results in xread() returning the remainder of the file to the end (returning non-zero), the loop extending the strbuf, and then making another call to xread() to have it return zero. By using read_in_full(), we can tell when the read reached the end of file: when it returns less than was requested, it's eof. This way we can avoid an extra iteration that allocates an extra 8kB that is never used. Signed-off-by: Jim Hill <gjthill@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 August 2015, 19:51:13 UTC
db2e220 clone: use computed length in guess_dir_name Commit 7e837c6 (clone: simplify string handling in guess_dir_name(), 2015-07-09) changed clone to use strip_suffix instead of hand-rolled pointer manipulation. However, strip_suffix will strip from the end of a NUL-terminated string, and we may have already stripped some characters (like directory separators, or "/.git"). This leads to commands like: git clone host:foo.git/ failing to strip the ".git". We must instead convert our pointer arithmetic into a computed length and feed that to strip_suffix_mem, which will then reduce the length further for us. It would be nicer if we could drop the pointer manipulation entirely, and just continually strip using strip_suffix. But that doesn't quite work for two reasons: 1. The early suffixes we're stripping are not constant; we need to look for is_dir_sep, which could be one of several characters. 2. Mid-way through the stripping we compute the pointer "start", which shows us the beginning of the pathname. Which really give us two lengths to work with: the offset from the start of the string, and from the start of the path. By using pointers for the early part, we can just compute the length from "start" when we need it. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 August 2015, 18:01:05 UTC
d6a31e0 clone: add tests for output directory When we run "git clone $url", clone guesses from the $url what to name the local output directory. We don't have any test coverage of this, so let's add some basic tests. This reveals a few problems: - cloning "foo.git/" does not properly remove the ".git"; this is a recent regression from 7e837c6 (clone: simplify string handling in guess_dir_name(), 2015-07-09) - likewise, cloning foo/.git does not seem to handle the bare case (we should end up in foo.git, but we try to use foo/.git on the local end), which also comes from 7e837c6. - cloning the root is not very smart about URL parsing, and usernames and port numbers may end up in the directory name All of these tests are marked as failures. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 August 2015, 17:59:30 UTC
9b5fe78 test-lib: disable trace when test is not verbose The "-x" test-script option turns on the shell's "-x" tracing, which can help show why a particular test is failing. Unfortunately, this can create false negatives in some tests if they invoke a shell function with its stderr redirected. t5512.10 is such a test, as it does: test_must_fail git ls-remote refs*master >actual 2>&1 && test_cmp exp actual The "actual" file gets the "-x" trace for the test_must_fail function, which prevents it from matching the expected output. There's no way to avoid this without managing the trace flag inside each sub-function, which isn't really a workable solution. But unless you specifically care about t5512.10, we can work around it by enabling tracing only for the specific tests we want. You can already do: ./t5512-ls-remote.sh -x --verbose-only=16 to see the trace only for a specific test. But that doesn't _disable_ the tracing in the other tests; it just sends it to /dev/null. However, there's no point in generating a trace that the user won't see, so we can simply disable tracing whenever it doesn't have a matching verbose flag. The normal case of just "./t5512-ls-remote.sh -x" stays the same, as "-x" already implies "--verbose" (and "--verbose-only" overrides "--verbose", which is why this works at all). And for our test, we need only check $verbose, as maybe_setup_verbose will have already set that flag based on the $verbose_only list). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 August 2015, 18:52:46 UTC
2a01ef8 test-lib: turn off "-x" tracing during chain-lint check Now that GIT_TEST_CHAIN_LINT is on by default, running: ./t0000-basic.sh -x --verbose-only=1 starts with: expecting success: find .git/objects -type f -print >should-be-empty && test_line_count = 0 should-be-empty + exit 117 error: last command exited with $?=117 + find .git/objects -type f -print + test_line_count = 0 should-be-empty + test 3 != 3 + wc -l + test 0 = 0 ok 1 - .git/objects should be empty after git init in an empty repo This is confusing, as the "exit 117" line and the error line (which is printed in red, no less!) are not part of the test at all, but are rather in the separate chain-lint test_eval. Let's unset the "trace" variable when eval-ing the chain lint check, which avoids this. Note that we cannot just do a one-shot variable like: trace= test_eval ... as the behavior of one-shot variables for function calls is not portable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 August 2015, 18:50:28 UTC
faacc5a tests: fix cleanup after tests in t1509-root-worktree During cleanup we do a simple 'rm /*' to remove leftover files from previous tests. As 'rm' errors out when there is anything it cannot delete and there are directories present at '/' it will throw an error, causing the '&&' chain to fail. Fix this by explicitly removing the files. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 August 2015, 20:00:04 UTC
24ca45f tests: fix broken && chains in t1509-root-worktree Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 August 2015, 19:59:56 UTC
ae25fd3 transport-helper: die on errors reading refs. We check the return value of read_ref in 19 out of 21 cases. This adds checks to the missing cases. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 August 2015, 20:03:58 UTC
e88b858 Sync with 2.4.8 Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 August 2015, 17:45:34 UTC
8545932 Git 2.4.8 Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 August 2015, 17:43:01 UTC
29dce32 Merge branch 'js/rebase-i-clean-up-upon-continue-to-skip' into maint Abandoning an already applied change in "git rebase -i" with "--continue" left CHERRY_PICK_HEAD and confused later steps. * js/rebase-i-clean-up-upon-continue-to-skip: rebase -i: do not leave a CHERRY_PICK_HEAD file behind t3404: demonstrate CHERRY_PICK_HEAD bug 03 August 2015, 17:41:34 UTC
back to top