summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-21t7900-maintenance: test for magic markersLibravatar Martin Ågren1-0/+9
When we insert our "BEGIN" and "END" markers into the cron table, it's so that a Git version from many years into the future would be able to identify this region in the cron table. Let's add a test to make sure that these markers don't ever change. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-21gc: fix handling of crontab magic markersLibravatar Martin Ågren2-4/+10
On `git maintenance start`, we add a few entries to the user's cron table. We wrap our entries using two magic markers, "# BEGIN GIT MAINTENANCE SCHEDULE" and "# END GIT MAINTENANCE SCHEDULE". At a later `git maintenance stop`, we will go through the table and remove these lines. Or rather, we will remove the "BEGIN" marker, the "END" marker and everything between them. Alas, we have a bug in how we detect the "END" marker: we don't. As we loop through all the lines of the crontab, if we are in the "old region", i.e., the region we're aiming to remove, we make an early `continue` and don't get as far as checking for the "END" marker. Thus, once we've seen our "BEGIN", we remove everything until the end of the file. Rewrite the logic for identifying these markers. There are four cases that are mutually exclusive: The current line starts a region or it ends it, or it's firmly within the region, or it's outside of it (and should be printed). Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-21git-maintenance.txt: add missing wordLibravatar Martin Ågren1-1/+1
Add a missing "a" before "bunch". Signed-off-by: Martin Ågren <martin.agren@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-18Git 2.30-rc1Libravatar Junio C Hamano2-1/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-18Merge branch 'jc/diff-I-status-fix'Libravatar Junio C Hamano2-1/+26
"git diff -I<pattern> -exit-code" should exit with 0 status when all the changes match the ignored pattern, but it didn't. * jc/diff-I-status-fix: diff: correct interaction between --exit-code and -I<pattern>
2020-12-18Merge branch 'es/perf-export-fix'Libravatar Junio C Hamano1-2/+7
Dev-support fix for BSD. * es/perf-export-fix: t/perf: fix test_export() failure with BSD `sed`
2020-12-18Merge branch 'rb/nonstop-config-mak-uname-update'Libravatar Junio C Hamano1-4/+0
Build update. * rb/nonstop-config-mak-uname-update: config.mak.uname: remove old NonStop compatibility settings
2020-12-18Merge branch 'ab/unreachable-break'Libravatar Junio C Hamano2-3/+0
Code clean-up. * ab/unreachable-break: style: do not "break" in switch() after "return"
2020-12-18Merge branch 'jc/strmap-remove-typefix'Libravatar Junio C Hamano1-2/+2
C-std compliance fix. * jc/strmap-remove-typefix: strmap: make callers of strmap_remove() to call it in void context
2020-12-18Merge branch 'jc/compat-util-setitimer-fix'Libravatar Junio C Hamano1-1/+1
Fix a recent bug in a rarely used replacement code. * jc/compat-util-setitimer-fix: compat-util: pretend that stub setitimer() always succeeds
2020-12-18Merge branch 'dd/doc-p4-requirements-update'Libravatar Junio C Hamano2-3/+2
Doc update. * dd/doc-p4-requirements-update: doc: mention Python 3.x supports
2020-12-18Merge branch 'js/init-defaultbranch-advice'Libravatar Junio C Hamano10-20/+61
Our users are going to be trained to prepare for future change of init.defaultBranch configuration variable. * js/init-defaultbranch-advice: init: provide useful advice about init.defaultBranch get_default_branch_name(): prepare for showing some advice branch -m: allow renaming a yet-unborn branch init: document `init.defaultBranch` better
2020-12-18Merge https://github.com/prati0100/git-guiLibravatar Junio C Hamano6-1397/+1711
* https://github.com/prati0100/git-gui: git-gui: use gray background for inactive text widgets git-gui: Fix selected text colors Makefile: conditionally include GIT-VERSION-FILE git-gui: fix colored label backgrounds when using themed widgets git-gui: ssh-askpass: add a checkbox to show the input text git-gui: update Russian translation git-gui: use commit message template git-gui: Only touch GITGUI_MSG when needed
2020-12-19Merge branch 'sh/inactive-background'Libravatar Pratyush Yadav2-16/+37
Set a different background color for selections in inactive widgets. This inactive color is calculated from the current theme colors to make sure it works for all themes. * sh/inactive-background: git-gui: use gray background for inactive text widgets
2020-12-19git-gui: use gray background for inactive text widgetsLibravatar Stefan Haller2-16/+37
This makes it easier to see at a glance which of the four main views has the keyboard focus. Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-12-17Another batch before 2.30-rc1Libravatar Junio C Hamano1-0/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-17Merge branch 'jh/index-v2-doc-on-fsmn'Libravatar Junio C Hamano1-2/+8
Doc update. * jh/index-v2-doc-on-fsmn: index-format.txt: document v2 format of file system monitor extension
2020-12-17Merge branch 'jb/midx-doc-update'Libravatar Junio C Hamano1-4/+0
Doc update. * jb/midx-doc-update: docs: multi-pack-index: remove note about future 'verify' work
2020-12-17Merge branch 'rj/make-clean'Libravatar Junio C Hamano3-8/+15
Build optimization. * rj/make-clean: Makefile: don't use a versioned temp distribution directory Makefile: don't try to clean old debian build product gitweb/Makefile: conditionally include ../GIT-VERSION-FILE Documentation/Makefile: conditionally include ../GIT-VERSION-FILE Documentation/Makefile: conditionally include doc.dep
2020-12-17Merge branch 'js/t7064-master-to-initial'Libravatar Junio C Hamano1-51/+52
Test update. * js/t7064-master-to-initial: t7064: avoid relying on a specific default branch name
2020-12-17Merge branch 'js/t6300-hardcode-main'Libravatar Junio C Hamano1-88/+90
Test update. * js/t6300-hardcode-main: t6300: avoid using the default name of the initial branch
2020-12-17Merge branch 'jk/oid-array-cleanup'Libravatar Junio C Hamano6-199/+157
Code clean-up. * jk/oid-array-cleanup: commit-graph: use size_t for array allocation and indexing commit-graph: replace packed_oid_list with oid_array commit-graph: drop count_distinct_commits() function oid-array: provide a for-loop iterator oid-array: make sort function public cache.h: move hash/oid functions to hash.h t0064: make duplicate tests more robust t0064: drop sha1 mention from filename oid-array.h: drop sha1 mention from header guard
2020-12-17Merge branch 'tb/partial-clone-filters-fix'Libravatar Junio C Hamano3-6/+21
Fix potential server side resource deallocation issues when responding to a partial clone request. * tb/partial-clone-filters-fix: upload-pack.c: don't free allowed_filters util pointers builtin/clone.c: don't ignore transport_fetch_refs() errors
2020-12-17Merge branch 'js/t7900-protect-pwd-in-config-get'Libravatar Junio C Hamano1-2/+2
Hotfix for test breakage. * js/t7900-protect-pwd-in-config-get: t7900: use --fixed-value in git-maintenance tests
2020-12-18Merge branch 'st/selected-text-colors'Libravatar Pratyush Yadav1-2/+4
Set colors for selected text properly. * st/selected-text-colors: git-gui: Fix selected text colors
2020-12-18git-gui: Fix selected text colorsLibravatar Serg Tereshchenko1-2/+4
Added selected state colors for text widget. Same colors for active and inactive selection, to match previous behaviour. Signed-off-by: Serg Tereshchenko <serg.partizan@gmail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-12-18Merge branch 'rj/clean-speedup'Libravatar Pratyush Yadav1-0/+2
Speed up 'make clean' on Cygwin. * rj/clean-speedup: Makefile: conditionally include GIT-VERSION-FILE
2020-12-18Makefile: conditionally include GIT-VERSION-FILELibravatar Ramsay Jones1-0/+2
The 'clean' target is noticeably slow on cygwin, even for a 'do-nothing' invocation of 'make clean'. For example, the second 'make clean' given below: $ make clean >/dev/null 2>&1 $ make clean GITGUI_VERSION = 0.21.0.85.g3e5c rm -rf git-gui lib/tclIndex po/*.msg rm -rf GIT-VERSION-FILE GIT-GUI-VARS $ has been timed at 1.934s on my laptop (an old core i5-4200M @ 2.50GHz, 8GB RAM, 1TB HDD). Notice that the Makefile, as part of processing the 'clean' target, is updating the 'GIT-VERSION-FILE' file. This is to ensure that the $(GITGUI_VERSION) make variable is set, once that file had been included. However, the 'clean' target does not use the $(GITGUI_VERSION) variable, so this is wasted effort. In order to eliminate such wasted effort, use the value of the internal $(MAKECMDGOALS) variable to only '-include GIT-VERSION-FILE' when the target is not 'clean'. (This drops the time down to 0.676s, on my laptop, giving an improvement of 65.05%). Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-12-18Merge branch 'sh/macos-labels'Libravatar Pratyush Yadav1-2/+2
Fix label background colors on MacOS when ttk is enabled. * sh/macos-labels: git-gui: fix colored label backgrounds when using themed widgets
2020-12-18git-gui: fix colored label backgrounds when using themed widgetsLibravatar Stefan Haller1-2/+2
The aqua theme on Mac doesn't support changing the background color for labels and frames [1]. Since the red, green, and yellow backgrounds of the labels for unstaged and staged files and the diff pane are so important design elements of git gui's main window, it's not acceptable for them to have grey backgrounds on Mac. To work around this, simply use non-themed widgets for all labels on Mac. This is not a big problem because labels don't look extremely different between the themed and non-themed versions. There are subtle differences, but they are not as bad as having the wrong background color. [1] https://stackoverflow.com/a/6723911 Signed-off-by: Stefan Haller <stefan@haller-berlin.de> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2020-12-16config.mak.uname: remove old NonStop compatibility settingsLibravatar Randall S. Becker1-4/+0
The MKDIR_WO_TRAILING_SLASH and NO_SETITIMER options are no longer needed on the NonStop platforms as both are now supported by the oldest supported operating system revision. Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-16diff: correct interaction between --exit-code and -I<pattern>Libravatar Junio C Hamano2-1/+26
Just like "git diff -w --exit-code" should exit with 0 when ignoring whitespace differences results in no changes shown, if ignoring certain changes with "git diff -I<pattern> --exit-code" result in an empty patch, we should exit with 0. The test suite did not cover the interaction between "--exit-code" and "-w"; add one while adding a new test for "--exit-code" + "-I". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-16t/perf: fix test_export() failure with BSD `sed`Libravatar Eric Sunshine1-2/+7
test_perf() runs each test in its own subshell which makes it difficult to persist variables between tests. test_export() addresses this shortcoming by grabbing the values of specified variables after a test runs but before the subshell exits, and writes those values to a file which is loaded into the environment of subsequent tests. To grab the values to be persisted, test_export() pipes the output of the shell's builtin `set` command through `sed` which plucks them out using a regular expression along the lines of `s/^(var1|var2)/.../p`. Unfortunately, though, this use of alternation is not portable. For instance, BSD-lineage `sed` (including macOS `sed`) does not support it in the default "basic regular expression" mode (BRE). It may be possible to enable "extended regular expression" mode (ERE) in some cases with `sed -E`, however, `-E` is neither portable nor part of POSIX. Fortunately, alternation is unnecessary in this case and can easily be avoided, so replace it with a series of simple expressions such as `s/^var1/.../p;s/^var2/.../p`. While at it, tighten the expressions so they match the variable names exactly rather than matching prefixes (i.e. use `s/^var1=/.../p`). If the requirements of test_export() become more complex in the future, then an alternative would be to replace `sed` with `perl` which supports alternation on all platforms, however, the simple elimination of alternation via multiple `sed` expressions suffices for the present. Reported-by: Sangeeta <sangunb09@gmail.com> Diagnosed-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-15style: do not "break" in switch() after "return"Libravatar Ævar Arnfjörð Bjarmason2-3/+0
Remove this unreachable code. It was found by SunCC, it's found by a non-fatal warning emitted by SunCC. It's one of the things it's more vehement about than GCC & Clang. It complains about a lot of other similarly unreachable code, e.g. a BUG(...) without a "return", and a "return 0" after a long if/else, both of whom have "return" statements. Those are also genuine redundancies to a compiler, but arguably make the code a bit easier to read & less fragile to maintain. These return/break cases are just unnecessary however, and as seen here the surrounding code just did a plain "return" without a "break" already. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-15compat-util: pretend that stub setitimer() always succeedsLibravatar Junio C Hamano1-1/+1
When 15b52a44 (compat-util: type-check parameters of no-op replacement functions, 2020-08-06) turned a handful of no-op C-preprocessor macros into static inline functions to give the callers a better type checking for their parameters, it forgot to return anything from the stubbed out setitimer() function, even though the function was defined to return an int just like the real thing. Since the original C-preprocessor macro implementation was to just turn the call to the function an empty statement, we know that the existing callers do not check the return value from it, and it does not matter what value we return. But it is safer to pretend that the call succeeded by returning 0 than making it fail by returning -1 and clobbering errno with some value. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-15strmap: make callers of strmap_remove() to call it in void contextLibravatar Junio C Hamano1-2/+2
Two "static inline" functions, both of which return void, call strmap_remove() and tries to return the value it returns as their return value, which is just bogus, as strmap_remove() returns void itself. Call it in the void context and fall-thru the control to the end instead. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-14doc: mention Python 3.x supportsLibravatar Đoàn Trần Công Danh2-3/+2
Commit 0b4396f068, (git-p4: make python2.7 the oldest supported version, 2019-12-13) pointed out that git-p4 uses Python 2.7-or-later features in the code. In addition, git-p4 gained enough support for Python 3 from 6cec21a82f, (git-p4: encode/decode communication with p4 for python3, 2019-12-13). Let's update our documentation to reflect that fact. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-14Git 2.30-rc0Libravatar Junio C Hamano2-1/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-14Merge branch 'js/t5526-with-no-particular-primary-branch-name'Libravatar Junio C Hamano1-40/+43
Test update. * js/t5526-with-no-particular-primary-branch-name: t5526: drop the prereq expecting the default branch name `main` t5526: avoid depending on a specific default branch name
2020-12-14Merge branch 'js/cmake-extra-built-ins-fix'Libravatar Junio C Hamano1-4/+11
VSbuild fix. * js/cmake-extra-built-ins-fix: cmake: determine list of extra built-ins dynamically
2020-12-14Merge branch 'da/vs-build-iconv-fix'Libravatar Junio C Hamano3-3/+2
Build update. * da/vs-build-iconv-fix: ci(vs-build): stop passing the iconv library location explicitly
2020-12-14Merge branch 'jk/multi-line-indent-style-fix'Libravatar Junio C Hamano2-2/+2
Style fix. * jk/multi-line-indent-style-fix: style: indent multiline "if" conditions to align
2020-12-14Merge branch 'jk/check-config-parsing-error-in-upload-pack'Libravatar Junio C Hamano2-1/+10
Tighten error checking in the codepath that responds to "git fetch". * jk/check-config-parsing-error-in-upload-pack: upload-pack: propagate return value from object filter config callback
2020-12-14Merge branch 'ae/doc-reproducible-html'Libravatar Junio C Hamano1-1/+4
Newer versions of xsltproc can assign IDs in HTML documents it generates in a consistent manner. Use the feature to help format HTML version of the user manual reproducibly. * ae/doc-reproducible-html: doc: make HTML manual reproducible
2020-12-14Merge branch 'so/glossary-branch-is-not-necessarily-active'Libravatar Junio C Hamano1-1/+1
The glossary described a branch as an "active" line of development, which is misleading---a stale and non-moving branch is still a branch. * so/glossary-branch-is-not-necessarily-active: glossary: improve "branch" definition
2020-12-14Merge branch 'fc/atmark-in-refspec'Libravatar Junio C Hamano3-51/+62
"@" sometimes worked (e.g. "git push origin @:there") as a part of a refspec element, but "git push origin @" did not work, which has been corrected. * fc/atmark-in-refspec: refspec: make @ a synonym of HEAD tests: push: trivial cleanup tests: push: improve cleanup of HEAD tests
2020-12-14Merge branch 'dd/help-autocorrect-never'Libravatar Junio C Hamano3-18/+52
"git $cmd $args", when $cmd is not a recognised subcommand, by default tries to see if $cmd is a typo of an existing subcommand and optionally executes the corrected command if there is only one possibility, depending on the setting of help.autocorrect; the users can now disable the whole thing, including the cycles spent to find a likely typo, by setting the configuration variable to 'never'. * dd/help-autocorrect-never: help.c: help.autocorrect=never means "do not compute suggestions"
2020-12-14index-format.txt: document v2 format of file system monitor extensionLibravatar Jeff Hostetler1-2/+8
Update the documentation of the file system monitor extension to describe version 2. The format was extended to support opaque tokens in: 56c6910028 fsmonitor: change last update timestamp on the index_state to opaque token Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-14docs: multi-pack-index: remove note about future 'verify' workLibravatar Johannes Berg1-4/+0
This was implemented in the 'git multi-pack-index' command and merged in 468b3221 (Merge branch 'ds/multi-pack-verify', 2018-10-10). And there's no 'git midx' command. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-13init: provide useful advice about init.defaultBranchLibravatar Johannes Schindelin4-4/+29
To give ample warning for users wishing to override Git's the fall-back for an unconfigured `init.defaultBranch` (in case we decide to change it in a future Git version), let's introduce some advice that is shown upon `git init` when that value is not set. Note: two test cases in Git's test suite want to verify that the `stderr` output of `git init` is empty. It is now necessary to suppress the advice, we now do that via the `init.defaultBranch` setting. While not strictly necessary, we also set this to `false` in `test_create_repo()`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>