Skip to content

Commit e71b228

Browse files
committed
initial commit for Document-ja and docs/docs-ja-5 folder.
1 parent 5d791fa commit e71b228

File tree

281 files changed

+407517
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+407517
-0
lines changed

Documentation-ja/cmd-list.sh

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
format_one () {
6+
document_dir="$1"
7+
command="$2"
8+
attributes="$3"
9+
10+
path="$document_dir/$command.adoc"
11+
if ! test -f "$path"
12+
then
13+
echo >&2 "No such file $path"
14+
exit 1
15+
fi
16+
17+
state=0
18+
while read line
19+
do
20+
case "$state" in
21+
0)
22+
case "$line" in
23+
git*\(*\)|scalar*\(*\))
24+
mansection="${line##*\(}"
25+
mansection="${mansection%\)}"
26+
;;
27+
NAME)
28+
state=1;;
29+
esac
30+
;;
31+
1)
32+
if test "$line" = "----"
33+
then
34+
state=2
35+
fi
36+
;;
37+
2)
38+
description="$line"
39+
break
40+
;;
41+
esac
42+
done <"$path"
43+
44+
if test -z "$mansection"
45+
then
46+
echo "No man section found in $path" >&2
47+
exit 1
48+
fi
49+
50+
if test -z "$description"
51+
then
52+
echo >&2 "No description found in $path"
53+
exit 1
54+
fi
55+
56+
case "$description" in
57+
"$command - "*)
58+
text="${description#$command - }"
59+
60+
printf "linkgit:%s[%s]::\n\t" "$command" "$mansection"
61+
case "$attributes" in
62+
*" deprecated "*)
63+
printf "(deprecated) "
64+
;;
65+
esac
66+
printf "$text.\n\n"
67+
;;
68+
*)
69+
echo >&2 "Description does not match $command: $description"
70+
exit 1
71+
;;
72+
esac
73+
}
74+
75+
source_dir="$1"
76+
build_dir="$2"
77+
document_dir="$3"
78+
shift 3
79+
80+
for out
81+
do
82+
category="${out#cmds-}"
83+
category="${category%.adoc}"
84+
path="$build_dir/$out"
85+
86+
while read command command_category attributes
87+
do
88+
case "$command" in
89+
"#"*)
90+
continue;;
91+
esac
92+
93+
case "$command_category" in
94+
"$category")
95+
format_one "$document_dir" "$command" " $attributes ";;
96+
esac
97+
done <"$source_dir/command-list.txt" >"$build_dir/$out+"
98+
99+
if cmp "$build_dir/$out+" "$build_dir/$out" >/dev/null 2>&1
100+
then
101+
rm "$build_dir/$out+"
102+
else
103+
mv "$build_dir/$out+" "$build_dir/$out"
104+
fi
105+
done

Documentation-ja/fix-texi.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
awk '
4+
/^@setfilename/{
5+
print "@setfilename git.info"
6+
next
7+
}
8+
/^@direntry/{
9+
direntry=1
10+
print "@dircategory Development"
11+
print "@direntry"
12+
print "* Git: (git). A fast distributed revision control system"
13+
print "@end direntry"
14+
next
15+
}
16+
/^@end direntry/{
17+
direntry=0
18+
next
19+
}
20+
!direntry
21+
'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
if test "$#" -ne 3
4+
then
5+
echo >&2 "USAGE: $0 <SOURCE_DIR> <MODE> <OUTPUT>"
6+
exit 1
7+
fi
8+
9+
SOURCE_DIR="$1"
10+
TOOL_MODE="$2"
11+
OUTPUT="$3"
12+
MERGE_TOOLS_DIR="$SOURCE_DIR/mergetools"
13+
14+
(
15+
. "$SOURCE_DIR"/git-mergetool--lib.sh &&
16+
show_tool_names can_$TOOL_MODE
17+
) | sed -e "s/\([a-z0-9]*\)/\`\1\`;;/" >"$OUTPUT"
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/sh
2+
3+
cat <<\EOF
4+
Git Howto Index
5+
===============
6+
7+
Here is a collection of mailing list postings made by various
8+
people describing how they use Git in their workflow.
9+
10+
EOF
11+
12+
for adoc
13+
do
14+
title=$(expr "$adoc" : '.*/\(.*\)\.adoc$')
15+
from=$(sed -ne '
16+
/^$/q
17+
/^From:[ ]/{
18+
s///
19+
s/^[ ]*//
20+
s/[ ]*$//
21+
s/^/by /
22+
p
23+
}
24+
' "$adoc")
25+
26+
abstract=$(sed -ne '
27+
/^Abstract:[ ]/{
28+
s/^[^ ]*//
29+
x
30+
s/.*//
31+
x
32+
: again
33+
/^[ ]/{
34+
s/^[ ]*//
35+
H
36+
n
37+
b again
38+
}
39+
x
40+
p
41+
q
42+
}' "$adoc")
43+
44+
if grep 'Content-type: text/asciidoc' >/dev/null $adoc
45+
then
46+
file=$(expr "$adoc" : '\(.*\)\.adoc$').html
47+
else
48+
file="$adoc"
49+
fi
50+
51+
echo "* link:howto/$(basename "$file")[$title] $from
52+
$abstract
53+
54+
"
55+
56+
done

Documentation-ja/howto/meson.build

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
howto_sources = [
2+
'coordinate-embargoed-releases.adoc',
3+
'keep-canonical-history-correct.adoc',
4+
'maintain-git.adoc',
5+
'new-command.adoc',
6+
'rebase-from-internal-branch.adoc',
7+
'rebuild-from-update-hook.adoc',
8+
'recover-corrupted-blob-object.adoc',
9+
'recover-corrupted-object-harder.adoc',
10+
'revert-a-faulty-merge.adoc',
11+
'revert-branch-rebase.adoc',
12+
'separating-topic-branches.adoc',
13+
'setup-git-server-over-http.adoc',
14+
'update-hook-example.adoc',
15+
'use-git-daemon.adoc',
16+
'using-merge-subtree.adoc',
17+
'using-signed-tag-in-pull-request.adoc',
18+
]
19+
20+
howto_index = custom_target(
21+
command: [
22+
shell,
23+
meson.current_source_dir() / 'howto-index.sh',
24+
'@INPUT@',
25+
],
26+
env: script_environment,
27+
capture: true,
28+
input: howto_sources,
29+
output: 'howto-index.adoc',
30+
)
31+
32+
doc_targets += custom_target(
33+
command: asciidoc_html_options,
34+
input: howto_index,
35+
output: 'howto-index.html',
36+
depends: documentation_deps,
37+
install: true,
38+
install_dir: get_option('datadir') / 'doc/git-doc',
39+
)
40+
41+
foreach howto : howto_sources
42+
howto_stripped = custom_target(
43+
command: [
44+
sed,
45+
'-e',
46+
'1,/^$/d',
47+
'@INPUT@',
48+
],
49+
input: howto,
50+
output: fs.stem(howto) + '.stripped',
51+
capture: true,
52+
)
53+
54+
doc_targets += custom_target(
55+
command: asciidoc_html_options,
56+
input: howto_stripped,
57+
output: fs.stem(howto_stripped.full_path()) + '.html',
58+
depends: documentation_deps,
59+
install: true,
60+
install_dir: get_option('datadir') / 'doc/git-doc/howto',
61+
)
62+
endforeach
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/perl
2+
3+
use strict;
4+
use warnings;
5+
6+
my $exit_code = 0;
7+
sub report {
8+
my ($msg) = @_;
9+
print STDERR "$ARGV:$.: $msg\n";
10+
$exit_code = 1;
11+
}
12+
13+
my $line_length = 0;
14+
my $in_section = 0;
15+
my $section_header = "";
16+
17+
18+
while (my $line = <>) {
19+
if (($line =~ /^\+?$/) ||
20+
($line =~ /^\[.*\]$/) ||
21+
($line =~ /^ifdef::/)) {
22+
$line_length = 0;
23+
} elsif ($line =~ /^[^-.]/) {
24+
$line_length = length($line);
25+
} elsif (($line =~ /^-{3,}$/) || ($line =~ /^\.{3,}$/)) {
26+
if ($in_section) {
27+
if ($line eq $section_header) {
28+
$in_section = 0;
29+
}
30+
next;
31+
}
32+
if ($line_length == 0) {
33+
$in_section = 1;
34+
$section_header = $line;
35+
next;
36+
}
37+
if (($line_length != 0) && (length($line) != $line_length)) {
38+
report("section delimiter not preceded by an empty line");
39+
}
40+
$line_length = 0;
41+
}
42+
}
43+
44+
if ($in_section) {
45+
report("section not finished");
46+
}
47+
48+
exit $exit_code;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/perl
2+
3+
use strict;
4+
use warnings;
5+
6+
my $exit_code = 0;
7+
sub report {
8+
my ($line, $msg) = @_;
9+
chomp $line;
10+
print STDERR "$ARGV:$.: '$line' $msg\n";
11+
$exit_code = 1;
12+
}
13+
14+
my $synopsis_style = 0;
15+
16+
while (my $line = <>) {
17+
if ($line =~ /^[ \t]*`?[-a-z0-9.]+`?(, `?[-a-z0-9.]+`?)+(::|;;)$/) {
18+
19+
report($line, "multiple parameters in a definition list item");
20+
}
21+
if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) {
22+
report($line, "definition list item with a `--[no-]` parameter");
23+
}
24+
if ($line =~ /^\[synopsis\]$/) {
25+
$synopsis_style = 1;
26+
}
27+
if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) {
28+
report($line, "synopsis style and definition list item not backquoted");
29+
}
30+
}
31+
32+
33+
exit $exit_code;

0 commit comments

Comments
 (0)