We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's the Weekly Digest for gitgitgadget/git:
Last week 21 issues were created. Of these, 2 issues have been closed and 19 issues are still open.
💚 #211 rebase -i: implement --reschedule, by dscho 💚 #210 rebase -i: error on fixup/squash when the corresponding pick was skipped, by dscho 💚 #209 rebase -r: implement an equivalent to skip_unnecessary_picks(), by dscho 💚 #208 Close commit-graph before calling 'gc', by derrickstolee 💚 #207 range-diff: allow comparing branches to mboxes, by dscho 💚 #206 range-diff: add support for --left-only and --right-only, by dscho 💚 #205 Offer an easy way to fetch/pull the branch matching the name of the current branch, by dscho 💚 #204 rebase -ir: optionally auto-update local branches when executing label commands, by dscho 💚 #203 git cherry-pick --pick-merges , by dscho 💚 #202 rebase -ir should warn (or error out) when commits were produced but not included in the final commit history, by dscho 💚 #201 Make OPT_RERERE_AUTOUPDATE's "unspecified" value consistent with other unspecified values, by dscho 💚 #200 Mention core.excludesFile in git clean's documentation, by dscho 💚 #199 Allow reset <tag> in git rebase -ir, by dscho 💚 #198 Avoid duplicate entries in git ls-files for unmerged entries, by dscho 💚 #197 Fix flakey t7519.15, by dscho 💚 #196 status: remove the empty line after hints, by johnlinp 💚 #195 Drop support for git rebase --preserve-merges, by dscho 💚 #194 Clean up after the removal of the scripted rebase, by dscho 💚 #191 Remove fast export munging, by newren
--left-only
--right-only
label
core.excludesFile
git clean
reset <tag>
git rebase -ir
git ls-files
git rebase --preserve-merges
❤️ #193 Document the stash.useBuiltin escape hatch, by dscho ❤️ #192 pkt-line: fix incorrect function declaration, by dscho
🔈 #192 pkt-line: fix incorrect function declaration, by dscho It received 10 comments.
Last week, 8 pull requests were created, updated or merged.
Last week, 8 pull requests were updated. 💛 #196 status: remove the empty line after hints, by johnlinp 💛 #195 Drop support for git rebase --preserve-merges, by dscho 💛 #191 Remove fast export munging, by newren 💛 #189 trace2: Add variable description to git.txt, by derrickstolee 💛 #183 p4: fix "Not a valid object name HEAD0" when unshelving, by mdymike 💛 #177 documentation: add lab for first contribution, by nasamuffin 💛 #170 git add -i: add a rudimentary version in C (supporting only status and help so far), by dscho 💛 #92 Create 'expire' and 'repack' verbs for git-multi-pack-index, by derrickstolee
status
help
Last week there were 32 commits. 🛠️ pkt-line: drop 'const'-ness of a param to set_packet_header() The function's definition has a paramter of type "int" qualified as "const". The fact that the incoming parameter is used as read-only in the fuction is an implementation detail that the callers should not have to be told in the prototype declaring it (and "const" there has no effect, as C passes parameters by value). The prototype defined for the function in pkt-line.h lacked the matching "const" for this reason, but apparently some compilers (e.g. MS Visual C 2017) complain about the parameter type mismatch. Let's squelch it by removing the "const" that is pointless in the definition of a small and trivial function like this, which would not help optimizing compilers nor reading humans that much. Noticed-by: Johannes Schindelin johannes.schindelin@gmx.de Helped-by: Jeff King peff@peff.net Signed-off-by: Junio C Hamano gitster@pobox.com by gitster 🛠️ test-lib: try harder to ensure a working jgit The JGIT prereq uses type jgit to determine whether jgit is present. While this is usually sufficient, it won't help if the jgit found is badly broken. This wastes time running tests which fail due to no fault of our own. Use jgit --version instead, to guard against cases where jgit is present on the system, but will fail to run, e.g. because of some JRE issue, or missing Java dependencies. Checking that it gets far enough to process the '--version' argument isn't perfect, but seems to be good enough in practice. It's also consistent with how we detect some other dependencies, see e.g. the CURL and UNZIP prerequisites. Signed-off-by: Todd Zullinger tmz@pobox.com Signed-off-by: Junio C Hamano gitster@pobox.com by tmzullinger 🛠️ get_oid: handle NULL repo->index When get_oid() and its helpers see an index name like ":.gitmodules", they try to load the index on demand, like: if (repo->index->cache) repo_read_index(repo); However, that misses the case when "repo->index" itself is NULL; we'll segfault in the conditional. This never happens with the_repository; there we always point its index field to &the_index. But a submodule repository may have a NULL index field until somebody calls repo_read_index(). This bug is triggered by t7411, but it was hard to notice because it's in an expect_failure block. That test was added by 2b1257e463 (t/helper: add test-submodule-nested-repo-config, 2018-10-25). Back then we had no easy way to access the .gitmodules blob of a submodule repo, so we expected (and got) an error message to that effect. Later, d9b8b8f896 (submodule-config.c: use repo_get_oid for reading .gitmodules, 2019-04-16) started looking in the correct repo, which is when we started triggering the segfault. With this fix, the test starts passing (once we clean it up as its comment instructs). Note that as far as I know, this bug could not be triggered outside of the test suite. It requires resolving an index name in a submodule, and all of the code paths (aside from test-tool) which do that either load the index themselves, or always pass the_repository. Ultimately it comes from 3a7a698e93 (sha1-name.c: remove implicit dependency on the_index, 2019-01-12), which replaced a check of "the_index.cache" with "repo->index->cache". So even if there is another way to trigger it, it wouldn't affect any versions before then. Signed-off-by: Jeff King peff@peff.net Signed-off-by: Junio C Hamano gitster@pobox.com by peff 🛠️ http-push: prevent format overflow warning with gcc >= 9 In function 'finish_request', inlined from 'process_response' at http-push.c:248:2: http-push.c:587:4: warning: '%s' directive argument is null [-Wformat-overflow=] 587 | fprintf(stderr, "Unable to get pack file %s\n%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 588 | request->url, curl_errorstr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ request->url is needed for the error message if there was a failure during fetch but was being cleared unnecessarily earlier. note that the leak is prevented by calling release_request unconditionally at the end. Signed-off-by: Carlo Marcelo Arenas Belón carenas@gmail.com Suggested-by: Eric Sunshine sunshine@sunshineco.com Signed-off-by: Junio C Hamano gitster@pobox.com by carenas 🛠️ stash: document stash.useBuiltin The stash.useBuiltin variable introduced in 90a462725e ("stash: optionally use the scripted version again", 2019-02-25) was turned on by default, but had no documentation. Let's document it so that users who run into any stability issues with the C rewrite know there's an escape hatch, and spell out that the user should please report the bug when they have to turn off the built-in stash. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho 🛠️ sha1dc: update from upstream Update sha1dc from the latest version by the upstream maintainer[1]. See 07a20f569b ("Makefile: fix unaligned loads in sha1dc with UBSan", 2019-03-12) for the last update. This fixes an issue where HP-UX IA64 was wrongly detected as a Little-endian instead of a Big-endian system, see [2] and [3]. 1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/855827c583bc30645ba427885caa40c5b81764d2 2. https://public-inbox.org/git/603989bd-f86d-c61d-c6f5-fb6748a65ba9@siemens.com/ 3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/50 Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by avar 🛠️ parse-options: adjust parse_opt_unknown_cb()s declared return type In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27), the signature of the low-level parse-opt callback function was changed to return an enum. And while the implementations were changed, one declaration was left unchanged, still claiming to return int. This can potentially lead to problems, as compilers are free to choose any integral type for an enum as long as it can represent all declared values. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho 🛠️ Git 2.22-rc0 Signed-off-by: Junio C Hamano gitster@pobox.com by gitster 🛠️ Merge branch 'jh/trace2' A few embarrassing bugfixes. * jh/trace2: trace2: fix up a missing "leave" entry point trace2: fix incorrect function pointer check by gitster 🛠️ Merge branch 'cc/access-on-aix-workaround' Workaround for standard-compliant but less-than-useful behaviour of access(2) for the root user. * cc/access-on-aix-workaround: git-compat-util: work around for access(X_OK) under root by gitster 🛠️ Merge branch 'pw/clean-sequencer-state-upon-final-commit' "git chery-pick" (and "revert" that shares the same runtime engine) that deals with multiple commits got confused when the final step gets stopped with a conflict and the user concluded the sequence with "git commit". Attempt to fix it by cleaning up the state files used by these commands in such a situation. * pw/clean-sequencer-state-upon-final-commit: fix cherry-pick/revert status after commit commit/reset: try to clean up sequencer state by gitster 🛠️ Merge branch 'pw/rebase-i-internal' The internal implementation of "git rebase -i" has been updated to avoid forking a separate "rebase--interactive" process. * pw/rebase-i-internal: rebase -i: run without forking rebase--interactive rebase: use a common action enum rebase -i: use struct rebase_options in do_interactive_rebase() rebase -i: use struct rebase_options to parse args rebase -i: use struct object_id for squash_onto rebase -i: use struct commit when parsing options rebase -i: remove duplication rebase -i: combine rebase--interactive.c with rebase.c rebase: use OPT_RERERE_AUTOUPDATE() rebase: rename write_basic_state() rebase: don't translate trace strings sequencer: always discard index after checkout by gitster 🛠️ Merge branch 'jk/perf-aggregate-wo-libjson' The script to aggregate perf result unconditionally depended on libjson-perl even though it did not have to, which has been corrected. * jk/perf-aggregate-wo-libjson: t/perf: depend on perl JSON only when using --codespeed by gitster 🛠️ Merge branch 'dl/rev-tilde-doc-clarify' Docfix. * dl/rev-tilde-doc-clarify: revisions.txt: remove ambibuity between : and : revisions.txt: mention ~ form revisions.txt: mark optional rev arguments with [] revisions.txt: change "rev" to "" by gitster 🛠️ Merge branch 'jc/make-dedup-ls-files-output' A "ls-files" that emulates "find" to enumerate files in the working tree resulted in duplicated Makefile rules that caused the build to issue an unnecessary warning during a trial build after merge conflicts are resolved in working tree *.h files but before the resolved results are added to the index. This has been corrected. * jc/make-dedup-ls-files-output: Makefile: dedup list of files obtained from ls-files by gitster 🛠️ Merge branch 'jk/ls-files-doc-markup-fix' Docfix. * jk/ls-files-doc-markup-fix: doc/ls-files: put nested list for "-t" option into block by gitster 🛠️ Merge branch 'jk/p5302-avoid-collision-check-cost' Fix index-pack perf test so that the repeated invocations always run in an empty repository, which emulates the initial clone situation better. * jk/p5302-avoid-collision-check-cost: p5302: create the repo in each index-pack test by gitster 🛠️ Merge branch 'dl/no-extern-in-func-decl' Mechanically and systematically drop "extern" from function declarlation. * dl/no-extern-in-func-decl: *.[ch]: manually align parameter lists *.[ch]: remove extern from function declarations using sed *.[ch]: remove extern from function declarations using spatch by gitster 🛠️ Merge branch 'ew/repack-with-bitmaps-by-default' The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos by gitster 🛠️ Merge branch 'js/partial-clone-connectivity-check' During an initial "git clone --depth=..." partial clone, it is pointless to spend cycles for a large portion of the connectivity check that enumerates and skips promisor objects (which by definition is all objects fetched from the other side). This has been optimized out. * js/partial-clone-connectivity-check: t/perf: add perf script for partial clones clone: do faster object check for partial clones by gitster 🛠️ Merge branch 'jh/trace2-sid-fix' Polishing of the new trace2 facility continues. The system-level configuration can specify site-wide trace2 settings, which can be overridden with per-user configuration and environment variables. * jh/trace2-sid-fix: trace2: fixup access problem on /etc/gitconfig in read_very_early_config trace2: update docs to describe system/global config settings trace2: make SIDs more unique trace2: clarify UTC datetime formatting trace2: report peak memory usage of the process trace2: use system/global config for default trace2 settings config: add read_very_early_config() trace2: find exec-dir before trace2 initialization trace2: add absolute elapsed time to start event trace2: refactor setting process starting time config: initialize opts structure in repo_read_config() by gitster 🛠️ difftool: fallback on merge.guitool In git-difftool.txt, it says 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. However, when diff.guitool is missing, it doesn't fallback to anything. Make git-difftool fallback to merge.guitool when diff.guitool is missing. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L 🛠️ difftool: make --gui, --tool and --extcmd mutually exclusive In git-difftool, these options specify which tool to ultimately run. As a result, they are logically conflicting. Explicitly disallow these options from being used together. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L 🛠️ mergetool: fallback to tool when guitool unavailable In git-difftool, if the tool is called with --gui but diff.guitool is not set, it falls back to diff.tool. Make git-mergetool also fallback from merge.guitool to merge.tool if the former is undefined. If git-difftool, when called with --gui, were to use get_configured_mergetool in a future patch, it would also get the fallback behavior in the following precedence: 1. diff.guitool 2. merge.guitool 3. diff.tool 4. merge.tool The behavior for when difftool or mergetool are called without --gui should be identical with or without this patch. Note that the search loop could be written as sections="merge" keys="tool" if diff_mode then sections="diff $sections" fi if gui_mode then keys="guitool $keys" fi merge_tool=$( IFS=' ' for key in $keys do for section in $sections do selected=$(git config $section.$key) if test -n "$selected" then echo "$selected" return fi done done) which would make adding a mode in the future much easier. However, adding a new mode will likely never happen as it is highly discouraged so, as a result, it is written in its current form so that it is more readable for future readers. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L 🛠️ mergetool--lib: create gui_mode function Before, in get_configured_merge_tool, we would test the value of the first argument directly, which corresponded to whether we were using guitool. However, since $GIT_MERGETOOL_GUI is available as an environment variable, create the gui_mode function which increases the clarify of functions which use it. While we're at it, add a space before () in function definitions to fix the style. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L 🛠️ mergetool: use get_merge_tool function In git-mergetool, the logic for getting which merge tool to use is duplicated in git-mergetool--lib, except for the fact that it needs to know whether the tool was guessed or not. Rewrite get_merge_tool to return whether or not the tool was guessed through the return code and make git-mergetool call this function instead of duplicating the logic. Note that 1 was chosen to be the return code of when a tool is guessed because it seems like a slightly more abnormal condition than getting a tool that's explicitly specified but this is completely arbitrary. Also, let $GIT_MERGETOOL_GUI be set to determine whether or not the guitool will be selected. This change is not completely backwards compatible as there may be external users of git-mergetool--lib. However, only one user, git-diffall[1], was found from searching GitHub and Google, and this tool is superseded by git difftool --dir-diff anyway. It seems very unlikely that there exists an external caller that would take into account the return code of get_merge_tool as it would always return 0 before this change so this change probably does not affect any external users. [1]: https://github.com/thenigan/git-diffall Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L 🛠️ trace2: add variable description to git.txt Documentation/technical/api-trace2.txt contains the full details of the trace2 API and the GIT_TR2* environment variables. However, most environment variables are included in Documentation/git.txt, including the GIT_TRACE* variables. Add a brief description of the GIT_TR2* variables with links to the full technical details. The biggest difference from the original variables is that we can specify a Unix Domain Socket. Mention this difference, but leave the details to the technical documents. Reported-by: Szeder Gábor szeder.dev@gmail.com Signed-off-by: Derrick Stolee dstolee@microsoft.com Signed-off-by: Junio C Hamano gitster@pobox.com by derrickstolee 🛠️ status: fix display of rebase -ir's label command The argument of a label command does not want to be turned into an abbreviated SHA-1. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho 🛠️ trace2: fix up a missing "leave" entry point Fix a trivial bug that's been here since the shared/do_write_index tracing was added in 42fee7a388 ("trace2:data: add trace2 instrumentation to index read/write", 2019-02-22). We should have enter/leave points, not two enter/enter points. This resulted in an "enter" event without a corresponding "leave" event. Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Acked-by: Derrick Stolee dstolee@microsoft.com Signed-off-by: Junio C Hamano gitster@pobox.com by avar 🛠️ check-non-portable-shell: support Perl versions older than 5.10 For thoroughness when checking for one-shot environment variable assignments at shell function call sites, check-non-portable-shell stitches together incomplete lines (those ending with backslash). This allows it to correctly flag such undesirable usage even when the variable assignment and function call are split across lines, for example: FOO=bar \ func where 'func' is a shell function. The stitching is accomplished like this: while (<>) { chomp; # stitch together incomplete lines (those ending with "") while (s/\$//) { $_ .= readline; chomp; } # detect unportable/undesirable shell constructs ... } Although this implementation is well supported in reasonably modern Perl versions (5.10 and later), it fails with older versions (such as Perl 5.8 shipped with ancient Mac OS 10.5). In particular, in older Perl versions, 'readline' is not connected to the file handle associated with the "magic" while (<>) {...} construct, so 'readline' throws a "readline() on unopened filehandle" error. Work around this problem by dropping readline() and instead incorporating the stitching of incomplete lines directly into the existing while (<>) {...} loop. Helped-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Signed-off-by: Eric Sunshine sunshine@sunshineco.com Signed-off-by: Junio C Hamano gitster@pobox.com by sunshineco 🛠️ mingw: enable DEP and ASLR Enable DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) support. This applies to both 32bit and 64bit builds and makes it substantially harder to exploit security holes in Git by offering a much more unpredictable attack surface. ASLR interferes with GDB's ability to set breakpoints. A similar issue holds true when compiling with -O2 (in which case single-stepping is messed up because GDB cannot map the code back to the original source code properly). Therefore we simply enable ASLR only when an optimization flag is present in the CFLAGS, using it as an indicator that the developer does not want to debug in GDB anyway. Signed-off-by: İsmail Dönmez ismail@i10z.com Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by ismail 🛠️ mingw: do not let ld strip relocations This is the first step for enabling ASLR (Address Space Layout Randomization) support. We want to enable ASLR for better protection against exploiting security holes in Git: it makes it harder to attack software by making code addresses unpredictable. The problem fixed by this commit is that ld.exe seems to be stripping relocations which in turn will break ASLR support. We just make sure it's not stripping the main executable entry. Signed-off-by: İsmail Dönmez ismail@i10z.com Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by ismail
type jgit
jgit --version
parse_opt_unknown_cb()
enum
int
diff.guitool
merge.guitool
diff.tool
merge.tool
--gui
get_configured_mergetool
get_configured_merge_tool
$GIT_MERGETOOL_GUI
gui_mode
()
get_merge_tool
git difftool --dir-diff
ld.exe
Last week there were 10 contributors. 👤 gitster 👤 tmzullinger 👤 peff 👤 carenas 👤 dscho 👤 avar 👤 Denton-L 👤 derrickstolee 👤 sunshineco 👤 ismail
Last week there were no stargazers.
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository gitgitgadget/git to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
Your Weekly Digest bot. 📆
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here's the Weekly Digest for gitgitgadget/git:
ISSUES
Last week 21 issues were created.
Of these, 2 issues have been closed and 19 issues are still open.
OPEN ISSUES
💚 #211 rebase -i: implement --reschedule, by dscho
💚 #210 rebase -i: error on fixup/squash when the corresponding pick was skipped, by dscho
💚 #209 rebase -r: implement an equivalent to skip_unnecessary_picks(), by dscho
💚 #208 Close commit-graph before calling 'gc', by derrickstolee
💚 #207 range-diff: allow comparing branches to mboxes, by dscho
💚 #206 range-diff: add support for
--left-only
and--right-only
, by dscho💚 #205 Offer an easy way to fetch/pull the branch matching the name of the current branch, by dscho
💚 #204 rebase -ir: optionally auto-update local branches when executing
label
commands, by dscho💚 #203 git cherry-pick --pick-merges , by dscho
💚 #202 rebase -ir should warn (or error out) when commits were produced but not included in the final commit history, by dscho
💚 #201 Make OPT_RERERE_AUTOUPDATE's "unspecified" value consistent with other unspecified values, by dscho
💚 #200 Mention
core.excludesFile
ingit clean
's documentation, by dscho💚 #199 Allow
reset <tag>
ingit rebase -ir
, by dscho💚 #198 Avoid duplicate entries in
git ls-files
for unmerged entries, by dscho💚 #197 Fix flakey t7519.15, by dscho
💚 #196 status: remove the empty line after hints, by johnlinp
💚 #195 Drop support for
git rebase --preserve-merges
, by dscho💚 #194 Clean up after the removal of the scripted rebase, by dscho
💚 #191 Remove fast export munging, by newren
CLOSED ISSUES
❤️ #193 Document the stash.useBuiltin escape hatch, by dscho
❤️ #192 pkt-line: fix incorrect function declaration, by dscho
NOISY ISSUE
🔈 #192 pkt-line: fix incorrect function declaration, by dscho
It received 10 comments.
PULL REQUESTS
Last week, 8 pull requests were created, updated or merged.
UPDATED PULL REQUEST
Last week, 8 pull requests were updated.
💛 #196 status: remove the empty line after hints, by johnlinp
💛 #195 Drop support for
git rebase --preserve-merges
, by dscho💛 #191 Remove fast export munging, by newren
💛 #189 trace2: Add variable description to git.txt, by derrickstolee
💛 #183 p4: fix "Not a valid object name HEAD0" when unshelving, by mdymike
💛 #177 documentation: add lab for first contribution, by nasamuffin
💛 #170 git add -i: add a rudimentary version in C (supporting only
status
andhelp
so far), by dscho💛 #92 Create 'expire' and 'repack' verbs for git-multi-pack-index, by derrickstolee
COMMITS
Last week there were 32 commits.
🛠️ pkt-line: drop 'const'-ness of a param to set_packet_header() The function's definition has a paramter of type "int" qualified as "const". The fact that the incoming parameter is used as read-only in the fuction is an implementation detail that the callers should not have to be told in the prototype declaring it (and "const" there has no effect, as C passes parameters by value). The prototype defined for the function in pkt-line.h lacked the matching "const" for this reason, but apparently some compilers (e.g. MS Visual C 2017) complain about the parameter type mismatch. Let's squelch it by removing the "const" that is pointless in the definition of a small and trivial function like this, which would not help optimizing compilers nor reading humans that much. Noticed-by: Johannes Schindelin johannes.schindelin@gmx.de Helped-by: Jeff King peff@peff.net Signed-off-by: Junio C Hamano gitster@pobox.com by gitster
🛠️ test-lib: try harder to ensure a working jgit The JGIT prereq uses
type jgit
to determine whether jgit is present. While this is usually sufficient, it won't help if the jgit found is badly broken. This wastes time running tests which fail due to no fault of our own. Usejgit --version
instead, to guard against cases where jgit is present on the system, but will fail to run, e.g. because of some JRE issue, or missing Java dependencies. Checking that it gets far enough to process the '--version' argument isn't perfect, but seems to be good enough in practice. It's also consistent with how we detect some other dependencies, see e.g. the CURL and UNZIP prerequisites. Signed-off-by: Todd Zullinger tmz@pobox.com Signed-off-by: Junio C Hamano gitster@pobox.com by tmzullinger🛠️ get_oid: handle NULL repo->index When get_oid() and its helpers see an index name like ":.gitmodules", they try to load the index on demand, like: if (repo->index->cache) repo_read_index(repo); However, that misses the case when "repo->index" itself is NULL; we'll segfault in the conditional. This never happens with the_repository; there we always point its index field to &the_index. But a submodule repository may have a NULL index field until somebody calls repo_read_index(). This bug is triggered by t7411, but it was hard to notice because it's in an expect_failure block. That test was added by 2b1257e463 (t/helper: add test-submodule-nested-repo-config, 2018-10-25). Back then we had no easy way to access the .gitmodules blob of a submodule repo, so we expected (and got) an error message to that effect. Later, d9b8b8f896 (submodule-config.c: use repo_get_oid for reading .gitmodules, 2019-04-16) started looking in the correct repo, which is when we started triggering the segfault. With this fix, the test starts passing (once we clean it up as its comment instructs). Note that as far as I know, this bug could not be triggered outside of the test suite. It requires resolving an index name in a submodule, and all of the code paths (aside from test-tool) which do that either load the index themselves, or always pass the_repository. Ultimately it comes from 3a7a698e93 (sha1-name.c: remove implicit dependency on the_index, 2019-01-12), which replaced a check of "the_index.cache" with "repo->index->cache". So even if there is another way to trigger it, it wouldn't affect any versions before then. Signed-off-by: Jeff King peff@peff.net Signed-off-by: Junio C Hamano gitster@pobox.com by peff
🛠️ http-push: prevent format overflow warning with gcc >= 9 In function 'finish_request', inlined from 'process_response' at http-push.c:248:2: http-push.c:587:4: warning: '%s' directive argument is null [-Wformat-overflow=] 587 | fprintf(stderr, "Unable to get pack file %s\n%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 588 | request->url, curl_errorstr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ request->url is needed for the error message if there was a failure during fetch but was being cleared unnecessarily earlier. note that the leak is prevented by calling release_request unconditionally at the end. Signed-off-by: Carlo Marcelo Arenas Belón carenas@gmail.com Suggested-by: Eric Sunshine sunshine@sunshineco.com Signed-off-by: Junio C Hamano gitster@pobox.com by carenas
🛠️ stash: document stash.useBuiltin The stash.useBuiltin variable introduced in 90a462725e ("stash: optionally use the scripted version again", 2019-02-25) was turned on by default, but had no documentation. Let's document it so that users who run into any stability issues with the C rewrite know there's an escape hatch, and spell out that the user should please report the bug when they have to turn off the built-in stash. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho
🛠️ sha1dc: update from upstream Update sha1dc from the latest version by the upstream maintainer[1]. See 07a20f569b ("Makefile: fix unaligned loads in sha1dc with UBSan", 2019-03-12) for the last update. This fixes an issue where HP-UX IA64 was wrongly detected as a Little-endian instead of a Big-endian system, see [2] and [3]. 1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/855827c583bc30645ba427885caa40c5b81764d2 2. https://public-inbox.org/git/603989bd-f86d-c61d-c6f5-fb6748a65ba9@siemens.com/ 3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/50 Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by avar
🛠️ parse-options: adjust
parse_opt_unknown_cb()
s declared return type In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27), the signature of the low-level parse-opt callback function was changed to return anenum
. And while the implementations were changed, one declaration was left unchanged, still claiming to returnint
. This can potentially lead to problems, as compilers are free to choose any integral type for anenum
as long as it can represent all declared values. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho🛠️ Git 2.22-rc0 Signed-off-by: Junio C Hamano gitster@pobox.com by gitster
🛠️ Merge branch 'jh/trace2' A few embarrassing bugfixes. * jh/trace2: trace2: fix up a missing "leave" entry point trace2: fix incorrect function pointer check by gitster
🛠️ Merge branch 'cc/access-on-aix-workaround' Workaround for standard-compliant but less-than-useful behaviour of access(2) for the root user. * cc/access-on-aix-workaround: git-compat-util: work around for access(X_OK) under root by gitster
🛠️ Merge branch 'pw/clean-sequencer-state-upon-final-commit' "git chery-pick" (and "revert" that shares the same runtime engine) that deals with multiple commits got confused when the final step gets stopped with a conflict and the user concluded the sequence with "git commit". Attempt to fix it by cleaning up the state files used by these commands in such a situation. * pw/clean-sequencer-state-upon-final-commit: fix cherry-pick/revert status after commit commit/reset: try to clean up sequencer state by gitster
🛠️ Merge branch 'pw/rebase-i-internal' The internal implementation of "git rebase -i" has been updated to avoid forking a separate "rebase--interactive" process. * pw/rebase-i-internal: rebase -i: run without forking rebase--interactive rebase: use a common action enum rebase -i: use struct rebase_options in do_interactive_rebase() rebase -i: use struct rebase_options to parse args rebase -i: use struct object_id for squash_onto rebase -i: use struct commit when parsing options rebase -i: remove duplication rebase -i: combine rebase--interactive.c with rebase.c rebase: use OPT_RERERE_AUTOUPDATE() rebase: rename write_basic_state() rebase: don't translate trace strings sequencer: always discard index after checkout by gitster
🛠️ Merge branch 'jk/perf-aggregate-wo-libjson' The script to aggregate perf result unconditionally depended on libjson-perl even though it did not have to, which has been corrected. * jk/perf-aggregate-wo-libjson: t/perf: depend on perl JSON only when using --codespeed by gitster
🛠️ Merge branch 'dl/rev-tilde-doc-clarify' Docfix. * dl/rev-tilde-doc-clarify: revisions.txt: remove ambibuity between : and : revisions.txt: mention ~ form revisions.txt: mark optional rev arguments with [] revisions.txt: change "rev" to "" by gitster
🛠️ Merge branch 'jc/make-dedup-ls-files-output' A "ls-files" that emulates "find" to enumerate files in the working tree resulted in duplicated Makefile rules that caused the build to issue an unnecessary warning during a trial build after merge conflicts are resolved in working tree *.h files but before the resolved results are added to the index. This has been corrected. * jc/make-dedup-ls-files-output: Makefile: dedup list of files obtained from ls-files by gitster
🛠️ Merge branch 'jk/ls-files-doc-markup-fix' Docfix. * jk/ls-files-doc-markup-fix: doc/ls-files: put nested list for "-t" option into block by gitster
🛠️ Merge branch 'jk/p5302-avoid-collision-check-cost' Fix index-pack perf test so that the repeated invocations always run in an empty repository, which emulates the initial clone situation better. * jk/p5302-avoid-collision-check-cost: p5302: create the repo in each index-pack test by gitster
🛠️ Merge branch 'dl/no-extern-in-func-decl' Mechanically and systematically drop "extern" from function declarlation. * dl/no-extern-in-func-decl: *.[ch]: manually align parameter lists *.[ch]: remove extern from function declarations using sed *.[ch]: remove extern from function declarations using spatch by gitster
🛠️ Merge branch 'ew/repack-with-bitmaps-by-default' The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos by gitster
🛠️ Merge branch 'js/partial-clone-connectivity-check' During an initial "git clone --depth=..." partial clone, it is pointless to spend cycles for a large portion of the connectivity check that enumerates and skips promisor objects (which by definition is all objects fetched from the other side). This has been optimized out. * js/partial-clone-connectivity-check: t/perf: add perf script for partial clones clone: do faster object check for partial clones by gitster
🛠️ Merge branch 'jh/trace2-sid-fix' Polishing of the new trace2 facility continues. The system-level configuration can specify site-wide trace2 settings, which can be overridden with per-user configuration and environment variables. * jh/trace2-sid-fix: trace2: fixup access problem on /etc/gitconfig in read_very_early_config trace2: update docs to describe system/global config settings trace2: make SIDs more unique trace2: clarify UTC datetime formatting trace2: report peak memory usage of the process trace2: use system/global config for default trace2 settings config: add read_very_early_config() trace2: find exec-dir before trace2 initialization trace2: add absolute elapsed time to start event trace2: refactor setting process starting time config: initialize opts structure in repo_read_config() by gitster
🛠️ difftool: fallback on merge.guitool In git-difftool.txt, it says 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. However, when
diff.guitool
is missing, it doesn't fallback to anything. Make git-difftool fallback tomerge.guitool
whendiff.guitool
is missing. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L🛠️ difftool: make --gui, --tool and --extcmd mutually exclusive In git-difftool, these options specify which tool to ultimately run. As a result, they are logically conflicting. Explicitly disallow these options from being used together. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L
🛠️ mergetool: fallback to tool when guitool unavailable In git-difftool, if the tool is called with --gui but
diff.guitool
is not set, it falls back todiff.tool
. Make git-mergetool also fallback frommerge.guitool
tomerge.tool
if the former is undefined. If git-difftool, when called with--gui
, were to useget_configured_mergetool
in a future patch, it would also get the fallback behavior in the following precedence: 1. diff.guitool 2. merge.guitool 3. diff.tool 4. merge.tool The behavior for when difftool or mergetool are called without--gui
should be identical with or without this patch. Note that the search loop could be written as sections="merge" keys="tool" if diff_mode then sections="diff $sections" fi if gui_mode then keys="guitool $keys" fi merge_tool=$( IFS=' ' for key in $keys do for section in $sections do selected=$(git config $section.$key) if test -n "$selected" then echo "$selected" return fi done done) which would make adding a mode in the future much easier. However, adding a new mode will likely never happen as it is highly discouraged so, as a result, it is written in its current form so that it is more readable for future readers. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L🛠️ mergetool--lib: create gui_mode function Before, in
get_configured_merge_tool
, we would test the value of the first argument directly, which corresponded to whether we were using guitool. However, since$GIT_MERGETOOL_GUI
is available as an environment variable, create thegui_mode
function which increases the clarify of functions which use it. While we're at it, add a space before()
in function definitions to fix the style. Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L🛠️ mergetool: use get_merge_tool function In git-mergetool, the logic for getting which merge tool to use is duplicated in git-mergetool--lib, except for the fact that it needs to know whether the tool was guessed or not. Rewrite
get_merge_tool
to return whether or not the tool was guessed through the return code and make git-mergetool call this function instead of duplicating the logic. Note that 1 was chosen to be the return code of when a tool is guessed because it seems like a slightly more abnormal condition than getting a tool that's explicitly specified but this is completely arbitrary. Also, let$GIT_MERGETOOL_GUI
be set to determine whether or not the guitool will be selected. This change is not completely backwards compatible as there may be external users of git-mergetool--lib. However, only one user, git-diffall[1], was found from searching GitHub and Google, and this tool is superseded bygit difftool --dir-diff
anyway. It seems very unlikely that there exists an external caller that would take into account the return code ofget_merge_tool
as it would always return 0 before this change so this change probably does not affect any external users. [1]: https://github.com/thenigan/git-diffall Signed-off-by: Denton Liu liu.denton@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com by Denton-L🛠️ trace2: add variable description to git.txt Documentation/technical/api-trace2.txt contains the full details of the trace2 API and the GIT_TR2* environment variables. However, most environment variables are included in Documentation/git.txt, including the GIT_TRACE* variables. Add a brief description of the GIT_TR2* variables with links to the full technical details. The biggest difference from the original variables is that we can specify a Unix Domain Socket. Mention this difference, but leave the details to the technical documents. Reported-by: Szeder Gábor szeder.dev@gmail.com Signed-off-by: Derrick Stolee dstolee@microsoft.com Signed-off-by: Junio C Hamano gitster@pobox.com by derrickstolee
🛠️ status: fix display of rebase -ir's
label
command The argument of alabel
command does not want to be turned into an abbreviated SHA-1. Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by dscho🛠️ trace2: fix up a missing "leave" entry point Fix a trivial bug that's been here since the shared/do_write_index tracing was added in 42fee7a388 ("trace2:data: add trace2 instrumentation to index read/write", 2019-02-22). We should have enter/leave points, not two enter/enter points. This resulted in an "enter" event without a corresponding "leave" event. Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Acked-by: Derrick Stolee dstolee@microsoft.com Signed-off-by: Junio C Hamano gitster@pobox.com by avar
🛠️ check-non-portable-shell: support Perl versions older than 5.10 For thoroughness when checking for one-shot environment variable assignments at shell function call sites, check-non-portable-shell stitches together incomplete lines (those ending with backslash). This allows it to correctly flag such undesirable usage even when the variable assignment and function call are split across lines, for example: FOO=bar \ func where 'func' is a shell function. The stitching is accomplished like this: while (<>) { chomp; # stitch together incomplete lines (those ending with "") while (s/\$//) { $_ .= readline; chomp; } # detect unportable/undesirable shell constructs ... } Although this implementation is well supported in reasonably modern Perl versions (5.10 and later), it fails with older versions (such as Perl 5.8 shipped with ancient Mac OS 10.5). In particular, in older Perl versions, 'readline' is not connected to the file handle associated with the "magic" while (<>) {...} construct, so 'readline' throws a "readline() on unopened filehandle" error. Work around this problem by dropping readline() and instead incorporating the stitching of incomplete lines directly into the existing while (<>) {...} loop. Helped-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Signed-off-by: Eric Sunshine sunshine@sunshineco.com Signed-off-by: Junio C Hamano gitster@pobox.com by sunshineco
🛠️ mingw: enable DEP and ASLR Enable DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) support. This applies to both 32bit and 64bit builds and makes it substantially harder to exploit security holes in Git by offering a much more unpredictable attack surface. ASLR interferes with GDB's ability to set breakpoints. A similar issue holds true when compiling with -O2 (in which case single-stepping is messed up because GDB cannot map the code back to the original source code properly). Therefore we simply enable ASLR only when an optimization flag is present in the CFLAGS, using it as an indicator that the developer does not want to debug in GDB anyway. Signed-off-by: İsmail Dönmez ismail@i10z.com Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by ismail
🛠️ mingw: do not let ld strip relocations This is the first step for enabling ASLR (Address Space Layout Randomization) support. We want to enable ASLR for better protection against exploiting security holes in Git: it makes it harder to attack software by making code addresses unpredictable. The problem fixed by this commit is that
ld.exe
seems to be stripping relocations which in turn will break ASLR support. We just make sure it's not stripping the main executable entry. Signed-off-by: İsmail Dönmez ismail@i10z.com Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de Signed-off-by: Junio C Hamano gitster@pobox.com by ismailCONTRIBUTORS
Last week there were 10 contributors.
👤 gitster
👤 tmzullinger
👤 peff
👤 carenas
👤 dscho
👤 avar
👤 Denton-L
👤 derrickstolee
👤 sunshineco
👤 ismail
STARGAZERS
Last week there were no stargazers.
RELEASES
Last week there were no releases.
That's all for last week, please 👀 Watch and ⭐ Star the repository gitgitgadget/git to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
The text was updated successfully, but these errors were encountered: