linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wu XiangCheng <bobwxc@email.cn>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Alex Shi <alexs@kernel.org>,
	linux-doc@vger.kernel.org, Yanteng Si <siyanteng@loongson.cn>,
	hjh <huangjianghui@uniontech.com>
Subject: [PATCH v2 2/6] docs/zh_CN: Add translation zh_CN/maintainer/configure-git.rst
Date: Sun, 25 Apr 2021 10:25:49 +0800	[thread overview]
Message-ID: <406cc9cfa48b399119b654e49b79cd4538f5f765.1619278582.git.bobwxc@email.cn> (raw)
In-Reply-To: <cover.1619278582.git.bobwxc@email.cn>

Add a new translation
  Documentation/translations/zh_CN/maintainer/configure-git.rst
and link it to zh_CN/maintainer/index.rst

Signed-off-by: Wu XiangCheng <bobwxc@email.cn>
Reviewed-by: Yanteng Si <siyanteng@loongson.cn>
---
 .../zh_CN/maintainer/configure-git.rst        | 62 +++++++++++++++++++
 .../translations/zh_CN/maintainer/index.rst   |  6 +-
 2 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/maintainer/configure-git.rst

diff --git a/Documentation/translations/zh_CN/maintainer/configure-git.rst b/Documentation/translations/zh_CN/maintainer/configure-git.rst
new file mode 100644
index 000000000000..a45ea736f73b
--- /dev/null
+++ b/Documentation/translations/zh_CN/maintainer/configure-git.rst
@@ -0,0 +1,62 @@
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: Documentation/maintainer/configure-git.rst
+
+:译者:
+
+ 吴想成 Wu XiangCheng <bobwxc@email.cn>
+
+.. _configuregit_zh:
+
+Git配置
+=======
+
+本章讲述了维护者级别的git配置。
+
+Documentation/maintainer/pull-requests.rst 中使用的标记分支应使用开发人员的
+GPG公钥进行签名。可以通过将 ``-u`` 标志传递给 ``git tag`` 来创建签名标记。
+但是,由于 *通常* 对同一项目使用同一个密钥,因此可以设置::
+
+	git config user.signingkey "keyname"
+
+或者手动编辑你的 ``.git/config`` 或 ``~/.gitconfig`` 文件::
+
+	[user]
+		name = Jane Developer
+		email = jd@domain.org
+		signingkey = jd@domain.org
+
+你可能需要告诉 ``git`` 去使用 ``gpg2``::
+
+	[gpg]
+		program = /path/to/gpg2
+
+你可能也需要告诉 ``gpg`` 去使用哪个 ``tty`` (添加到你的shell rc文件中)::
+
+	export GPG_TTY=$(tty)
+
+
+创建链接到lore.kernel.org的提交
+-------------------------------
+
+http://lore.kernel.org 网站是所有涉及或影响内核开发的邮件列表的总存档。在这里
+存储补丁存档是推荐的做法,当维护人员将补丁应用到子系统树时,最好提供一个指向
+lore存档链接的标签,以便浏览提交历史的人可以找到某个更改背后的相关讨论和基本
+原理。链接标签如下所示:
+
+	Link: https://lore.kernel.org/r/<message-id>
+
+通过在git中添加以下钩子,可以将此配置为在发布 ``git am`` 时自动执行:
+
+.. code-block:: none
+
+	$ git config am.messageid true
+	$ cat >.git/hooks/applypatch-msg <<'EOF'
+	#!/bin/sh
+	. git-sh-setup
+	perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
+	test -x "$GIT_DIR/hooks/commit-msg" &&
+		exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+	:
+	EOF
+	$ chmod a+x .git/hooks/applypatch-msg
diff --git a/Documentation/translations/zh_CN/maintainer/index.rst b/Documentation/translations/zh_CN/maintainer/index.rst
index 4ce27c12f370..e263315f5e7a 100644
--- a/Documentation/translations/zh_CN/maintainer/index.rst
+++ b/Documentation/translations/zh_CN/maintainer/index.rst
@@ -10,9 +10,13 @@
 本手册还需要大量完善!请自由提出(和编写)本手册的补充内容。
 *译注:指英文原版*
 
+.. toctree::
+   :maxdepth: 2
+
+   configure-git
+
 TODOList:
 
--   configure-git
 -   rebasing-and-merging
 -   pull-requests
 -   maintainer-entry-profile
-- 
2.20.1


  parent reply	other threads:[~2021-04-25  2:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  2:25 [PATCH v2 0/6] docs/zh_CN: Add translation zh_CN/maintainer Wu XiangCheng
2021-04-25  2:25 ` [PATCH v2 1/6] docs/zh_CN: Add translation zh_CN/maintainer/index.rst Wu XiangCheng
2021-04-25  2:25 ` Wu XiangCheng [this message]
2021-04-25  2:26 ` [PATCH v2 3/6] docs/zh_CN: Add translation zh_CN/maintainer/rebasing-and-merging.rst Wu XiangCheng
2021-04-25  2:26 ` [PATCH v2 4/6] docs/zh_CN: Add translation zh_CN/maintainer/pull-requests.rst Wu XiangCheng
2021-04-25  2:26 ` [PATCH v2 5/6] docs/zh_CN: Add translation zh_CN/maintainer/maintainer-entry-profile.rst Wu XiangCheng
2021-04-25  2:26 ` [PATCH v2 6/6] docs/zh_CN: Add translation zh_CN/maintainer/modifying-patches.rst Wu XiangCheng
2021-05-13 15:40 ` [PATCH v2 0/6] docs/zh_CN: Add translation zh_CN/maintainer Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=406cc9cfa48b399119b654e49b79cd4538f5f765.1619278582.git.bobwxc@email.cn \
    --to=bobwxc@email.cn \
    --cc=alexs@kernel.org \
    --cc=corbet@lwn.net \
    --cc=huangjianghui@uniontech.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=siyanteng@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).