Skip to content

Commit a9807a6

Browse files
authored
Merge branch 'progit:master' into chore/update-link-in-readme
2 parents 7211953 + 6f5dab8 commit a9807a6

File tree

18 files changed

+145
-132
lines changed

18 files changed

+145
-132
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: "bug"
6+
assignees: ""
87
---
98

109
<!-- Before filing a bug please check the following: -->

.github/ISSUE_TEMPLATE/config.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
blank_issues_enabled: false
12
contact_links:
23
- name: Translation bug
34
url: https://github.com/progit/progit2/blob/master/TRANSLATING.md
45
about: Refer to this table to find out where to report translation bugs.
56

67
- name: Report bugs for git-scm.com site
78
url: https://github.com/git/git-scm.com/issues/
8-
about: Please report problems with the git-scm.com site here.
9+
about: Please report problems with the git-scm.com site there.
910

1011
- name: Bug is about Git program itself
1112
url: https://git-scm.com/community
12-
about: Please report problems with the Git program here.
13+
about: Please report problems with the Git program there.
1314

1415
- name: Bug is about Git for Windows
1516
url: https://github.com/git-for-windows/git/issues
16-
about: Please report problems with Git for Windows here.
17+
about: Please report problems with Git for Windows there.
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Enhancement idea
3+
about: Suggest an idea for the ProGit2 book or repository
4+
title: ""
5+
labels: "enhancement"
6+
assignees: ""
7+
---
8+
9+
**Give a general overview of your idea.**
10+
11+
**Explain what problem you're trying to solve.**
12+
13+
**Have you thought about other solutions?**
14+
15+
**Do you want to help with this enhancement idea?**

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ updates:
66
schedule:
77
interval: "daily" # Checks on Monday trough Friday.
88

9+
# Maintain GitHub Action runners
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily" # Checks on Monday trough Friday.
14+
915
# Set default reviewer and labels
1016
reviewers:
1117
- "ben"

.github/workflows/pr-build.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Pull Request Build
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up Ruby
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 2.7
17+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18+
19+
- name: Build book
20+
run: bundle exec rake book:build
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release on push to master
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Compute tag name
16+
id: compute-tag
17+
run: |
18+
echo Computing next tag number
19+
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
20+
PATCH=$(($LASTPATCH+1))
21+
echo "::set-output name=tagname::2.1.${PATCH}"
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: 2.7
27+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
28+
29+
- name: Build release assets
30+
run: bundle exec rake book:build
31+
32+
- name: Create release
33+
uses: ncipollo/release-action@v1
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
tag: ${{ steps.compute-tag.outputs.tagname }}
37+
commit: master
38+
artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html'

.travis.yml

-34
This file was deleted.

Gemfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ gem 'asciidoctor', '2.0.15'
66
gem 'json', '2.5.1'
77
gem 'awesome_print', '1.9.2'
88

9-
gem 'asciidoctor-epub3', '1.5.0.alpha.19'
10-
gem 'asciidoctor-pdf', '1.5.4'
9+
gem 'asciidoctor-epub3', '1.5.1'
10+
gem 'asciidoctor-pdf', '1.6.0'
1111

1212
gem 'coderay', '1.1.3'
1313
gem 'pygments.rb', '2.2.0'
1414
gem 'thread_safe', '0.3.6'
1515
gem 'epubcheck-ruby', '4.2.5.0'
16-
gem 'html-proofer', '3.19.0'
16+
gem 'html-proofer', '3.19.2'

README.asc

+10-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ See link:TRANSLATING.md[the translating document] for more information.
1515
== How To Generate the Book
1616

1717
You can generate the e-book files manually with Asciidoctor.
18-
We used to be able to build .mobi files (Kindle), but cannot do so now, see #1496 for more information.
19-
If you run the following you _may_ actually get HTML, Epub and PDF output files:
18+
If you run the following you _may_ actually get HTML, Epub, Mobi and PDF output files:
2019

2120
----
2221
$ bundle install
@@ -25,11 +24,13 @@ Converting to HTML...
2524
-- HTML output at progit.html
2625
Converting to EPub...
2726
-- Epub output at progit.epub
27+
Converting to Mobi (kf8)...
28+
-- Mobi output at progit.mobi
2829
Converting to PDF...
2930
-- PDF output at progit.pdf
3031
----
3132

32-
You can generate just one of the supported formats (HTML, EPUB, or PDF).
33+
You can generate just one of the supported formats (HTML, EPUB, mobi, or PDF).
3334
Use one of the following commands:
3435

3536
To generate the HTML book:
@@ -44,6 +45,12 @@ To generate the EPUB book:
4445
$ bundle exec rake book:build_epub
4546
----
4647

48+
To generate the mobi book:
49+
50+
----
51+
$ bundle exec rake book:build_mobi
52+
----
53+
4754
To generate the PDF book:
4855

