swh:1:snp:87728f882295b5ba27035837248a04c5be121c53

sort by:
Revision Author Date Message Commit Date
9b185be Git 2.15.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 November 2017, 04:39:14 UTC
b201e96 Merge branch 'rs/config-write-section-fix' into maint There was a recent semantic mismerge in the codepath to write out a section of a configuration section, which has been corrected. * rs/config-write-section-fix: config: flip return value of write_section() 28 November 2017, 04:38:33 UTC
7bc7776 A bit more fixes for 2.15.1 We've been waiting long enough, a few more would not hurt ;-) Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 November 2017, 01:58:31 UTC
80a0e0f Merge branch 'ma/reduce-heads-leakfix' into maint Leak fixes. * ma/reduce-heads-leakfix: reduce_heads: fix memory leaks builtin/merge-base: free commit lists 27 November 2017, 01:57:02 UTC
03e8004 Merge branch 'ma/bisect-leakfix' into maint Leak fixes. * ma/bisect-leakfix: bisect: fix memory leak when returning best element bisect: fix off-by-one error in `best_bisection_sorted()` bisect: fix memory leak in `find_bisection()` bisect: change calling-convention of `find_bisection()` 27 November 2017, 01:57:02 UTC
df481b9 Merge branch 'rs/apply-fuzzy-match-fix' into maint A fix for an ancient bug in "git apply --ignore-space-change" codepath. * rs/apply-fuzzy-match-fix: apply: avoid out-of-bounds access in fuzzy_matchlines() 27 November 2017, 01:57:02 UTC
b51df7d Merge branch 'ad/submitting-patches-title-decoration' into maint Doc update around use of "format-patch --subject-prefix" etc. * ad/submitting-patches-title-decoration: doc/SubmittingPatches: correct subject guidance 27 November 2017, 01:57:01 UTC
95bf615 Merge branch 'rs/imap-send-next-arg-fix' into maint Error checking in "git imap-send" for empty response has been improved. * rs/imap-send-next-arg-fix: imap-send: handle missing response codes gracefully imap-send: handle NULL return of next_arg() 27 November 2017, 01:57:00 UTC
7d22aec RelNotes: minor typo fixes in 2.15.1 draft Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 November 2017, 03:49:23 UTC
95a731c Almost ready for 2.15.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 November 2017, 05:07:08 UTC
1c89be1 Merge branch 'rs/sequencer-rewrite-file-cleanup' into maint Code cleanup. * rs/sequencer-rewrite-file-cleanup: sequencer.c: check return value of close() in rewrite_file() sequencer: use O_TRUNC to truncate files sequencer: factor out rewrite_file() 21 November 2017, 05:05:33 UTC
01e0c53 Merge branch 'cb/t4201-robustify' into maint A test update. * cb/t4201-robustify: t4201: make use of abbreviation in the test more robust 21 November 2017, 05:05:33 UTC
b2a2768 Merge branch 'tz/fsf-address-update' into maint Replace the mailing address of FSF to a URL, as FSF prefers. * tz/fsf-address-update: Replace Free Software Foundation address in license notices Replace Free Software Foundation address in license notices 21 November 2017, 05:05:32 UTC
8ff22f5 Merge branch 'ad/rebase-i-serie-typofix' into maint Typofix. * ad/rebase-i-serie-typofix: rebase -i: fix comment typo 21 November 2017, 05:05:32 UTC
5a80d1d Merge branch 'jk/info-alternates-fix' into maint We used to add an empty alternate object database to the system that does not help anything; it has been corrected. * jk/info-alternates-fix: link_alt_odb_entries: make empty input a noop 21 November 2017, 05:05:31 UTC
8e3e51a Merge branch 'ab/pcre-v2' into maint Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed. * ab/pcre-v2: grep: fix NO_LIBPCRE1_JIT to fully disable JIT 21 November 2017, 05:05:30 UTC
b77b96e Merge branch 'sr/wrapper-quote-filenames' into maint Some error messages did not quote filenames shown in it, which have been fixed. * sr/wrapper-quote-filenames: wrapper.c: consistently quote filenames in error messages 21 November 2017, 05:05:29 UTC
6baa11d Merge branch 'bw/rebase-i-ignored-submodule-fix' into maint "git rebase -i" recently started misbehaving when a submodule that is configured with 'submodule.<name>.ignore' is dirty; this has been corrected. * bw/rebase-i-ignored-submodule-fix: wt-status: actually ignore submodules when requested 21 November 2017, 05:05:29 UTC
782c030 config: flip return value of write_section() d9bd4cbb9cc (config: flip return value of store_write_*()) made write_section() follow the convention of write(2) to return -1 on error and the number of written bytes on success. 3b48045c6c7 (Merge branch 'sd/branch-copy') changed it back to returning 0 on error and 1 on success, but left its callers still checking for negative values. Let write_section() follow the convention of write(2) again to meet the expectations of its callers. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 November 2017, 11:38:40 UTC
5a1f5c3 Start preparation for 2.15.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 November 2017, 03:05:22 UTC
266b87b Merge branch 'ks/mailmap' into maint * ks/mailmap: mailmap: use Kaartic Sivaraam's new address 15 November 2017, 03:05:04 UTC
2d35c50 Merge branch 'jm/relnotes-2.15-typofix' into maint Typofix. * jm/relnotes-2.15-typofix: fix typos in 2.15.0 release notes 15 November 2017, 03:05:04 UTC
da2b4ee Merge branch 'cn/diff-indent-no-longer-is-experimental' into maint Doc update. * cn/diff-indent-no-longer-is-experimental: diff: --indent-heuristic is no longer experimental 15 November 2017, 03:05:04 UTC
74ef465 Merge branch 'js/mingw-redirect-std-handles' into maint MinGW updates. * js/mingw-redirect-std-handles: mingw: document the standard handle redirection mingw: optionally redirect stderr/stdout via the same handle mingw: add experimental feature to redirect standard handles 15 November 2017, 03:05:03 UTC
558d856 Merge branch 'js/wincred-empty-cred' into maint MinGW updates. * js/wincred-empty-cred: wincred: handle empty username/password correctly t0302: check helper can handle empty credentials 15 November 2017, 03:05:03 UTC
40bc898 Merge branch 'js/mingw-full-version-in-resources' into maint MinGW updates. * js/mingw-full-version-in-resources: mingw: include the full version information in the resources 15 November 2017, 03:05:03 UTC
30322f1 Merge branch 'dk/libsecret-unlock-to-load-fix' into maint The credential helper for libsecret (in contrib/) has been improved to allow possibly prompting the end user to unlock secrets that are currently locked (otherwise the secrets may not be loaded). * dk/libsecret-unlock-to-load-fix: credential-libsecret: unlock locked secrets 15 November 2017, 03:05:02 UTC
16f8cd1 Merge branch 'js/early-config' into maint Correct start-up sequence so that a repository could be placed immediately under the root directory again (which was broken at around Git 2.13). * js/early-config: setup: avoid double slashes when looking for HEAD 15 November 2017, 03:05:01 UTC
934e330 Merge branch 'ad/5580-unc-tests-on-cygwin' into maint UNC paths are also relevant in Cygwin builds and they are now tested just like Mingw builds. * ad/5580-unc-tests-on-cygwin: t5580: add Cygwin support 15 November 2017, 03:05:00 UTC
eae59c1 Merge branch 'ao/diff-populate-filespec-lstat-errorpath-fix' into maint After an error from lstat(), diff_populate_filespec() function sometimes still went ahead and used invalid data in struct stat, which has been fixed. * ao/diff-populate-filespec-lstat-errorpath-fix: diff: fix lstat() error handling in diff_populate_filespec() 15 November 2017, 03:04:59 UTC
4a1ddb5 Merge branch 'sb/blame-config-doc' into maint Description of blame.{showroot,blankboundary,showemail,date} configuration variables have been added to "git config --help". * sb/blame-config-doc: config: document blame configuration 15 November 2017, 03:04:59 UTC
ea33219 Merge branch 'tb/complete-checkout' into maint Command line completion (in contrib/) update. * tb/complete-checkout: completion: add remaining flags to checkout 15 November 2017, 03:04:58 UTC
3be9ac7 Merge branch 'jc/check-ref-format-oor' into maint "git check-ref-format --branch @{-1}" bit a "BUG()" when run outside a repository for obvious reasons; clarify the documentation and make sure we do not even try to expand the at-mark magic in such a case, but still call the validation logic for branch names. * jc/check-ref-format-oor: check-ref-format doc: --branch validates and expands <branch> check-ref-format --branch: strip refs/heads/ using skip_prefix check-ref-format --branch: do not expand @{...} outside repository 15 November 2017, 03:04:57 UTC
2e13879 Merge branch 'jc/t5601-copy-workaround' into maint A (possibly flakey) test fix. * jc/t5601-copy-workaround: t5601: rm the target file of cp that could still be executing 15 November 2017, 03:04:56 UTC
adfc49e Merge branch 'jk/rebase-i-exec-gitdir-fix' into maint A recent regression in "git rebase -i" that broke execution of git commands from subdirectories via "exec" insn has been fixed. * jk/rebase-i-exec-gitdir-fix: sequencer: pass absolute GIT_DIR to exec commands 15 November 2017, 03:04:56 UTC
fd7c38c Merge branch 'bw/grep-recurse-submodules' into maint A broken access to object databases in recent update to "git grep --recurse-submodules" has been fixed. * bw/grep-recurse-submodules: grep: take the read-lock when adding a submodule 15 November 2017, 03:04:55 UTC
21deee3 Merge branch 'js/submodule-in-excluded' into maint "git status --ignored -u" did not stop at a working tree of a separate project that is embedded in an ignored directory and listed files in that other project, instead of just showing the directory itself as ignored. * js/submodule-in-excluded: status: do not get confused by submodules in excluded directories 15 November 2017, 03:04:54 UTC
a9749b0 Merge branch 'ao/check-resolve-ref-unsafe-result' into maint "git commit", after making a commit, did not check for errors when asking on what branch it made the commit, which has been correted. * ao/check-resolve-ref-unsafe-result: commit: check result of resolve_ref_unsafe 15 November 2017, 03:04:53 UTC
9fbcb51 Merge branch 'jk/misc-resolve-ref-unsafe-fixes' into maint Some codepaths did not check for errors when asking what branch the HEAD points at, which have been fixed. * jk/misc-resolve-ref-unsafe-fixes: worktree: handle broken symrefs in find_shared_symref() log: handle broken HEAD in decoration check remote: handle broken symrefs test-ref-store: avoid passing NULL to printf 15 November 2017, 03:04:52 UTC
bb2c926 Merge branch 'sb/diff-color-moved-use-xdl-recmatch' into maint Instead of using custom line comparison and hashing functions to implement "moved lines" coloring in the diff output, use the pair of these functions from lower-layer xdiff/ code. * sb/diff-color-moved-use-xdl-recmatch: diff.c: get rid of duplicate implementation xdiff-interface: export comparing and hashing strings 15 November 2017, 03:04:52 UTC
fd50623 Merge branch 'jk/diff-color-moved-fix' into maint The experimental "color moved lines differently in diff output" feature was buggy around "ignore whitespace changes" edges, whihch has been corrected. * jk/diff-color-moved-fix: diff: handle NULs in get_string_hash() diff: fix whitespace-skipping with --color-moved t4015: test the output of "diff --color-moved -b" t4015: check "negative" case for "-w --color-moved" t4015: refactor --color-moved whitespace test 15 November 2017, 03:04:51 UTC
e18b1df Merge branch 'kd/auto-col-with-pager-fix' into maint "auto" as a value for the columnar output configuration ought to judge "is the output consumed by humans?" with the same criteria as "auto" for coloured output configuration, i.e. either the standard output stream is going to tty, or a pager is in use. We forgot the latter, which has been fixed. * kd/auto-col-with-pager-fix: column: do not include pager.c column: show auto columns when pager is active 15 November 2017, 03:04:50 UTC
2cd4e03 Merge branch 'sg/travis-fixes' into maint TravisCI build updates. * sg/travis-fixes: travis-ci: don't build Git for the static analysis job travis-ci: fix running P4 and Git LFS tests in Linux build jobs 15 November 2017, 03:04:49 UTC
f28e366 link_alt_odb_entries: make empty input a noop If an empty string is passed to link_alt_odb_entries(), our loop finds no entries and we link nothing. But we still do some preparatory work to normalize the object directory path, even though we'll never look at the result. This triggers in basically every git process, since we feed the usually-empty ALTERNATE_DB_ENVIRONMENT to the function. Let's detect early that there's nothing to do and return. While we're at it, let's treat NULL the same as an empty string as a favor to our callers. That saves prepare_alt_odb() from having to cover this case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 November 2017, 05:05:27 UTC
2fff1e1 grep: fix NO_LIBPCRE1_JIT to fully disable JIT If you have a pcre1 library which is compiled with JIT enabled then PCRE_STUDY_JIT_COMPILE will be defined whether or not the NO_LIBPCRE1_JIT configuration is set. This means that we enable JIT functionality when calling pcre_study even if NO_LIBPCRE1_JIT has been explicitly set and we just use plain pcre_exec later. Fix this by using own macro (GIT_PCRE_STUDY_JIT_COMPILE) which we set to PCRE_STUDY_JIT_COMPILE only if NO_LIBPCRE1_JIT is not set and define to 0 otherwise, as before. Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 November 2017, 03:49:53 UTC
5555a2a t4201: make use of abbreviation in the test more robust The test for '--abbrev' in t4201-shortlog.sh assumes that the commits generated in the test can always be uniquely abbreviated to 5 hex digits but this is not always the case. If you were unlucky and happened to run the test at (say) Thu Jun 22 03:04:49 2017 +0000, you would find that the first commit generated would collide with a tree object created later in the same test. This can be simulated in the version of t4201-shortlog.sh prior to this commit by setting GIT_COMMITTER_DATE and GIT_AUTHOR_DATE to 1498100689 after sourcing test-lib.sh. Change the test to test --abbrev=35 instead of --abbrev=5 to almost completely avoid the possibility of a partial collision and add a call to test_tick in the setup to make the test repeatable (the latter alone is sufficient to make it robust enough). Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 November 2017, 03:48:00 UTC
6ce15ce apply: avoid out-of-bounds access in fuzzy_matchlines() fuzzy_matchlines() uses a pointers to the first and last characters of two lines to keep track while matching them. This makes it impossible to deal with empty strings. It accesses characters before the start of empty lines. It can also access characters after the end when checking for trailing whitespace in the main loop. Avoid that by using pointers to the first character and the one *after* the last one. This is well-defined as long as the latter is not dereferenced. Basically rewrite the function based on that premise; it becomes much simpler as a result. There is no need to check for leading whitespace outside of the main loop anymore. Reported-by: Mahmoud Al-Qudsi <mqudsi@neosmart.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 November 2017, 05:41:40 UTC
f6be7ed doc/SubmittingPatches: correct subject guidance The examples and common practice for adding markers such as "RFC" or "v2" to the subject of patch emails is to have them within the same brackets as the "PATCH" text, not after the closing bracket. Further, the practice of `git format-patch` and the like, as well as what appears to be the more common pratice on the mailing list, is to use "[RFC PATCH]", not "[PATCH/RFC]". Update the SubmittingPatches article to match and to reference the `format-patch` helper arguments, and also make some minor text clarifications in the area. Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 November 2017, 18:07:03 UTC
5313bee Merge branch 'tz/fsf-address-update' of ../git-gui into tz/fsf-address-update * 'tz/fsf-address-update' of ../git-gui: Replace Free Software Foundation address in license notices 09 November 2017, 04:24:43 UTC
6310087 Replace Free Software Foundation address in license notices The mailing address for the FSF has changed over the years. Rather than updating the address across all files, refer readers to gnu.org, as the GNU GPL documentation now suggests for license notices. The mailing address is retained in the full license files (COPYING and LGPL-2.1). Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 November 2017, 04:24:13 UTC
4842579 Replace Free Software Foundation address in license notices The mailing address for the FSF has changed over the years. Rather than updating the address across all files, refer readers to gnu.org, as the GNU GPL documentation now suggests for license notices. The mailing address is retained in the full license files (COPYING and LGPL-2.1). The old address is still present in t/diff-lib/COPYING. This is intentional, as the file is used in tests and the contents are not expected to change. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 November 2017, 04:21:21 UTC
3dc5433 rebase -i: fix comment typo Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 November 2017, 03:32:25 UTC
4da7264 reduce_heads: fix memory leaks We currently have seven callers of `reduce_heads(foo)`. Six of them do not use the original list `foo` again, and actually, all six of those end up leaking it. Introduce and use `reduce_heads_replace(&foo)` as a leak-free version of `foo = reduce_heads(foo)` to fix several of these. Fix the remaining leaks using `free_commit_list()`. While we're here, document `reduce_heads()` and mark it as `extern`. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 November 2017, 02:34:00 UTC
a452d0f builtin/merge-base: free commit lists In several functions, we iterate through a commit list by assigning `result = result->next`. As a consequence, we lose the original pointer and eventually leak the list. Rewrite the loops so that we keep the original pointers, then call `free_commit_list()`. Various alternatives were considered: 1) Use `UNLEAK(result)` before the loop. Simple change, but not very pretty. These would definitely be new lows among our usages of UNLEAK. 2) Use `pop_commit()` when looping. Slightly less simple change, but it feels slightly preferable to first display the list, then free it. 3) As in this patch, but with `UNLEAK()` instead of freeing. We'd still go through all the trouble of refactoring the loop, and because it's not super-obvious that we're about to exit, let's just free the lists -- it probably doesn't affect the runtime much. In `handle_independent()` we can drop `result` while we're here and reuse the `revs`-variable instead. That matches several other users of `reduce_heads()`. The memory-leak that this hides will be addressed in the next commit. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 November 2017, 02:33:58 UTC
c6d8ccf wt-status: actually ignore submodules when requested Since ff6f1f564 (submodule-config: lazy-load a repository's .gitmodules file, 2017-08-03) rebase interactive fails if there are any submodules with unstaged changes which have been configured with a value for 'submodule.<name>.ignore' in the repository's config. This is due to how configured values of 'submodule.<name>.ignore' are handled in addition to a change in how the submodule config is loaded. When the diff machinery hits a submodule (gitlink as well as a corresponding entry in the submodule subsystem) it will read the value of 'submodule.<name>.ignore' stored in the repository's config and if the config is present it will clear the 'IGNORE_SUBMODULES' (which is the flag explicitly requested by rebase interactive), 'IGNORE_UNTRACKED_IN_SUBMODULES', and 'IGNORE_DIRTY_SUBMODULES' diff flags and then set one of them based on the configured value. Historically this wasn't a problem because the submodule subsystem wasn't initialized because the .gitmodules file wasn't explicitly loaded by the rebase interactive command. So when the diff machinery hit a submodule it would skip over reading any configured values of 'submodule.<name>.ignore'. In order to preserve the behavior of submodules being ignored by rebase interactive, also set the 'OVERRIDE_SUBMODULE_CONFIG' diff flag when submodules are requested to be ignored when checking for unstaged changes. Reported-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 07 November 2017, 02:20:55 UTC
0a288d1 wrapper.c: consistently quote filenames in error messages All other error messages in the file use quotes around the file name. This change removes two translations as "could not write to '%s'" and "could not close '%s'" are already translated and these two are the only occurrences without quotes. Signed-off-by: Simon Ruderich <simon@ruderich.org> [jc: adjusted tests I noticed were broken by the change] Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 02:53:14 UTC
8684dde fix typos in 2.15.0 release notes Signed-off-by: Jean Carlo Machado <contato@jeancarlomachado.com.br> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 02:34:26 UTC
f4e45cb bisect: fix memory leak when returning best element When `find_bisection()` returns a single list entry, it leaks the other entries. Move the to-be-returned item to the front and free the remainder. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 01:15:29 UTC
7c11718 bisect: fix off-by-one error in `best_bisection_sorted()` After we have sorted the `cnt`-many commits that we have selected, we place them into the commit list. We then set `p->next` to NULL, but as we do so, `p` is already pointing one beyond item number `cnt`. Indeed, we check whether `p` is NULL before dereferencing it. This only matters if there are TREESAME-commits. Since they should be skipped, they are not included in `cnt` and we will hit the situation where we set `p->next` to NULL. As a result, the list will be one longer than it should be. The last commit in the list will be one which occurs earlier, or which shouldn't be included. Do not update `p` the very last round in the loop. This ensures that after the loop, `p->next` points to the remainder of the list, and we can set it to NULL. While we're here, free that remainder to fix a memory leak. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 01:15:29 UTC
fc5c40b bisect: fix memory leak in `find_bisection()` `find_bisection()` rebuilds the commit list it is given by reversing it and skipping uninteresting commits. The uninteresting list entries are leaked. Free them to fix the leak. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 01:15:29 UTC
24d707f bisect: change calling-convention of `find_bisection()` This function takes a commit list and returns a commit list. The returned list is built by modifying the original list. Thus the caller should not use the original list again (and after the next commit fixes a memory leak, it must not). Change the function signature so that it takes a **list and has void return type. That should make it harder to misuse this function. While we're here, document this function. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 01:15:29 UTC
de0bc11 config: document blame configuration The options are currently only referenced by the git-blame man page, also explain them in git-config, which is the canonical page to contain all config options. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 November 2017, 01:13:15 UTC
9c109e9 credential-libsecret: unlock locked secrets Credentials exposed by the secret service DBUS interface may be locked. Setting the SECRET_SEARCH_UNLOCK flag will make the secret service unlock these secrets, possibly prompting the user for credentials to do so. Without this flag, the secret is simply not loaded. Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 04 November 2017, 01:59:21 UTC
fa4d8c7 setup: avoid double slashes when looking for HEAD Andrew Baumann reported that when called outside of any Git worktree, `git rev-parse --is-inside-work-tree` eventually tries to access `//HEAD`, i.e. any `HEAD` file in the root directory, but with a double slash. This double slash is not only unintentional, but is allowed by the POSIX standard to have a special meaning. And most notably on Windows, it does, where it refers to a UNC path of the form `//server/share/`. As a consequence, afore-mentioned `rev-parse` call not only looks for the wrong thing, but it also causes serious delays, as Windows will try to access a server called `HEAD`. Let's simply avoid the unintended double slash. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 November 2017, 14:02:25 UTC
cd3f8e2 mailmap: use Kaartic Sivaraam's new address Map the old address to the new, hopefully more permanent one. Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 November 2017, 14:00:07 UTC
618ec81 imap-send: handle missing response codes gracefully Response codes are optional. Exit parse_response_code() early if it's passed a NULL string, indicating that we reached the end of the reply. This avoids dereferencing said NULL pointer. Noticed-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 November 2017, 13:45:57 UTC
f54c5bd imap-send: handle NULL return of next_arg() next_arg() returns NULL if it runs out of arguments. Most call sites already handle that gracefully. Check in the remaining cases as well. Replace the NULL pointer with an empty string at the bottom of get_cmd_result() -- it's nicely reported as an unexpected response a few lines down. Error out explicitly at the remaining sites. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 November 2017, 13:45:45 UTC
bab7614 diff: --indent-heuristic is no longer experimental This heuristic has been the default since 2.14 so we should not confuse our users by saying that it's experimental and off by default. Signed-off-by: Carlos Martín Nieto <cmn@dwim.me> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 05:51:24 UTC
9360ec0 sequencer.c: check return value of close() in rewrite_file() Not checking close(2) can hide errors as not all errors are reported during the write(2). Signed-off-by: Simon Ruderich <simon@ruderich.org> Reviewed-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 04:39:13 UTC
b2f5571 mingw: document the standard handle redirection This feature has been in Git for Windows since v2.11.0(2), as an experimental option. Now it is considered mature, and it is high time to document it properly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 02:19:44 UTC
1a172e4 mingw: optionally redirect stderr/stdout via the same handle The "2>&1" notation in Powershell and in Unix shells implies that stderr is redirected to the same handle into which stdout is already written. Let's use this special value to allow the same trick with GIT_REDIRECT_STDERR and GIT_REDIRECT_STDOUT: if the former's value is `2>&1`, then stderr will simply be written to the same handle as stdout. The functionality was suggested by Jeff Hostetler. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 02:19:43 UTC
3f94442 mingw: add experimental feature to redirect standard handles Particularly when calling Git from applications, such as Visual Studio's Team Explorer, it is important that stdin/stdout/stderr are closed properly. However, when spawning processes on Windows, those handles must be marked as inheritable if we want to use them, but that flag is a global flag and may very well be used by other spawned processes which then do not know to close those handles. Let's introduce a set of environment variables (GIT_REDIRECT_STDIN and friends) that specify paths to files, or even better, named pipes (which are similar to Unix sockets) and that are used by the spawned Git process. This helps work around above-mentioned issue: those named pipes will be opened in a non-inheritable way upon startup, and no handles are passed around (and therefore no inherited handles need to be closed by any spawned child). This feature shipped with Git for Windows (marked as experimental) since v2.11.0(2), so it has seen some serious testing in the meantime. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 02:19:41 UTC
c215495 travis-ci: don't build Git for the static analysis job The static analysis job on Travis CI builds Git ever since it was introduced in d8245bb3f (travis-ci: add static analysis build job to run coccicheck, 2017-04-11). However, Coccinelle, the only static analysis tool in use, only needs Git's source code to work and it doesn't care about built Git binaries at all. Spare some of Travis CI's resources and don't build Git for the static analysis job unnecessarily. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 02:05:30 UTC
83d1efe travis-ci: fix running P4 and Git LFS tests in Linux build jobs Linux build jobs on Travis CI skip the P4 and Git LFS tests since commit 657343a60 (travis-ci: move Travis CI code into dedicated scripts, 2017-09-10), claiming there are no P4 or Git LFS installed. The reason is that P4 and Git LFS binaries are not installed to a directory in the default $PATH, but their directories are prepended to $PATH. This worked just fine before said commit, because $PATH was set in a scriptlet embedded in our '.travis.yml', thus its new value was visible during the rest of the build job. However, after these embedded scriptlets were moved into dedicated scripts executed in separate shell processes, any variable set in one of those scripts is only visible in that single script but not in any of the others. In this case, 'ci/install-dependencies.sh' downloads P4 and Git LFS and modifies $PATH, but to no effect, because 'ci/run-tests.sh' only sees Travis CI's default $PATH. Move adjusting $PATH to 'ci/lib-travisci.sh', which is sourced in all other 'ci/' scripts, so all those scripts will see the updated $PATH value. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 02:05:28 UTC
9560e62 grep: take the read-lock when adding a submodule With --recurse-submodules, we add each submodule that we encounter to the list of alternate object databases. With threading, our changes to the list are not protected against races. Indeed, ThreadSanitizer reports a race when we call `add_to_alternates_memory()` around the same time that another thread is reading in the list through `read_sha1_file()`. Take the grep read-lock while adding the submodule. The lock is used to serialize uses of non-thread-safe parts of Git's API, including `read_sha1_file()`. Helped-by: Brandon Williams <bmwill@google.com> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Brandon Williams <bmwill@google.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 01:58:08 UTC
09d7b6c sequencer: pass absolute GIT_DIR to exec commands When we replaced the old shell script based interactive rebase in commmit 18633e1a22a6 ("rebase -i: use the rebase--helper builtin", 2017-02-09) we introduced a regression of functionality in that the GIT_DIR would be sent to the environment of the exec command as-is. This generally meant that it would be passed as "GIT_DIR=.git", which causes problems for any exec command that wants to run git commands in a subdirectory. This isn't a very large regression, since it is not that likely that the exec command will run a git command, and even less likely that it will need to do so in a subdir. This regression was discovered by a build system which uses git-describe to find the current version of the build system, and happened to do so from the src/ sub directory of the project. Fix this by passing in the absolute path of the git directory into the child environment. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 November 2017, 01:53:23 UTC
601e1e7 wincred: handle empty username/password correctly Empty (length 0) usernames and/or passwords, when saved in the Windows Credential Manager, come back as null when reading the credential. One use case for such empty credentials is with NTLM authentication, where empty username and password instruct libcurl to authenticate using the credentials of the currently logged-on user (single sign-on). When locating the relevant credentials, make empty username match null. When outputting the credentials, handle nulls correctly. Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 04:46:39 UTC
3c90bda t0302: check helper can handle empty credentials Make sure the helper does not crash when blank username and password is provided. If the helper can save such credentials, it should be able to read them back. Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 04:46:39 UTC
39bb86b mingw: include the full version information in the resources This fixes https://github.com/git-for-windows/git/issues/723 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 04:43:52 UTC
c8cee96 sequencer: use O_TRUNC to truncate files Cut off any previous content of the file to be rewritten by passing the flag O_TRUNC to open(2) instead of calling ftruncate(2) at the end. That's easier and shorter. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 01:53:19 UTC
73646bf sequencer: factor out rewrite_file() Reduce code duplication by extracting a function for rewriting an existing file. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 01:50:36 UTC
f21d60b t5580: add Cygwin support t5580 tests that specifying Windows UNC paths works with Git. Cygwin supports UNC paths, albeit only using forward slashes, not backslashes, so run the compatible tests on Cygwin as well as MinGW. The only complication is Cygwin's `pwd`, which returns a *nix-style path, and that's not suitable for calculating the UNC path to the current directory. Instead use Cygwin's `cygpath` utility to get the Windows-style path. Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org> Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 November 2017, 01:44:55 UTC
cb5918a Git 2.15 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 October 2017, 05:00:44 UTC
af103b3 Merge tag 'l10n-2.15.0-rnd2.1' of git://github.com/git-l10n/git-po l10n for Git 2.15.0 round 2 with Catalan updates * tag 'l10n-2.15.0-rnd2.1' of git://github.com/git-l10n/git-po: l10n: Update Catalan translation 30 October 2017, 00:32:54 UTC
3f86f68 l10n: Update Catalan translation Signed-off-by: Jordi Mas <jmas@softcatala.org> 29 October 2017, 02:04:12 UTC
10e0ca8 diff: fix lstat() error handling in diff_populate_filespec() Add lstat() error handling not only for ENOENT case. Otherwise uninitialised 'struct stat st' variable is used later in case of lstat() non-ENOENT failure which leads to processing of rubbish values of file mode ('S_ISLNK(st.st_mode)' check) or size ('xsize_t(st.st_size)'). Signed-off-by: Andrey Okoshkin <a.okoshkin@samsung.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 October 2017, 01:16:36 UTC
2f89985 Hopefully final batch before 2.15 Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 October 2017, 01:20:30 UTC
d8f3074 Merge branch 'sg/rev-list-doc-reorder-fix' Doc flow fix. * sg/rev-list-doc-reorder-fix: rev-list-options.txt: use correct directional reference 28 October 2017, 01:18:42 UTC
986ffdc Merge branch 'sb/rev-parse-show-superproject-root' Doc markup fix. * sb/rev-parse-show-superproject-root: docs: fix formatting of rev-parse's --show-superproject-working-tree 28 October 2017, 01:18:40 UTC
fd052e4 Merge branch 'ao/path-use-xmalloc' A possible oom error is now caught as a fatal error, instead of continuing and dereferencing NULL. * ao/path-use-xmalloc: path.c: use xmalloc() in add_to_trie() 28 October 2017, 01:18:40 UTC
2d8f12d Merge branch 'np/config-path-doc' Doc update. * np/config-path-doc: config doc: clarify "git config --path" example 28 October 2017, 01:18:39 UTC
e38c681 docs: fix formatting of rev-parse's --show-superproject-working-tree Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 October 2017, 01:31:46 UTC
4f851dc rev-list-options.txt: use correct directional reference The descriptions of the options '--parents', '--children' and '--graph' say "see 'History Simplification' below", although the referred section is in fact above the description of these options. Send readers in the right direction by saying "above" instead of "below". Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 October 2017, 01:29:38 UTC
4e40fb3 Merge branch 'mh/ref-locking-fix' Transactions to update multiple references that involves a deletion was quite broken in an error codepath and did not abort everything correctly. * mh/ref-locking-fix: files_transaction_prepare(): fix handling of ref lock failure t1404: add a bunch of tests of D/F conflicts 26 October 2017, 03:29:23 UTC
fadb482 status: do not get confused by submodules in excluded directories We meticulously pass the `exclude` flag to the `treat_directory()` function so that we can indicate that files in it are excluded rather than untracked when recursing. But we did not yet treat submodules the same way. Because of that, `git status --ignored --untracked` with a submodule `submodule` in a gitignored `tracked/` would show the submodule in the "Untracked files" section, e.g. On branch master Untracked files: (use "git add <file>..." to include in what will be committed) tracked/submodule/ Ignored files: (use "git add -f <file>..." to include in what will be committed) tracked/submodule/initial.t Instead, we would want it to show the submodule in the "Ignored files" section: On branch master Ignored files: (use "git add -f <file>..." to include in what will be committed) tracked/submodule/ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 October 2017, 02:29:06 UTC
01be97c diff.c: get rid of duplicate implementation The implementations in diff.c to detect moved lines needs to compare strings and hash strings, which is implemented in that file, as well as in the xdiff library. Remove the rather recent implementation in diff.c and rely on the well exercised code in the xdiff lib. With this change the hash used for bucketing the strings for the moved line detection changes from FNV32 (that is provided via the hashmaps memhash) to DJB2 (which is used internally in xdiff). Benchmarks found on the web[1] do not indicate that these hashes are different in performance for readable strings. [1] https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 October 2017, 02:23:32 UTC
5ec8274 xdiff-interface: export comparing and hashing strings This will turn out to be useful in a later patch. xdl_recmatch is exported in xdiff/xutils.h, to be used by various xdiff/*.c files, but not outside of xdiff/. This one makes it available to the outside, too. While at it, add documentation. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 October 2017, 02:23:22 UTC
55d7d15 path.c: use xmalloc() in add_to_trie() Add usage of xmalloc() instead of malloc() in add_to_trie() as xmalloc wraps and checks memory allocation result. Signed-off-by: Andrey Okoshkin <a.okoshkin@samsung.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 October 2017, 07:16:22 UTC
6357d9d completion: add remaining flags to checkout In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce --detach synonym for "git checkout foo^{commit}", 2011-02-08) checkout gained new flags but the completion was not updated, although these flags are useful completions. Add them. The flags --force and --ignore-other-worktrees are not added as they are potentially dangerous. The flags --progress and --no-progress are only useful for scripting and are therefore also not included. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 October 2017, 06:12:46 UTC
da5267f files_transaction_prepare(): fix handling of ref lock failure Since dc39e09942 (files_ref_store: use a transaction to update packed refs, 2017-09-08), failure to lock a reference has been handled incorrectly by `files_transaction_prepare()`. If `lock_ref_for_update()` fails in the lock-acquisition loop of that function, it sets `ret` then breaks out of that loop. Prior to dc39e09942, that was OK, because the only thing following the loop was the cleanup code. But dc39e09942 added another blurb of code between the loop and the cleanup. That blurb sometimes resets `ret` to zero, making the cleanup code think that the locking was successful. Specifically, whenever * One or more reference deletions have been processed successfully in the lock-acquisition loop. (Processing the first such reference causes a packed-ref transaction to be initialized.) * Then `lock_ref_for_update()` fails for a subsequent reference. Such a failure can happen for a number of reasons, such as the old SHA-1 not being correct, lock contention, etc. This causes a `break` out of the lock-acquisition loop. * The `packed-refs` lock is acquired successfully and `ref_transaction_prepare()` succeeds for the packed-ref transaction. This has the effect of resetting `ret` back to 0, and making the cleanup code think that lock acquisition was successful. In that case, any reference updates that were processed prior to breaking out of the loop would be carried out (loose and packed), but the reference that couldn't be locked and any subsequent references would silently be ignored. This can easily cause data loss if, for example, the user was trying to push a new name for an existing branch while deleting the old name. After the push, the branch could be left unreachable, and could even subsequently be garbage-collected. This problem was noticed in the context of deleting one reference and creating another in a single transaction, when the two references D/F conflict with each other, like git update-ref --stdin <<EOF delete refs/foo create refs/foo/bar HEAD EOF This triggers the above bug because the deletion is processed successfully for `refs/foo`, then the D/F conflict causes `lock_ref_for_update()` to fail when `refs/foo/bar` is processed. In this case the transaction *should* fail, but instead it causes `refs/foo` to be deleted without creating `refs/foo`. This could easily result in data loss. The fix is simple: instead of just breaking out of the loop, jump directly to the cleanup code. This fixes some tests in t1404 that were added in the previous commit. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 October 2017, 06:08:26 UTC
back to top