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

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-11Merge pull request #1750 from mstrap/mainHEADmainPedro Rijo
Update SmartGit screenshots
2022-11-11Update SmartGit screenshotsMarc Strapetz
The previous screenshots show SmartGit version 3 (released on 2012-03-02) and do not represent SmartGit's current user interface anymore. The new screenshots have been updated for version 22.1 (released on 2022-11-11).
2022-10-27Merge pull request #1748 from git/silence-rubocop-contenttagJeff King
rubocop: turn off Rails/ContentTag
2022-10-27rubocop: turn off Rails/ContentTagJeff King
This cop suggests (and even autocorrects!) an instance of: tag("img", options) to change into: tag.img(options) But as discussed in https://github.com/git/git-scm.com/pull/1742, this actually breaks the call! I'm still puzzled about why this is. But I find that I don't care enough to investigate deeply, and it would be useful to have CI on "main" actually pass, so unrelated pull requests aren't confused into thinking they broke something. So let's just disable the cop for now.
2022-10-27Merge pull request #1747 from vdye/bugfix/scalar-docsJeff King
Fix building of Scalar docs & include a temporary workaround for overlapping names
2022-10-27lib/tasks/index.rake: skip building 'technical/scalar.txt'Victoria Dye
The documentation built from Git includes both 'Documentation/scalar.txt' and 'Documentation/technical/scalar.txt'. Because 'index_doc()' builds the documentation by basename, these two files conflict, ultimately resulting in only the latter being saved to the DB. Long-term, the cleanest permanent solution to this problem is to rename 'technical/scalar.txt' to something else in Git. In the meantime, to ensure that the (more important) command documentation is rendered at the git-scm.com/docs/scalar URL, skip the 'technical/scalar.txt' build entirely. This commit should be reverted when 'technical/scalar.txt' has been renamed in Git. Signed-off-by: Victoria Dye <vdye@github.com>
2022-10-27lib/tasks/index.rake: generate scalar documentationVictoria Dye
Add 'scalar' to the document-matching regexes in 'index_doc()' and 'index_l10n_doc' so that the 'scalar' command documentation is built and included on the site. Note that, because the Scalar technical design document has the same base name as the command doc (both 'scalar.txt'), only last one processed will be saved to the DB and rendered on the site. Since we want both documents available on the website, this should be fixed by renaming the technical document in Git. Temporarily, this will be handled on the site via a later commit. Signed-off-by: Victoria Dye <vdye@github.com>
2022-10-13Merge pull request #1742 from git/ttaylorr/fix-broken-imagesTaylor Blau
app/helpers/application_helper.rb: fix broken `#image_tag`
2022-10-13app/helpers/application_helper.rb: fix broken `#image_tag`Taylor Blau
We use the `#image_tag` helper to bypass the asset pipeline machinery in Rails's own `#image_tag`. But Rails no longer spells `tag.img(...)` as such, instead, it writes `tag("img", ...)`. Update our own helper to reflect the change upstream. Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-07Merge pull request #1740 from git/ttaylorr/multilevel-asciidoc-includesTaylor Blau
lib/tasks/index.rake: handle nested AsciiDoc includes
2022-10-07lib/tasks/index.rake: handle nested AsciiDoc includesTaylor Blau
When indexing contents in the Documentation tree, our Rakefile preprocesses each blob by resolving its includes before handing it off to AsciiDoc. This preprocessing is implemented by the `~expand_content` method, which performs a string substitution on the pattern /include::(\S+)\.txt\[\]/ , where the block given to `#gsub` yields the content of the file in the first match group. When the file isn't pre-generated, we ask for its content, recursively call `#expand_content`, and then return the result. This should handle nested includes, but doesn't. That's because when we make the recursive call to `#expand_content` we discard the result, instead returning `new_content` (which is the non-expanded version of the file we looked up in the first place). Resolve this by storing off the result of calling `#expand_content` before returning it. This broke in eb8f3ca4 (index: make return of new_content clear in expand_content(), 2022-10-05), the result of calling `#expand_content` used to be the terminal expression in that method (and thus returned to the caller). Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-05Merge pull request #1736 from git/update-ruby-3Jeff King
update to ruby 3.1.2
2022-10-05one more pass of rubocop --autocorrectJeff King
Looks like I managed to introduce 2 new problems in 2 commits.
2022-10-05run "bundle update rails"Jeff King
Looks like there are a bunch of old rails vulnerabilities. Nothing urgent, since we don't actually accept data from users. But since we're doing a bunch of updates anyway, let's bump rails, too.
2022-10-05Merge remote-tracking branch 'origin' into update-ruby-3Jeff King
This needed some light merge resolution, since the rubocop fixes touched some nearby lines. Viewing the diff with "-w" helps, since the rubocop changed reduced the indentation by one level.
2022-10-05Merge pull request #1737 from git/loosen-manpage-matchTaylor Blau
index_doc(): loosen match of "git-cmd(1)" on manpages
2022-10-05index_doc(): loosen match of "git-cmd(1)" on manpagesJeff King
In v2.38.0, we now have a manpage for scalar, which doesn't start with "git". As a result, our regex to find the section number fails, and the whole manpage is aborted. Let's loosen this regex to match any alphanumeric command name, plus dashes. That's enough for the current code base. It's conceivable we might introduce more characters, but you get a nice big exception if we do.
2022-10-05Gemfile: include net-smtp, etcJeff King
There is a weird interaction with Rails 6 and Ruby 3.1. I imagine what happened is that net-smtp, etc, are no longer in the default gem setup. Looks like Rails 7 has fixed this, but even the most recent version of Rails 6 has not. Details: https://stackoverflow.com/questions/70500220/rails-7-ruby-3-1-loaderror-cannot-load-such-file-net-smtp
2022-10-05rubocop: set Exclude keys to mergeJeff King
When we added an AllCops.Exclude key in c6736094 (rubocop: ignore db/migrate/, 2022-10-05), that meant we stopped respecting the built-in config. And that config contains vendor/**, among other things. This wasn't a problem for me locally, because my bundled gems are found elsewhere. But in our CI environment, they are in vendor/, which is what caused all of the problems with out-dated rubocop config in gems. Hopefully this fixes it.
2022-10-05rubocop: ignore Lint/EmptyBlock for test scriptsJeff King
We have fabricators and factories that are empty. I'm sure these could be rearranged, but I don't think it's worth spending time to figure out how they work (maybe somebody more familiar with them could do so easily).
2022-10-05index_doc(): check command-list.txt with string equalityJeff King
There's no need to use a regex; we'll always see the full string. This is more accurate, and appeases rubocop (which suggested .includes() for equivalent behavior, but it isn't aware of the possible simplification).
2022-10-05run rubocop --autocorrect-allJeff King
This picks up a few non-controversial bits, mostly Style/RedundantArgument (which I think are only marked as unsafe because we could have overridden methods like join/split, but that's not a problem in this case).
2022-10-05index_doc(): replace custom reject with grep_vJeff King
Suggested by rubocop, but this lets us avoid the double-block chaining, which lets us avoid the extra intermediate variable added by 360faca8 (index: break up huge cmd_list construction, 2022-10-05).
2022-10-05run rubocop --autocorrectJeff King
This picks up corrections from some new cops. Looking at the diff, they all seem pretty reasonable.
2022-10-05rubocop: enable new cops by defaultJeff King
This will stop rubocop from spamming the list of new ones. I do wonder if it will then start spamming us with new warnings. We'll see.
2022-10-05run rubocop --autocorrect --only Rails/ContentTagJeff King
This is new since upgrading rubocop-rails in the previous commit.
2022-10-05Gemfile.lock: upgrade rubocop-railsJeff King
This avoids an annoying warning when running rubocop: `RuboCop::Cop::EnforceSuperclass` is deprecated and will be removed in RuboCop 2.0. Please upgrade to RuboCop Rails 2.9 or newer to continue.
2022-10-05Gemfile.lock: update bundler versionJeff King
This avoids an annoying (but harmless) warning about DidYouMean::SPELL_CHECKERS on every run, after the upgrade to ruby 3.1.2.
2022-10-05Gemfile: add rubocop-discourseJeff King
Again, our CI seems to require it. I'm not clear on why. Guess and check for the win.
2022-10-05Gemfile: add rubocop-rspecJeff King
I had earlier tried to avoid this, but it looks like our CI environment insists on having it (perhaps because in the test environment, we load the rspec gem; I didn't investigate further).
2022-10-05download_service: avoid unsafe URL.open()Jeff King
Instead we can pass through URL.parse.open, which isn't susceptible to being fed "|echo oops, you were owned". In our case it's already OK; we are feeding only a URL defined earlier in the file. However, the files_from_sourceforge() method itself is unsafe, and a new caller could trigger a vulnerability. So let's fix it now, which also appeases rubocop.
2022-10-05index: break up huge cmd_list constructionJeff King
Rubocop complains about the chained blocks, which requires an extra variable. We can also break it up across multiple lines to make it a bit easier to read.
2022-10-05appease rubocop Lint/NestedMethodDefinitionJeff King
These methods don't need to be declared inside the other functions. As rubocop is warning us about, they end up as top-level functions anyway. We can't easily make them lambdas (which is what rubocop suggests) because they're recursive. But since they don't actually use any context from the surrounding function, we can just pull them out entirely. Note that we'll give the l10n one a more descriptive name, since it's now (and well, always was) globally available.
2022-10-05appease rubocop Style/TernaryParenthesesJeff King
Note that we keep the parentheses around the call though.
2022-10-05freeze string literals in rake tasksJeff King
These were marked as not-to-be-frozen in 1d55bdbb (Don't freeze rake tasks, 2018-11-20). But I don't see why, and now rubocop complains about it. They seem to work fine after this change.
2022-10-05index: make return of new_content clear in expand_content()Jeff King
The actual return of expand_content() is hidden behind a bunch of conditionals. Let's make it clear at the end that we are expanding new_content. Note that this is technically a little different, because one error code path would have returned the result of puts. But returning a nil new_content makes more sense.
2022-10-05drop useless assignments of return valuesJeff King
In a block expected to return "bar", we might say: foo = bar as the last line. But since nobody looks at "foo", this is pointless. Let's make clear that we don't care about the assignment here, but the return value.
2022-10-05use underscores for unused variablesJeff King
These are cases where we don't care about the assigned value itself, but leaving the name in place shows what value we're expecting to split or pop.
2022-10-05index: drop unused doc_limit from index_l10n_doc()Jeff King
This was copied from the regular index function, but the limit conditional is commented out. Since nobody seems to have complained, let's just drop the useless assignment and the commented-out code.
2022-10-05book2: drop unused "filename" assignment from genbook()Jeff King
This _could_ be useful, in that we're overriding the top-level filename whose contents we already grabbed. But nobody actually looks at it after we assign, so let's avoid the extra confusion (and rubocop warning).
2022-10-05book2: drop unused "ids" from genbook()Jeff King
This was copied over from the genbook2 task at some opint. And that task did use the ids field, but I don't think any of that matches the current procedure for importing the book. It all went away in a0a189b6 (book2.rake: drop "genbook2" task, 2018-09-20).
2022-10-05image_tag(): drop unused assignmentJeff King
This became unused in 3238f9db (stop using image_alt() function, 2020-12-11).
2022-10-05tests: mark unused assignments with underscoreJeff King
These are all test scripts that store the results of setup in variables. Even though they're not used, having them helps make clear what data the test has available to it, and follows existing patterns.
2022-10-05run rubocop --autocorrect-all --only Style/SafeNavigationJeff King
These were made possible by pulling the xlink assignments to their own line in the previous commit.
2022-10-05appease rubocop Lint/AssignmentInConditionJeff King
These cases were all fine. In a few I just added parentheses, but in general it makes things more readable to just split the assignment and conditional to two lines.
2022-10-05appease rubocop Naming/VariableNameJeff King
2022-10-05appease rubocop Naming/PredicateNameJeff King
2022-10-05appease rubocop Naming/AccessorMethodNameJeff King
2022-10-05site_controller: drop unused parameter from search_term()Jeff King
Noticed by rubocop Lint/UnusedMethodArgument (but I removed it entirely rather than marking it unused, as the autocorrect would).
2022-10-05Rakefile: drop shebangJeff King
It's not marked executable anyway, and most editors should realize what type of file it is from the filename. And it confuses rubocop (which complains that it has no executable bit).