4956
----

Rakefile

+9-16
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace :book do
77
end
88

99
# Variables referenced for build
10-
version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp
10+
version_string = `git describe --tags`.chomp
1111
if version_string.empty?
1212
version_string = '0'
1313
end
@@ -37,7 +37,7 @@ namespace :book do
3737
end
3838

3939
desc 'build basic book formats'
40-
task :build => [:build_html, :build_epub, :build_pdf] do
40+
task :build => [:build_html, :build_epub, :build_mobi, :build_pdf] do
4141
begin
4242
# Run check
4343
Rake::Task['book:check'].invoke
@@ -50,7 +50,7 @@ namespace :book do
5050
end
5151

5252
desc 'build basic book formats (for ci)'
53-
task :ci => [:build_html, :build_epub, :build_pdf] do
53+
task :ci => [:build_html, :build_epub, :build_mobi, :build_pdf] do
5454
# Run check, but don't ignore any errors
5555
Rake::Task['book:check'].invoke
5656
end
@@ -84,18 +84,11 @@ namespace :book do
8484

8585
desc 'build Mobi format'
8686
task :build_mobi => 'book/contributors.txt' do
87-
# Commented out the .mobi file creation because the kindlegen dependency is not available.
88-
# For more information on this see: #1496.
89-
# This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
90-
91-
# puts "Converting to Mobi (kf8)..."
92-
# `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
93-
# puts " -- Mobi output at progit.mobi"
94-
95-
# FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below
96-
puts "Converting to Mobi isn't supported yet."
97-
puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496."
98-
exit(127)
87+
check_contrib()
88+
89+
puts "Converting to Mobi (kf8)..."
90+
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
91+
puts " -- Mobi output at progit.mobi"
9992
end
10093

10194
desc 'build PDF format'
@@ -120,7 +113,7 @@ namespace :book do
120113
begin
121114
puts 'Removing generated files'
122115

123-
FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.pdf'].each do |file|
116+
FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.mobi', 'progit.pdf'].each do |file|
124117
rm file
125118

126119
# Rescue if file not found

TRANSLATING.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,13 @@ On https://git-scm.com, the translations are divided into three categories. Once
7272
| Partial translations available in | up to chapter 6 has been translated. |
7373
| Full translation available in |the book is (almost) fully translated. |
7474

75-
## Continuous integration with Travis CI
75+
## Continuous integration with GitHub Actions
7676

77-
Travis CI is a [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) service that integrates with GitHub. Travis CI is used to ensure that a pull-request doesn't break the build or compilation. Travis CI can also provide compiled versions of the book.
77+
GitHub Actions is a [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) service that integrates with GitHub. GitHub Actions is used to ensure that a pull-request doesn't break the build or compilation. GitHub Actions can also provide compiled versions of the book.
7878

