Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-19fsmonitor/darwin: mark unused parameters in system callbackJeff King
We pass fsevent_callback() to the system FSEventStreamCreate() function as a callback. So we must match the expected function signature, even though we don't care about all of the parameters. Mark the unused ones to satisfy -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-19fsmonitor: mark unused parameters in stub functionsJeff King
The fsmonitor code has some platform-specific functions for which one or more platforms implement noop or stub functions. We can't get rid of these functions nor change their interface, since the point is to match their equivalents in other platforms. But let's annotate their parameters to quiet the compiler's -Wunused-parameter warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-19fsmonitor/win32: mark unused parameter in fsm_os__incompatible()Jeff King
We never look at the "ipc" argument we receive. It was added in 8f44976882 (fsmonitor: avoid socket location check if using hook, 2022-10-04) to support the darwin fsmonitor code. The win32 code has to match the same interface, but we should use an annotation to silence -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-19fsmonitor: mark some maybe-unused parametersJeff King
There's a bit of conditionally-compiled code in fsmonitor, so some function parameters may be unused depending on the build options: - in fsmonitor--daemon.c's try_to_run_foreground_daemon(), we take a detach_console argument, but it's only used on Windows. This seems intentional (and not mistakenly missing other platforms) based on the discussion in c284e27ba7 (fsmonitor--daemon: implement 'start' command, 2022-03-25), which introduced it. - in fsmonitor-setting.c's check_for_incompatible(), we pass the "ipc" flag down to the system-specific fsm_os__incompatible() helper. But we can only do so if our platform has such a helper. In both cases we can mark the argument as MAYBE_UNUSED. That annotates it enough to suppress the compiler's -Wunused-parameter warning, but without making it impossible to use the variable, as a regular UNUSED annotation would. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-19fsmonitor/win32: drop unused parametersJeff King
A few helper functions (centered around file-watch events) take extra fsmonitor state parameters that they don't use. These are static helpers local to the win32 implementation, and don't need to conform to any particular interface. We can just drop the extra parameters, which simplifies the code and silences -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-19fsmonitor: prefer repo_git_path() to git_pathdup()Jeff King
The fsmonitor_ipc__get_path() function ignores its repository argument. It should use it when constructing repo paths (though in practice, it is unlikely anything but the_repository is ever passed, so this is cleanup and future proofing, not a bug fix). Note that despite the lack of "dup" in the name, repo_git_path() behaves like git_pathdup() and returns an allocated string. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-21Git 2.42v2.42.0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-21Merge branch 'jk/function-pointer-mismatches-fix' (early part)Junio C Hamano
Fix a minor regression that some compiler might notice. * 'jk/function-pointer-mismatches-fix' (early part): fsck: use enum object_type for fsck_walk callback
2023-08-21Merge tag 'l10n-2.42.0-rnd2' of https://github.com/git-l10n/git-poJunio C Hamano
l10n-2.42.0-rnd2 * tag 'l10n-2.42.0-rnd2' of https://github.com/git-l10n/git-po: l10n: zh_TW.po: Git 2.42 l10n: zh_CN: 2.42.0 round 2 l10n: zh_CN: v2.42.0 round 1 l10n: Update German translation l10n: Update Catalan translation l10n: tr: git 2.42.0 l10n: fr v2.42.0 rnd 2 l10n: fr v2.42.0 rnd 1 l10n: sv.po: Update Swedish translation 5549t0f0u l10n: uk: update translation (2.42.0) l10n: po-id for 2.42 (round 1) l10n: ru.po: update Russian translation
2023-08-21Merge branch 'po-id' of github.com:bagasme/git-poJiang Xin
* 'po-id' of github.com:bagasme/git-po: l10n: po-id for 2.42 (round 1)
2023-08-20l10n: zh_TW.po: Git 2.42Yi-Jyun Pan
Co-authored-by: Lumynous <lumynou5.tw@gmail.com> Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2023-08-20fsck: use enum object_type for fsck_walk callbackJeff King
We switched the function interface for fsck callbacks in a1aad71601 (fsck.h: use "enum object_type" instead of "int", 2021-03-28). However, we accidentally flipped the type back to "int" as part of 0b4e9013f1 (fsck: mark unused parameters in various fsck callbacks, 2023-07-03). The mistake happened because that commit was written before a1aad71601 and rebased forward, and I screwed up while resolving the conflict. Curiously, the compiler does not warn about this mismatch, at least not when using gcc and clang on Linux (nor in any of our CI environments). Based on 28abf260a5 (builtin/fsck.c: don't conflate "int" and "enum" in callback, 2021-06-01), I'd guess that this would cause the AIX xlc compiler to complain. I noticed because clang-18's UBSan now identifies mis-matched function calls at runtime, and does complain of this case when running the test suite. I'm not entirely clear on whether this mismatch is a problem in practice. Compilers are certainly free to make enums smaller than "int" if they don't need the bits, but I suspect that they have to promote back to int for function calls (though I didn't dig in the standard, and I won't be surprised if I'm simply wrong and the real-world impact would depend on the ABI). Regardless, switching it back to enum is obviously the right thing to do here; the switch to "int" was simply a mistake. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-19Merge branch 'l10n-de-2.42' of github.com:ralfth/gitJiang Xin
* 'l10n-de-2.42' of github.com:ralfth/git: l10n: Update German translation
2023-08-19Merge branch 'catalan' of github.com:Softcatala/git-poJiang Xin
* 'catalan' of github.com:Softcatala/git-po: l10n: Update Catalan translation
2023-08-19Merge branch 'update-uk-l10n' of github.com:arkid15r/git-ukrainian-l10nJiang Xin
* 'update-uk-l10n' of github.com:arkid15r/git-ukrainian-l10n: l10n: uk: update translation (2.42.0)
2023-08-19Merge branch 'tl/zh_CN_2.42.0_rnd1' of github.com:dyrone/gitJiang Xin
* 'tl/zh_CN_2.42.0_rnd1' of github.com:dyrone/git: l10n: zh_CN: 2.42.0 round 2 l10n: zh_CN: v2.42.0 round 1
2023-08-19Merge branch 'master' of github.com:nafmo/git-l10n-svJiang Xin
* 'master' of github.com:nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation 5549t0f0u
2023-08-19Merge branch 'l10n-tr' of github.com:bitigchi/git-poJiang Xin
* 'l10n-tr' of github.com:bitigchi/git-po: l10n: tr: git 2.42.0
2023-08-18l10n: zh_CN: 2.42.0 round 2Teng Long
Signed-off-by: Teng Long <dyroneteng@gmail.com>
2023-08-18l10n: zh_CN: v2.42.0 round 1Teng Long
Signed-off-by: Teng Long <dyroneteng@gmail.com>
2023-08-18Merge branch 'ps/revision-stdin-with-options'Junio C Hamano
Typofix to documentation added during this cycle. * ps/revision-stdin-with-options: rev-list-options: fix typo in `--stdin` documentation
2023-08-18Merge branch 'sa/doc-ls-remote'Junio C Hamano
Mark-up fix to documentation added during this cycle. * sa/doc-ls-remote: show-ref doc: fix carets in monospace
2023-08-18Merge branch 'tl/notes-separator'Junio C Hamano
Typo/grammofix to documentation added during this cycle. * tl/notes-separator: notes doc: tidy up `--no-stripspace` paragraph notes doc: split up run-on sentences
2023-08-17l10n: Update German translationRalf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2023-08-16rev-list-options: fix typo in `--stdin` documentationMartin Ågren
With `--stdin`, we read *from* standard input, not *for*. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-16show-ref doc: fix carets in monospaceMartin Ågren
When commit 00bf685975 (show-ref doc: update for internal consistency, 2023-05-19) switched from double quotes to backticks around our {caret} macro, we started rendering "{caret}" literally. Fix this by replacing by a "^" character. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-16notes doc: tidy up `--no-stripspace` paragraphMartin Ågren
Where we document the `--no-stripspace` option, remove a superfluous "For" to fix the grammar. Mark option names and command names using `backticks` to set them in monospace. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-16notes doc: split up run-on sentencesMartin Ågren
When commit c4e2aa7d45 (notes.c: introduce "--[no-]stripspace" option, 2023-05-27) mentioned the new `--no-stripspace` in the documentation for `-m` and `-F`, it created run-on sentences. It also used slightly different language in the two sections for no apparent reason. Split the sentences in two to improve readability, and while touching the two sites, make them more similar. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-16l10n: Update Catalan translationJordi Mas
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2023-08-16l10n: tr: git 2.42.0Emir SARI
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2023-08-16l10n: fr v2.42.0 rnd 2Jean-Noël Avila
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2023-08-16l10n: fr v2.42.0 rnd 1Jean-Noël Avila
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2023-08-16l10n: sv.po: Update Swedish translation 5549t0f0uPeter Krefting
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2023-08-16l10n: uk: update translation (2.42.0)Arkadii Yakovets
Co-authored-by: Kate Golovanova <kate@kgthreads.com> Signed-off-by: Arkadii Yakovets <ark@cho.red> Signed-off-by: Kate Golovanova <kate@kgthreads.com>
2023-08-16Merge branch 'master' of github.com:git/gitJiang Xin
* 'master' of github.com:git/git: (34 commits) Git 2.42-rc2 t4053: avoid writing to unopened pipe t4053: avoid race when killing background processes Git 2.42-rc1 git maintenance: avoid console window in scheduled tasks on Windows win32: add a helper to run `git.exe` without a foreground window t9001: remove excessive GIT_SEND_EMAIL_NOTTY=1 mv: handle lstat() failure correctly parse-options: disallow negating OPTION_SET_INT 0 repack: free geometry struct send-email: avoid creating more than one Term::ReadLine object send-email: drop FakeTerm hack t0040: declare non-tab indentation to be okay in this script advice: handle "rebase" in error_resolve_conflict() A few more topics before -rc1 mailmap: change primary address for Glen Choo gitignore: ignore clangd .cache directory docs: update when `git bisect visualize` uses `gitk` compat/mingw: implement a native locate_in_PATH() run-command: conditionally define locate_in_PATH() ...
2023-08-15Git 2.42-rc2v2.42.0-rc2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-15Merge branch 'pw/diff-no-index-from-named-pipes'Junio C Hamano
Test updates. * pw/diff-no-index-from-named-pipes: t4053: avoid writing to unopened pipe t4053: avoid race when killing background processes
2023-08-15Merge branch 'st/mv-lstat-fix'Junio C Hamano
Correct use of lstat() that assumed a failing call would not clobber the statbuf. * st/mv-lstat-fix: mv: handle lstat() failure correctly
2023-08-15Merge branch 'jc/send-email-pre-process-fix'Junio C Hamano
Test fix. * jc/send-email-pre-process-fix: t9001: remove excessive GIT_SEND_EMAIL_NOTTY=1
2023-08-15Merge branch 'ds/maintenance-on-windows-fix'Junio C Hamano
Windows updates. * ds/maintenance-on-windows-fix: git maintenance: avoid console window in scheduled tasks on Windows win32: add a helper to run `git.exe` without a foreground window
2023-08-14Merge branch 'js/allow-t4000-to-be-indented-with-spaces'Junio C Hamano
File attribute update. * js/allow-t4000-to-be-indented-with-spaces: t0040: declare non-tab indentation to be okay in this script
2023-08-14Merge branch 'jk/send-email-with-new-readline'Junio C Hamano
Adjust to newer Term::ReadLine to prevent it from breaking the interactive prompt code in send-email. * jk/send-email-with-new-readline: send-email: avoid creating more than one Term::ReadLine object send-email: drop FakeTerm hack
2023-08-14Merge branch 'jk/repack-leakfix'Junio C Hamano
Leakfix. * jk/repack-leakfix: repack: free geometry struct
2023-08-14Merge branch 'rs/parse-opt-forbid-set-int-0-without-noneg'Junio C Hamano
Developer support to detect meaningless combination of options. * rs/parse-opt-forbid-set-int-0-without-noneg: parse-options: disallow negating OPTION_SET_INT 0
2023-08-14Merge branch 'ob/rebase-conflict-advice-i18n-fix'Junio C Hamano
i18n coverage improvement and avoidance of sentence lego. * ob/rebase-conflict-advice-i18n-fix: advice: handle "rebase" in error_resolve_conflict()
2023-08-14t4053: avoid writing to unopened pipeJeff King
This fixes an occasional hang I see when running t4053 with --verbose-log using dash. Commit 1e3f26542a (diff --no-index: support reading from named pipes, 2023-07-05) added a test that "diff --no-index" will complain when comparing a named pipe and a directory. The minimum we need to test this is to mkfifo the pipe, and then run "git diff --no-index pipe some_dir". But the test does one thing more: it spawns a background shell process that opens the pipe for writing, like this: { (>pipe) & } && This extra writer _could_ be useful if Git misbehaves and tries to open the pipe for reading. Without the writer, Git would block indefinitely and the test would never end. But since we do not have such a bug, Git does not open the pipe and it is the writing process which will block indefinitely, since there are no readers. The test addresses this by running "kill $!" in a test_when_finished block. Since the writer should be blocking forever, this kill command will reliably find it waiting. However, this seems to be somewhat racy, in that the writing process sometimes hangs around even after the "kill". In a normal run of the test script without options, this doesn't have any effect; the main test script completes anyway. But with --verbose-log, we spawn a "tee" process that reads the script output, and it won't end until all descriptors pointing to its input pipe are closed. And the background process that is hanging around still has its stderr, etc, pointed into that pipe. You can reproduce the situation like this: cd t ./t4053-diff-no-index.sh --verbose-log --stress Let that run for a few minutes, and then you'll find that some of the runs have hung. For example, at 11:53, I ran: $ ps xk start o pid,start,command | grep tee | head 713459 11:48:06 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-9.out 713527 11:48:06 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-15.out 719434 11:48:07 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-1.out 728117 11:48:08 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-5.out 738738 11:48:09 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-31.out 739457 11:48:09 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-27.out 744432 11:48:10 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-21.out 744471 11:48:10 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-29.out 761961 11:48:12 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-0.out 812299 11:48:19 tee -a /home/peff/compile/git/t/test-results/t4053-diff-no-index.stress-8.out All of these have been hung for several minutes. We can investigate one and see that it's waiting to get EOF on its input: $ strace -p 713459 strace: Process 713459 attached read(0, ^C Who else has that descriptor open? $ lsof -a -p 713459 -d 0 +E COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME tee 713459 peff 0r FIFO 0,13 0t0 3943636 pipe 719203,sh,5w 719203,sh,7w 719203,sh,12w 719203,sh,13w sh 719203 peff 5w FIFO 0,13 0t0 3943636 pipe 713459,tee,0r 719203,sh,7w 719203,sh,12w 719203,sh,13w sh 719203 peff 7w FIFO 0,13 0t0 3943636 pipe 713459,tee,0r 719203,sh,5w 719203,sh,12w 719203,sh,13w sh 719203 peff 12w FIFO 0,13 0t0 3943636 pipe 713459,tee,0r 719203,sh,5w 719203,sh,7w 719203,sh,13w sh 719203 peff 13w FIFO 0,13 0t0 3943636 pipe 713459,tee,0r 719203,sh,5w 719203,sh,7w 719203,sh,12w It's a shell, presumably a subshell spawned by the main script. Though it may seem odd, having the same descriptor open several times is not unreasonable (they're all basically the original stdout/stderr of the script that has been copied). And they should all close when the process exits. So what's it doing? Curiously, it will exit as soon as we strace it: $ strace -s 64 -p 719203 strace: Process 719203 attached openat(AT_FDCWD, "pipe", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ENOENT (No such file or directory) write(2, "./t4053-diff-no-index.sh: 7: eval: ", 35) = 35 write(2, "cannot create pipe: Directory nonexistent", 41) = 41 write(2, "\n", 1) = 1 exit_group(2) = ? +++ exited with 2 +++ I think what happens is this: - it is blocking in the openat() call for the pipe, as we expect (so this is definitely the backgrounded subshell mentioned above) - strace sends signals (probably STOP/CONT); those cause the kernel to stop blocking, but libc will restart the system call automatically - by this time, the "pipe" fifo is gone, so we'll actually try to create a regular file. But of course the surrounding directory is gone, too! So we get ENOENT, and then exit as normal. So the blocking is something we expect to happen. But what we didn't expect is for the process to still exist at all! It should have been killed earlier when the parent process called "kill", but it wasn't. And we can't catch the race at this point, because it happened much earlier. One can guess, though, that there is some race with the shell setting up the signal handling in the backgrounded subshell, and possibly blocking or ignoring signals at the time that the "kill" is received. Curiously, the race does not seem to happen if I use "bash" instead of "dash", so presumably bash's setup here is more atomic. One fix might be to try killing the subshell more aggressively, either using SIGKILL, or looping on kill/wait. But that seems complex and likely to introduce new problems/races. Instead, we can observe that the writer is not needed at all. Git will notice the pipe via stat() before it is ever opened. So we can simply drop the writer subshell entirely. If we ever changed Git to open the path and fstat() it, this would result in the test hanging. But we're not likely to do that. After all, we have to stat() paths to see if they are openable at all (e.g., it could be a directory), so this seems like a low risk. And anybody who does make such a change will immediately see the issue, as Git would hang consistently. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-10t4053: avoid race when killing background processesPhillip Wood
The test 'diff --no-index reads from pipes' starts a couple of background processes that write to the pipes that are passed to "diff --no-index". If the test passes then we expect these processes to exit as all their output will have been read. However if the test fails then we want to make sure they do not hang about on the users machine and the test remembers they should be killed by calling test_when_finished "! kill $!" after each background process is created. Unfortunately there is a race where test_when_finished may run before the background process exits even when all its output has been read resulting in the kill command succeeding which causes the test to fail. Fix this by ignoring the exit status of the kill command. If the diff is successful we could instead wait for the background process to exit and check their status but that feels like it is testing the platform's printf implementation rather than git's code. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-10Git 2.42-rc1v2.42.0-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-08-10Merge branch 'pw/rebase-skip-commit-message-fix'Junio C Hamano
"git rebase -i" with a series of squash/fixup, when one of the steps stopped in conflicts and ended up getting skipped, did not handle the accumulated commit log messages, which has been corrected. * pw/rebase-skip-commit-message-fix: rebase --skip: fix commit message clean up when skipping squash
2023-08-10Merge branch 'ma/locate-in-path-for-windows'Junio C Hamano
"git bisect visualize" stopped running "gitk" on Git for Windows when the command was reimplemented in C around Git 2.34 timeframe. This has been corrected. * ma/locate-in-path-for-windows: docs: update when `git bisect visualize` uses `gitk` compat/mingw: implement a native locate_in_PATH() run-command: conditionally define locate_in_PATH()