swh:1:snp:87728f882295b5ba27035837248a04c5be121c53

sort by:
Revision Author Date Message Commit Date
7234152 Git 2.13.5 Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 August 2017, 19:30:00 UTC
e312af1 Merge tag 'v2.12.4' into maint 01 August 2017, 19:27:31 UTC
cf8899d Git 2.13.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 August 2017, 18:45:17 UTC
c94ef19 Preparation for 2.13.4 continues Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 July 2017, 20:52:40 UTC
0baf0b8 Merge branch 'ks/doc-fixes' into maint Doc clean-up. * ks/doc-fixes: doc: reformat the paragraph containing the 'cut-line' doc: camelCase the i18n config variables to improve readability 31 July 2017, 20:51:06 UTC
42dbdef Merge branch 'jk/test-copy-bytes-fix' into maint A test fix. * jk/test-copy-bytes-fix: t: handle EOF in test_copy_bytes() 31 July 2017, 20:51:06 UTC
c6767f4 Merge branch 'pw/unquote-path-in-git-pm' into maint Code refactoring. * pw/unquote-path-in-git-pm: t9700: add tests for Git::unquote_path() Git::unquote_path(): throw an exception on bad path Git::unquote_path(): handle '\a' add -i: move unquote_path() to Git.pm 31 July 2017, 20:51:05 UTC
133578a Merge branch 'jk/gc-pre-detach-under-hook' into maint We run an early part of "git gc" that deals with refs before daemonising (and not under lock) even when running a background auto-gc, which caused multiple gc processes attempting to run the early part at the same time. This is now prevented by running the early part also under the GC lock. * jk/gc-pre-detach-under-hook: gc: run pre-detach operations under lock 31 July 2017, 20:51:05 UTC
309ff91 Merge branch 'jn/hooks-pre-rebase-sample-fix' into maint Code clean-up, that makes us in sync with Debian by one patch. * jn/hooks-pre-rebase-sample-fix: pre-rebase hook: capture documentation in a <<here document 31 July 2017, 20:51:05 UTC
4f77f61 Merge branch 'rs/progress-overall-throughput-at-the-end' into maint The progress meter did not give a useful output when we haven't had 0.5 seconds to measure the throughput during the interval. Instead show the overall throughput rate at the end, which is a much more useful number. * rs/progress-overall-throughput-at-the-end: progress: show overall rate in last update 31 July 2017, 20:51:04 UTC
49f1e2e Merge branch 'tb/push-to-cygwin-unc-path' into maint On Cygwin, similar to Windows, "git push //server/share/repository" ought to mean a repository on a network share that can be accessed locally, but this did not work correctly due to stripping the double slashes at the beginning. This may need to be heavily tested before it gets unleashed to the wild, as the change is at a fairly low-level code and would affect not just the code to decide if the push destination is local. There may be unexpected fallouts in the path normalization. * tb/push-to-cygwin-unc-path: cygwin: allow pushing to UNC paths 31 July 2017, 20:51:04 UTC
bc2c50f Merge branch 'rs/apply-avoid-over-reading' into maint Code cleanup. * rs/apply-avoid-over-reading: apply: use strcmp(3) for comparing strings in gitdiff_verify_name() apply: use starts_with() in gitdiff_verify_name() 31 July 2017, 20:51:04 UTC
3d9c5b5 Git 2.12.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 22:06:06 UTC
3def5e9 Merge tag 'v2.11.3' into maint-2.12 Git 2.11.3 30 July 2017, 22:04:22 UTC
9315f27 Merge branch 'jk/lib-proto-disable-cleanup' into maint-2.12 30 July 2017, 22:03:21 UTC
3b82744 Git 2.11.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 22:02:37 UTC
05bb78a Merge tag 'v2.10.4' into maint-2.11 Git 2.10.4 30 July 2017, 22:01:31 UTC
0bfff81 Git 2.10.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 22:00:04 UTC
d78f06a Merge tag 'v2.9.5' into maint-2.10 Git 2.9.5 30 July 2017, 21:57:33 UTC
4d4165b Git 2.9.5 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 21:53:25 UTC
af0178a Merge tag 'v2.8.6' into maint-2.9 Git 2.8.6 30 July 2017, 21:52:14 UTC
8d7f72f Git 2.8.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 21:49:08 UTC
7720c33 Merge tag 'v2.7.6' into maint-2.8 Git 2.7.6 30 July 2017, 21:46:43 UTC
5e0649d Git 2.7.6 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 July 2017, 21:45:13 UTC
a4f234b Merge branch 'jk/ssh-funny-url' into maint-2.7 28 July 2017, 23:11:54 UTC
aeeb2d4 connect: reject paths that look like command line options If we get a repo path like "-repo.git", we may try to invoke "git-upload-pack -repo.git". This is going to fail, since upload-pack will interpret it as a set of bogus options. But let's reject this before we even run the sub-program, since we would not want to allow any mischief with repo names that actually are real command-line options. You can still ask for such a path via git-daemon, but there's no security problem there, because git-daemon enters the repo itself and then passes "." on the command line. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:54:55 UTC
3be4cf0 connect: reject dashed arguments for proxy commands If you have a GIT_PROXY_COMMAND configured, we will run it with the host/port on the command-line. If a URL contains a mischievous host like "--foo", we don't know how the proxy command may handle it. It's likely to break, but it may also do something dangerous and unwanted (technically it could even do something useful, but that seems unlikely). We should err on the side of caution and reject this before we even run the command. The hostname check matches the one we do in a similar circumstance for ssh. The port check is not present for ssh, but there it's not necessary because the syntax is "-p <port>", and there's no ambiguity on the parsing side. It's not clear whether you can actually get a negative port to the proxy here or not. Doing: git fetch git://remote:-1234/repo.git keeps the "-1234" as part of the hostname, with the default port of 9418. But it's a good idea to keep this check close to the point of running the command to make it clear that there's no way to circumvent it (and at worst it serves as a belt-and-suspenders check). Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:52:18 UTC
2491f77 connect: factor out "looks like command line option" check We reject hostnames that start with a dash because they may be confused for command-line options. Let's factor out that notion into a helper function, as we'll use it in more places. And while it's simple now, it's not clear if some systems might need more complex logic to handle all cases. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:51:56 UTC
2d90add t5813: add test for hostname starting with dash Per the explanation in the previous patch, this should be (and is) rejected. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:51:29 UTC
820d765 connect: reject ssh hostname that begins with a dash When commands like "git fetch" talk with ssh://$rest_of_URL/, the code splits $rest_of_URL into components like host, port, etc., and then spawns the underlying "ssh" program by formulating argv[] array that has: - the path to ssh command taken from GIT_SSH_COMMAND, etc. - dashed options like '-batch' (for Tortoise), '-p <port>' as needed. - ssh_host, which is supposed to be the hostname parsed out of $rest_of_URL. - then the command to be run on the other side, e.g. git upload-pack. If the ssh_host ends up getting '-<anything>', the argv[] that is used to spawn the command becomes something like: { "ssh", "-p", "22", "-<anything>", "command", "to", "run", NULL } which obviously is bogus, but depending on the actual value of "<anything>", will make "ssh" parse and use it as an option. Prevent this by forbidding ssh_host that begins with a "-". Noticed-by: Joern Schneeweisz of Recurity Labs Reported-by: Brian at GitLab Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:51:14 UTC
30c586f t/lib-proto-disable: restore protocol.allow after config tests The tests for protocol.allow actually set that variable in the on-disk config, run a series of tests, and then never clean up after themselves. This means that whatever tests we run after have protocol.allow=never, which may influence their results. In most cases we either exit after running these tests, or do another round of test_proto(). In the latter case, this happens to work because: 1. Tests of the GIT_ALLOW_PROTOCOL environment variable override the config. 2. Tests of the specific config "protocol.foo.allow" override the protocol.allow config. 3. The next round of protocol.allow tests start off by setting the config to a known value. However, it's a land-mine waiting to trap somebody adding new tests to one of the t581x test scripts. Let's make sure we clean up after ourselves. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 July 2017, 22:48:39 UTC
2187e11 fixes from 'master' for 2.13.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 July 2017, 22:06:09 UTC
3835124 Merge branch 'ew/fd-cloexec-fix' into maint Portability/fallback fix. * ew/fd-cloexec-fix: set FD_CLOEXEC properly when O_CLOEXEC is not supported 21 July 2017, 22:03:40 UTC
bae7e3f Merge branch 'ks/fix-rebase-doc-picture' into maint Doc update. * ks/fix-rebase-doc-picture: doc: correct a mistake in an illustration 21 July 2017, 22:03:39 UTC
bdea5ba Merge branch 'js/alias-case-sensitivity' into maint A recent update broke an alias that contained an uppercase letter. * js/alias-case-sensitivity: alias: compare alias name *case-insensitively* t1300: demonstrate that CamelCased aliases regressed 21 July 2017, 22:03:38 UTC
ba1c089 Merge branch 'bb/unicode-10.0' into maint Update the character width tables. * bb/unicode-10.0: unicode: update the width tables to Unicode 10 21 July 2017, 22:03:38 UTC
3a33fe5 doc: reformat the paragraph containing the 'cut-line' The paragraph that describes the 'scissors' cleanup mode of 'commit' had the 'cut-line' in the middle of a sentence. This made it possible for the line to get wrapped on smaler windows. This shouldn't be the case as it makes it hard for the user to understand the structure of the cut-line. Reformat the pragraph to make the 'cut-line' stand on a line of it's own thus distinguishing it from the rest of the paragraph. This further prevents it from getting wrapped to some extent. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 July 2017, 22:04:49 UTC
95791be doc: camelCase the i18n config variables to improve readability The i18n config variable used weren't readable as they were in the crude form of how git stores/uses it's config variables. Improve it's readability by replacing them with camelCased versions of config variables as it doesn't have any impact on it's usage. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 July 2017, 22:11:26 UTC
f7f6dc3 t: handle EOF in test_copy_bytes() The test_copy_bytes() function claims to read up to N bytes, or until it gets EOF. But we never handle EOF in our loop, and a short input will cause perl to go into an infinite loop of read() getting zero bytes. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 July 2017, 21:55:43 UTC
9fb9495 set FD_CLOEXEC properly when O_CLOEXEC is not supported FD_CLOEXEC only applies to the file descriptor, so it needs to be manipuluated via F_GETFD/F_SETFD. F_GETFL/F_SETFL are for file description flags. Verified via strace with o_cloexec set to zero. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 July 2017, 21:52:16 UTC
643df7e alias: compare alias name *case-insensitively* It is totally legitimate to add CamelCased aliases, but due to the way config keys are compared, the case does not matter. Therefore, we must compare the alias name insensitively to the config keys. This fixes a regression introduced by a9bcf6586d1 (alias: use the early config machinery to expand aliases, 2017-06-14). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 July 2017, 21:00:12 UTC
084b044 t1300: demonstrate that CamelCased aliases regressed It is totally legitimate to add CamelCased aliases, but due to the way config keys are compared, the case does not matter. Except that now it does: the alias name is expected to be all lower-case. This is a regression introduced by a9bcf6586d1 (alias: use the early config machinery to expand aliases, 2017-06-14). Noticed by Alejandro Pauly, diagnosed by Kevin Willford. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 July 2017, 21:00:04 UTC
08f9c32 Git 2.13.3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 July 2017, 22:24:15 UTC
55bdfa0 Merge branch 'kn/ref-filter-branch-list' into maint The rewrite of "git branch --list" using for-each-ref's internals that happened in v2.13 regressed its handling of color.branch.local; this has been fixed. * kn/ref-filter-branch-list: ref-filter.c: drop return from void function branch: set remote color in ref-filter branch immediately branch: use BRANCH_COLOR_LOCAL in ref-filter format branch: only perform HEAD check for local branches 12 July 2017, 22:23:09 UTC
ecab58c Merge branch 'ks/typofix-commit-c-comment' into maint Typofix. * ks/typofix-commit-c-comment: builtin/commit.c: fix a typo in the comment 12 July 2017, 22:20:49 UTC
9d21a96 Merge branch 'jk/reflog-walk-maint' into maint After "git branch --move" of the currently checked out branch, the code to walk the reflog of HEAD via "log -g" and friends incorrectly stopped at the reflog entry that records the renaming of the branch. * jk/reflog-walk-maint: reflog-walk: include all fields when freeing complete_reflogs reflog-walk: don't free reflogs added to cache reflog-walk: duplicate strings in complete_reflogs list reflog-walk: skip over double-null oid due to HEAD rename 12 July 2017, 22:20:36 UTC
c45af94 gc: run pre-detach operations under lock We normally try to avoid having two auto-gc operations run at the same time, because it wastes resources. This was done long ago in 64a99eb47 (gc: reject if another gc is running, unless --force is given, 2013-08-08). When we do a detached auto-gc, we run the ref-related commands _before_ detaching, to avoid confusing lock contention. This was done by 62aad1849 (gc --auto: do not lock refs in the background, 2014-05-25). These two features do not interact well. The pre-detach operations are run before we check the gc.pid lock, meaning that on a busy repository we may run many of them concurrently. Ideally we'd take the lock before spawning any operations, and hold it for the duration of the program. This is tricky, though, with the way the pid-file interacts with the daemonize() process. Other processes will check that the pid recorded in the pid-file still exists. But detaching causes us to fork and continue running under a new pid. So if we take the lock before detaching, the pid-file will have a bogus pid in it. We'd have to go back and update it with the new pid after detaching. We'd also have to play some tricks with the tempfile subsystem to tweak the "owner" field, so that the parent process does not clean it up on exit, but the child process does. Instead, we can do something a bit simpler: take the lock only for the duration of the pre-detach work, then detach, then take it again for the post-detach work. Technically, this means that the post-detach lock could lose to another process doing pre-detach work. But in the long run this works out. That second process would then follow-up by doing post-detach work. Unless it was in turn blocked by a third process doing pre-detach work, and so on. This could in theory go on indefinitely, as the pre-detach work does not repack, and so need_to_gc() will continue to trigger. But in each round we are racing between the pre- and post-detach locks. Eventually, one of the post-detach locks will win the race and complete the full gc. So in the worst case, we may racily repeat the pre-detach work, but we would never do so simultaneously (it would happen via a sequence of serialized race-wins). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 July 2017, 16:41:04 UTC
8db1ae5 pre-rebase hook: capture documentation in a <<here document Without this change, the sample hook does not pass a syntax check (sh -n): $ sh -n hooks--pre-rebase.sample hooks--pre-rebase.sample: line 101: syntax error near unexpected token `(' hooks--pre-rebase.sample: line 101: ` merged into it again (either directly or indirectly).' Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2017, 15:56:33 UTC
699d47e Prepare for 2.13.3 10 July 2017, 21:02:07 UTC
4aaf5b0 Merge branch 'sb/merge-recursive-code-cleanup' into maint Code clean-up. * sb/merge-recursive-code-cleanup: merge-recursive: use DIFF_XDL_SET macro 10 July 2017, 20:59:09 UTC
127c13a Merge branch 'jc/utf8-fprintf' into maint Code cleanup. * jc/utf8-fprintf: submodule--helper: do not call utf8_fprintf() unnecessarily 10 July 2017, 20:59:09 UTC
8e7b78a Merge branch 'js/fsck-name-object' into maint Test fix. * js/fsck-name-object: t1450: use egrep for regexp "alternation" 10 July 2017, 20:59:08 UTC
5a24b4e Merge branch 'js/t5534-rev-parse-gives-multi-line-output-fix' into maint A few tests that tried to verify the contents of push certificates did not use 'git rev-parse' to formulate the line to look for in the certificate correctly. * js/t5534-rev-parse-gives-multi-line-output-fix: t5534: fix misleading grep invocation 10 July 2017, 20:59:07 UTC
362009f Merge branch 'ab/sha1dc-maint' into maint Update the sha1dc again to fix portability glitches. * ab/sha1dc-maint: sha1dc: update from upstream 10 July 2017, 20:59:06 UTC
35049a2 Merge branch 'aw/contrib-subtree-doc-asciidoctor' into maint The Makefile rule in contrib/subtree for building documentation learned to honour USE_ASCIIDOCTOR just like the main documentation set does. * aw/contrib-subtree-doc-asciidoctor: subtree: honour USE_ASCIIDOCTOR when set 10 July 2017, 20:59:06 UTC
a9e87e3 Merge branch 'cc/shared-index-permfix' into maint The split index code did not honor core.sharedrepository setting correctly. * cc/shared-index-permfix: t1700: make sure split-index respects core.sharedrepository t1301: move modebits() to test-lib-functions.sh read-cache: use shared perms when writing shared index 10 July 2017, 20:59:05 UTC
76de71b Merge branch 'ah/doc-pretty-color-auto-prefix' into maint Doc update. * ah/doc-pretty-color-auto-prefix: doc: clarify syntax for %C(auto,...) in pretty formats 10 July 2017, 20:59:05 UTC
cf77911 Merge branch 'mb/reword-autocomplete-message' into maint Message update. * mb/reword-autocomplete-message: auto-correct: tweak phrasing 10 July 2017, 20:59:04 UTC
8f3a16c Merge branch 'ks/t7508-indent-fix' into maint Cosmetic update to a test. * ks/t7508-indent-fix: t7508: fix a broken indentation 10 July 2017, 20:59:03 UTC
dbcf775 Merge branch 'sb/t4005-modernize' into maint Test clean-up. * sb/t4005-modernize: t4005: modernize style and drop hard coded sha1 10 July 2017, 20:59:02 UTC
33c3c2d Merge branch 'rs/apply-validate-input' into maint Tighten error checks for invalid "git apply" input. * rs/apply-validate-input: apply: check git diffs for mutually exclusive header lines apply: check git diffs for invalid file modes apply: check git diffs for missing old filenames 10 July 2017, 20:59:01 UTC
b944d7c Merge branch 'jc/pack-bitmap-unaligned' into maint An unaligned 32-bit access in pack-bitmap code ahs been corrected. * jc/pack-bitmap-unaligned: pack-bitmap: don't perform unaligned memory access 10 July 2017, 20:59:00 UTC
9f6728d Merge branch 'pw/rebase-i-regression-fix-tests' into maint Fix a recent regression to "git rebase -i" and add tests that would have caught it and others. * pw/rebase-i-regression-fix-tests: t3420: fix under GETTEXT_POISON build rebase: add more regression tests for console output rebase: add regression tests for console output rebase -i: add test for reflog message sequencer: print autostash messages to stderr 10 July 2017, 20:59:00 UTC
f904494 Merge branch 'jk/add-p-commentchar-fix' into maint "git add -p" were updated in 2.12 timeframe to cope with custom core.commentchar but the implementation was buggy and a metacharacter like $ and * did not work. * jk/add-p-commentchar-fix: add--interactive: quote commentChar regex add--interactive: handle EOF in prompt_yesno 10 July 2017, 20:58:59 UTC
040746c Merge branch 'js/alias-early-config' into maint The code to pick up and execute command alias definition from the configuration used to switch to the top of the working tree and then come back when the expanded alias was executed, which was unnecessarilyl complex. Attempt to simplify the logic by using the early-config mechanism that does not chdir around. * js/alias-early-config: alias: use the early config machinery to expand aliases t7006: demonstrate a problem with aliases in subdirectories t1308: relax the test verifying that empty alias values are disallowed help: use early config when autocorrecting aliases config: report correct line number upon error discover_git_directory(): avoid setting invalid git_dir 10 July 2017, 20:58:58 UTC
4977117 Merge branch 'rs/pretty-add-again' into maint The pretty-format specifiers like '%h', '%t', etc. had an optimization that no longer works correctly. In preparation/hope of getting it correctly implemented, first discard the optimization that is broken. * rs/pretty-add-again: pretty: recalculate duplicate short hashes 10 July 2017, 20:58:57 UTC
86d51bb Merge branch 'ah/doc-gitattributes-empty-index' into maint An example in documentation that does not work in multi worktree configuration has been corrected. * ah/doc-gitattributes-empty-index: doc: do not use `rm .git/index` when normalizing line endings 10 July 2017, 20:58:56 UTC
311b760 Merge branch 'da/mergetools-meld-output-opt-on-macos' into maint "git mergetool" learned to work around a wrapper MacOS X adds around underlying meld. * da/mergetools-meld-output-opt-on-macos: mergetools/meld: improve compatibiilty with Meld on macOS X 10 July 2017, 20:58:56 UTC
c4ffd78 Merge branch 'jk/diff-highlight-module' into maint The 'diff-highlight' program (in contrib/) has been restructured for easier reuse by an external project 'diff-so-fancy'. * jk/diff-highlight-module: diff-highlight: split code into module 10 July 2017, 20:58:56 UTC
5b5c9c3 ref-filter.c: drop return from void function Sun's C compiler errors out on this pattern: void foo() { ... } void bar() { return foo(); } Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2017, 19:34:51 UTC
f271c95 l10n: de.po: fix typo Reported-by: Andre Hinrichs <andre.hinrichs@gmx.de> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2017, 18:44:18 UTC
0182606 doc: correct a mistake in an illustration The first illustration of the "RECOVERING FROM UPSTREAM REBASE" section in the 'git-rebase' documentation meant to depict that there are number of commits on the 'master' branch, but it is longer than the 'master' branch in the following illustrations by one commit, even though there is no resetting of 'master' to lose that commit. Correct it. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2017, 16:50:36 UTC
0fae1e0 progress: show overall rate in last update The values in struct throughput are only updated every 0.5 seconds. If we're all done before that time span then the final update will show a rate of 0 bytes/s, which is misleading if some bytes had been handled. Remember the start time and show the total throughput instead. And avoid division by zero by enforcing a minimum time span value of 1 (unit: 1/1024th of a second). That makes the resulting rate an underestimation, but it's closer to the actual value than the currently shown 0 bytes/s. Reported-by: 積丹尼 Dan Jacobson <jidanni@jidanni.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2017, 16:54:20 UTC
2d10545 apply: use strcmp(3) for comparing strings in gitdiff_verify_name() We don't know the length of the C string "another". It could be shorter than "name", which we compare it to using memchr(3). Call strcmp(3) instead to avoid running over the end of the former, and get rid of a strlen(3) call as a bonus. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2017, 16:30:42 UTC
7ca260a branch: set remote color in ref-filter branch immediately We set the current and local branch colors at the top of the build_format() function. Let's do the same for the remote color. This saves a little bit of repetition, but more importantly it puts all of the color-setting in the same place. That makes it easier to see that we are coloring all possibilities. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2017, 16:24:43 UTC
34d820e branch: use BRANCH_COLOR_LOCAL in ref-filter format Since 949af0684 (branch: use ref-filter printing APIs, 2017-01-10), git-branch's output is generated by passing a custom format to the ref-filter code. This format forgot to pass BRANCH_COLOR_LOCAL, meaning that local branches (besides the current one) were never colored at all. We can add it in the %(if) block where we decide whether the branch is "current" or merely "local". Note that this means the current/local coloring is either/or. You can't set: [color "branch"] local = blue current = bold and expect the current branch to be "bold blue". This matches the pre-949af0684 behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2017, 16:24:42 UTC
a5b3663 branch: only perform HEAD check for local branches When assembling the ref-filter format to show "git branch" output, we put the "%(if)%(HEAD)" conditional at the start of the overall format. But there's no point in checking whether a remote branch matches HEAD, as it never will. The check should go inside the local conditional; we assemble that format inside the "local" strbuf. By itself, this is just a minor optimization. But in a future patch, we'll need this refactoring to fix local-branch coloring. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2017, 16:24:42 UTC
7560aac unicode: update the width tables to Unicode 10 Now that Unicode 10 has been announced[0], update the character width tables to the new version. [0] http://blog.unicode.org/2017/06/announcing-unicode-standard-version-100.html Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 July 2017, 17:33:30 UTC
e30d463 reflog-walk: include all fields when freeing complete_reflogs When we encounter an error adding reflogs for a walk, we try to free any logs we have read. But we didn't free all fields, meaning that we could in theory leak all of the "items" array (which would consitute the bulk of the allocated memory). This patch adds a helper which frees all of the entries and uses it as appropriate. As it turns out, the leak seems impossible to trigger with the current code. Of the three error paths that free the complete_reflogs struct, two only kick in when the items array is empty, and the third was removed entirely in the previous commit. So this patch should be a noop in terms of behavior, but it fixes a potential maintenance headache should anybody add a new error path and copy the partial-free code. Which is what happened in 5026b47175 (add_reflog_for_walk: avoid memory leak, 2017-05-04), though its leaky call was the third one that was recently removed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 July 2017, 16:04:34 UTC
8aae3cf reflog-walk: don't free reflogs added to cache The add_reflog_for_walk() function keeps a cache mapping refnames to their reflog contents. We use a cached reflog entry if available, and otherwise allocate and store a new one. Since 5026b47175 (add_reflog_for_walk: avoid memory leak, 2017-05-04), when we hit an error parsing a date-based reflog spec, we free the reflog memory but leave the cache entry pointing to the now-freed memory. We can fix this by just leaving the memory intact once it has made it into the cache. This may leave an unused entry in the cache, but that's OK. And it means we also catch a similar situation: we may not have allocated at all in this invocation, but simply be pointing to a cached entry from a previous invocation (which is relying on that entry being present). The new test in t1411 exercises this case and fails when run with --valgrind or ASan. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 July 2017, 16:00:31 UTC
75afe7a reflog-walk: duplicate strings in complete_reflogs list As part of the add_reflog_to_walk() function, we keep a string_list mapping refnames to their reflog contents. This serves as a cache so that accessing the same reflog twice requires only a single copy of the log in memory. The string_list is initialized via xcalloc, meaning its strdup_strings field is set to 0. But after inserting a string into the list, we unconditionally call free() on the string, leaving the list pointing to freed memory. If another reflog is added (e.g., "git log -g HEAD HEAD"), then the second one may have unpredictable results. The extra free was added by 5026b47175 (add_reflog_for_walk: avoid memory leak, 2017-05-04). Though if you look carefully, you can see that the code was buggy even before then. If we tried to read the reflogs by time but came up with no entries, we exited with an error, freeing the string in that code path. So the bug was harder to trigger, but still there. We can fix it by just asking the string list to make a copy of the string. Technically we could fix the problem by not calling free() on our string (and just handing over ownership to the string list), but there are enough conditionals that it's quite hard to figure out which code paths need the free and which do not. Simpler is better here. The new test reliably shows the problem when run with --valgrind or ASAN. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 July 2017, 15:58:17 UTC
669638f builtin/commit.c: fix a typo in the comment Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2017, 16:06:26 UTC
496f256 cygwin: allow pushing to UNC paths cygwin can use an UNC path like //server/share/repo $ cd //server/share/dir $ mkdir test $ cd test $ git init --bare However, when we try to push from a local Git repository to this repo, there is a problem: Git converts the leading "//" into a single "/". As cygwin handles an UNC path so well, Git can support them better: - Introduce cygwin_offset_1st_component() which keeps the leading "//", similar to what Git for Windows does. - Move CYGWIN out of the POSIX in the tests for path normalization in t0060 Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 July 2017, 21:01:03 UTC
2272d3e reflog-walk: skip over double-null oid due to HEAD rename Since 39ee4c6c2f (branch: record creation of renamed branch in HEAD's log, 2017-02-20), a rename on the currently checked out branch will create two entries in the HEAD reflog: one where the branch goes away (switching to the null oid), and one where it comes back (switching away from the null oid). This confuses the reflog-walk code. When walking backwards, it first sees the null oid in the "old" field of the second entry. Thanks to the "root commit" logic added by 71abeb753f (reflog: continue walking the reflog past root commits, 2016-06-03), we keep looking for the next entry by scanning the "new" field from the previous entry. But that field is also null! We need to go just a tiny bit further, and look at its "old" field. But with the current code, we decide the reflog has nothing else to show and just give up. To the user this looks like the reflog was truncated by the rename operation, when in fact those entries are still there. This patch does the absolute minimal fix, which is to look back that one extra level and keep traversing. The resulting behavior may not be the _best_ thing to do in the long run (for example, we show both reflog entries each with the same commit id), but it's a simple way to fix the problem without risking further regressions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 July 2017, 17:34:00 UTC
8722947 t5534: fix misleading grep invocation It seems to be a little-known feature of `grep` (and it certainly came as a surprise to this here developer who believed to know the Unix tools pretty well) that multiple patterns can be passed in the same command-line argument simply by separating them by newlines. Watch, and learn: $ printf '1\n2\n3\n' | grep "$(printf '1\n3\n')" 1 3 That behavior also extends to patterns passed via `-e`, and it is not modified by passing the option `-E` (but trying this with -P issues the error "grep: the -P option only supports a single pattern"). It seems that there are more old Unix hands who are surprised by this behavior, as grep invocations of the form grep "$(git rev-parse A B) C" file were introduced in a85b377d041 (push: the beginning of "git push --signed", 2014-09-12), and later faithfully copy-edited in b9459019bbb (push: heed user.signingkey for signed pushes, 2014-10-22). Please note that the output of `git rev-parse A B` separates the object IDs via *newlines*, not via spaces, and those newlines are preserved because the interpolation is enclosed in double quotes. As a consequence, these tests try to validate that the file contains either A's object ID, or B's object ID followed by C, or both. Clearly, however, what the test wanted to see is that there is a line that contains all of them. This is clearly unintended, and the grep invocations in question really match too many lines. Fix the test by avoiding the newlines in the patterns. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 July 2017, 16:26:52 UTC
9936c1b sha1dc: update from upstream Update sha1dc from the latest version by the upstream maintainer[1]. See commit 6b851e536b ("sha1dc: update from upstream", 2017-06-06) for the last update. This solves the Big Endian detection on Solaris reported against v2.13.2[2], hopefully without any regressions. A version of this has been tested on two Solaris SPARC installations, Cygwin (by jturney on cygwin@Freenode), and on numerous more boring systems (mainly linux/x86_64). See [3] for a discussion of the implementation and platform-specific issues. See commit a0103914c2 ("sha1dc: update from upstream", 2017-05-20) and 6b851e536b ("sha1dc: update from upstream", 2017-06-06) for previous attempts in the 2.13 series to address various compile-time feature detection in this library. 1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/19d97bf5af05312267c2e874ee6bcf584d9e9681 2. <CAKKM46tHq13XiW5C8sux3=PZ1VHSu_npG8ExfWwcPD7rkZkyRQ@mail.gmail.com> (https://public-inbox.org/git/CAKKM46tHq13XiW5C8sux3=PZ1VHSu_npG8ExfWwcPD7rkZkyRQ@mail.gmail.com/) 3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/34 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 July 2017, 17:09:22 UTC
8bc172e apply: use starts_with() in gitdiff_verify_name() Avoid running over the end of line -- a C string whose length is not known to this function -- by using starts_with() instead of memcmp(3) for checking if it starts with "/dev/null". Also simply include the newline in the string constant to compare against. Drop a comment that just states the obvious. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 July 2017, 17:39:51 UTC
c2d4b4c merge-recursive: use DIFF_XDL_SET macro Instead of implementing this on our own, just use a convenience macro. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2017, 17:56:37 UTC
3f9c637 t9700: add tests for Git::unquote_path() Check that unquote_path() handles spaces and escape sequences properly. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2017, 15:05:15 UTC
d5f28b7 Git::unquote_path(): throw an exception on bad path This is what the other routines in Git.pm do if there's an error. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2017, 15:04:59 UTC
4cebfac Git::unquote_path(): handle '\a' unquote_path() does not handle quoted paths containing '\a', even though quote.c::unquote_c_style() does, and quote.c:sq_lookup[] tells quote.c::sq_must_quote() that '\007' must be quoted as '\a'. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2017, 15:02:43 UTC
1d542a5 add -i: move unquote_path() to Git.pm Move unquote_path() from git-add--interactive to Git.pm so it can be used by other scripts. Note this is a straight copy, it does not handle '\a'. That will be fixed in the next commit. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2017, 15:02:20 UTC
dc4b4a6 submodule--helper: do not call utf8_fprintf() unnecessarily The helper function utf8_fprintf(fp, ...) has exactly the same effect to the output stream fp as fprintf(fp, ...) does, and the only difference is that its return value counts in display columns consumed (assuming that the payload is encoded in UTF-8), as opposed to number of bytes. There is no reason to call it unless the caller cares about its return value. Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 June 2017, 21:27:10 UTC
73fc2aa t1450: use egrep for regexp "alternation" GNU grep allows "\(A\|B\)" as alternation in BRE, but this is an extension not understood by some other implementations of grep (Michael Kebe reported an breakage on Solaris). Rewrite the offending test to ERE and use egrep instead. Noticed-by: Michael Kebe <michael.kebe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 June 2017, 17:17:50 UTC
fdc1ad9 subtree: honour USE_ASCIIDOCTOR when set Defining USE_ASCIIDOCTOR=1 when building Git uses asciidoctor over asciidoc when generating DocBook and man page documentation. However, the contrib/subtree module does not presently honour that flag. This causes a build failure when asciidoc is not present on the build system. Instead, adapt the main Documentation/Makefile logic to use asciidoctor when requested. Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 June 2017, 04:01:27 UTC
d70e9c5 apply: check git diffs for mutually exclusive header lines A file can either be added, removed, copied, or renamed, but no two of these actions can be done by the same patch. Some of these combinations provoke error messages due to missing file names, and some are only caught by an assertion. Check git patches already as they are parsed and report conflicting lines on sight. Found by Vegard Nossum using AFL. Reported-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 June 2017, 21:41:10 UTC
44e5471 apply: check git diffs for invalid file modes An empty string as mode specification is accepted silently by git apply, as Vegard Nossum found out using AFL. It's interpreted as zero. Reject such bogus file modes, and only accept ones consisting exclusively of octal digits. Reported-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 June 2017, 17:59:38 UTC
4269974 apply: check git diffs for missing old filenames 2c93286a (fix "git apply --index ..." not to deref NULL) added a check for git patches missing a +++ line, preventing a segfault. Check for missing --- lines as well, and add a test for each case. Found by Vegard Nossum using AFL. Original-patch-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 June 2017, 17:58:30 UTC
da41c94 pack-bitmap: don't perform unaligned memory access The preceding bitmap entries have a 1-byte XOR-offset and 1-byte flags, so their size is not a multiple of 4. Thus the name-hash cache is only guaranteed to be 2-byte aligned and so we must use get_be32 rather than indexing the array directly. Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 June 2017, 19:32:31 UTC
3ee83f4 t1700: make sure split-index respects core.sharedrepository Add a few tests to check that both the split-index file and the shared-index file are created using the right permissions when core.sharedrepository is set. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 June 2017, 17:42:52 UTC
back to top