79-
Setting up Travis CI requires administrative control over the repository.
80-
81-
### Registering for Travis continuous integration
82-
83-
1. Register a Travis account [here](https://travis-ci.org/).
84-
1. Register your project in Travis.
85-
Please refer to the [Travis documentation](https://docs.travis-ci.com/) for more information.
86-
87-
### Setting up your repository for continuous integration
88-
89-
Travis CI works by scanning your project's root directory for a file named `.travis.yml` and following the 'recipe' that it contains. The good news is: there's already a working `.travis.yml` file in the Pro Git 2 source [here](https://raw.githubusercontent.com/progit/progit2-pub/master/travis.yml).
90-
Copy that file, and put it in your working directory. Commit the .yml file and push it to your translation repository; that should fire up a compilation and a check of the book's contents.
79+
The configuration for GitHub Actions is contained in the `.github/workflows` directory, and if you bring in the `master` branch of the root repository you'll get them for free.
80+
However, if you created your translation repo by _forking_ the root repo, there's an extra step you must complete (if you did not fork, you can skip this part).
81+
GitHub assumes that forks will be used to contribute to the repo from which they were forked, so you'll have to visit the "Actions" tab on your forked repo, and click the "I understand my workflows" button to allow the actions to run.
9182

9283
## Setting up a publication chain for e-books
9384

book/01-introduction/sections/help.asc

+18-16
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,23 @@ In addition, if you don't need the full-blown manpage help, but just need a quic
2828
$ git add -h
2929
usage: git add [<options>] [--] <pathspec>...
3030
31-
-n, --dry-run dry run
32-
-v, --verbose be verbose
33-
34-
-i, --interactive interactive picking
35-
-p, --patch select hunks interactively
36-
-e, --edit edit current diff and apply
37-
-f, --force allow adding otherwise ignored files
38-
-u, --update update tracked files
39-
--renormalize renormalize EOL of tracked files (implies -u)
40-
-N, --intent-to-add record only the fact that the path will be added later
41-
-A, --all add changes from all tracked and untracked files
42-
--ignore-removal ignore paths removed in the working tree (same as --no-all)
43-
--refresh don't add, only refresh the index
44-
--ignore-errors just skip files which cannot be added because of errors
45-
--ignore-missing check if - even missing - files are ignored in dry run
46-
--chmod (+|-)x override the executable bit of the listed files
31+
-n, --dry-run dry run
32+
-v, --verbose be verbose
33+
34+
-i, --interactive interactive picking
35+
-p, --patch select hunks interactively
36+
-e, --edit edit current diff and apply
37+
-f, --force allow adding otherwise ignored files
38+
-u, --update update tracked files
39+
--renormalize renormalize EOL of tracked files (implies -u)
40+
-N, --intent-to-add record only the fact that the path will be added later
41+
-A, --all add changes from all tracked and untracked files
42+
--ignore-removal ignore paths removed in the working tree (same as --no-all)
43+
--refresh don't add, only refresh the index
44+
--ignore-errors just skip files which cannot be added because of errors
45+
--ignore-missing check if - even missing - files are ignored in dry run
46+
--chmod (+|-)x override the executable bit of the listed files
47+
--pathspec-from-file <file> read pathspec from file
48+
--pathspec-file-nul with --pathspec-from-file, pathspec elements are separated with NUL character
4749
----
4850

book/07-git-tools/sections/signing.asc

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Now Git will use your key by default to sign tags and commits if you want.
3636

3737
==== Signing Tags
3838

39-
If you have a GPG private key setup, you can now use it to sign new tags.
39+
If you have a GPG private key set up, you can now use it to sign new tags.
4040
All you have to do is use `-s` instead of `-a`:
4141

4242
[source,console]

book/10-git-internals/sections/objects.asc

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The next type of Git object we'll examine is the _tree_, which solves the proble
126126
Git stores content in a manner similar to a UNIX filesystem, but a bit simplified.
127127
All the content is stored as tree and blob objects, with trees corresponding to UNIX directory entries and blobs corresponding more or less to inodes or file contents.
128128
A single tree object contains one or more entries, each of which is the SHA-1 hash of a blob or subtree with its associated mode, type, and filename.
129-
For example, the most recent tree in a project may look something like this:
129+
For example, let's say you have a project where the most-recent tree looks something like:
130130

131131
[source,console]
132132
----
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
=== Git in Visual Studio
22

33
(((Visual Studio)))
4-
Starting with Visual Studio 2013 Update 1, Visual Studio users have a Git client built directly into their IDE.
5-
Visual Studio has had source-control integration features for quite some time, but they were oriented towards centralized, file-locking systems, and Git was not a good match for this workflow.
6-
Visual Studio 2013's Git support has been separated from this older feature, and the result is a much better fit between Studio and Git.
4+
Visual Studio has Git tooling built directly into the IDE, starting with Visual Studio 2019 version 16.8.
75

8-
To locate the feature, open a project that's controlled by Git (or just `git init` an existing project), and select View > Team Explorer from the menu.
9-
You'll see the "Connect" view, which looks a bit like this:
6+
The tooling supports the following Git functionality:
107

11-
.Connecting to a Git repository from Team Explorer
12-
image::images/vs-1.png[Connecting to a Git repository from Team Explorer]
8+
* Create or clone a repository.
9+
* Open and browse history of a repository.
10+
* Create and checkout branches and tags.
11+
* Stash, stage, and commit changes.
12+
* Fetch, pull, push, or sync commits.
13+
* Merge and rebase branches.
14+
* Resolve merge conflicts.
15+
* View diffs.
16+
* ... and more!
1317
14-
Visual Studio remembers all of the projects you've opened that are Git-controlled, and they're available in the list at the bottom.
15-
If you don't see the one you want there, click the "Add" link and type in the path to the working directory.
16-
Double clicking on one of the local Git repositories leads you to the Home view, which looks like <<vs_home>>.
17-
This is a hub for performing Git actions; when you're _writing_ code, you'll probably spend most of your time in the "Changes" view, but when it comes time to pull down changes made by your teammates, you'll use the "Unsynced Commits" and "Branches" views.
18+
Read the https://docs.microsoft.com/visualstudio/version-control[official documentation^] to learn more.
1819

19-
[[vs_home]]
20-
.The "Home" view for a Git repository in Visual Studio
21-
image::images/vs-2.png[The “Home” view for a Git repository in Visual Studio]
22-
23-
Visual Studio now has a powerful task-focused UI for Git.
24-
It includes a linear history view, a diff viewer, remote commands, and many other capabilities.
25-
For more on using Git within Visual Studio go to: https://docs.microsoft.com/en-us/azure/devops/repos/git/command-prompt?view=azure-devops[].

images/vs-1.png

-8.53 KB
Binary file not shown.

images/vs-2.png

-3.95 KB
Binary file not shown.

0 commit comments

Comments
 (0)