Skip to content

Translate 08-customizing-git policy #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2015
Merged

Translate 08-customizing-git policy #141

merged 2 commits into from
Aug 14, 2015

Conversation

spacewander
Copy link
Contributor

No description provided.


(((policy example)))
In this section, you'll use what you've learned to establish a Git workflow that checks for a custom commit message format, and allows only certain users to modify certain subdirectories in a project.
You'll build client scripts that help the developer know if their push will be rejected and server scripts that actually enforce the policies.
在本节中,你将应用前面学到的知识建立这样一个 Git 工作流程:检查提交信息的格式,并且指定特定用户只能修改项目中特定的子目录。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows only certain users to modify 应该翻译成 指定只能由特定用户修改,而不是 指定特定用户只能修改

@spacewander
Copy link
Contributor Author

谢谢 @gisphm 的review
我有空的时候就尽快把修订后的版本提交上来

@spacewander
Copy link
Contributor Author

@gisphm
修订后的版本已提交,麻烦你再看一下吧

@networm
Copy link
Member

networm commented Jul 11, 2015

注意一个问题,提交的 Pull Request 右上角显示的增加删除行数应是一致的。
需要保证英文原文是几行,中文就是几行,不可以随意多行或少行,要保证英文一行中对应的中文翻译都在一行。

@spacewander
Copy link
Contributor Author

更新了下内容,现在中文翻译行数和英文原文行数一致了。

@networm networm mentioned this pull request Jul 29, 2015
95 tasks
@networm networm modified the milestone: v1.0.0 Jul 29, 2015
Your first challenge is to enforce that each commit message adheres to a particular format.
Just to have a target, assume that each message has to include a string that looks like ``ref: 1234'' because you want each commit to link to a work item in your ticketing system.
You must look at each commit being pushed up, see if that string is in the commit message, and, if the string is absent from any of the commits, exit non-zero so the push is rejected.
你的第一项任务是指定每一条提交信息都必须遵循某种特殊的格式。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

指定=》要求

@IceNature
Copy link
Contributor

@spacewander 已完成


You can get a list of the SHA-1 values of all the commits that are being pushed by taking the `$newrev` and `$oldrev` values and passing them to a Git plumbing command called `git rev-list`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我从上面一句句看到这里,我对译主的翻译都没有异议,翻的很棒。这里 “plumbing command” 中的plumbing是底层的意思吗?探讨一下!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

涨知识了!Plumbing管道的意思,其实也是底层 、基础的意思。ok,这个地方就过了!

You'll have the `update` hook look at those rules, see what files are being introduced for all the commits being pushed, and determine whether the user doing the push has access to update all those files.
假设你需要添加一个使用访问权限控制列表的机制,来指定哪些用户对项目的哪些部分有推送权限。
某些用户具有全部的访问权,其他人只对某些子目录或者特定的文件具有推送权限。
为了实现这一点,你要把相关的规则写入一个名为 `acl` 的文件里,并把它放到服务器上的 Git 裸仓库中,。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+为了实现这一点,你需要把相关的规则写入位于服务器 Git原始 仓库的acl文件中。这里我把你的两句话合并了,“放到....”直接省略了,个人认为简洁一些。

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+为了实现这一点,你要把相关的规则写入位于服务器 原始 Git仓库的acl文件中。

@0xinhua
Copy link

0xinhua commented Aug 13, 2015

@spacewander #141 我已经完成了审校,有大概13个异议。其实也不是异议,毕竟翻译没有对错,每个人有自己的想法和风格,可以一起探讨一下。我觉得整个章节读下来你译得非常到位,很棒,向你学习!

@0xinhua
Copy link

0xinhua commented Aug 13, 2015

@networm #141 我已经完成了审校。

@spacewander
Copy link
Contributor Author

@M1sery
已完成修改。

@0xinhua
Copy link

0xinhua commented Aug 14, 2015

@spacewander @networm OK我全看完了!没有其他问题就并到主干吧!

@networm networm merged commit 88d6013 into progit:master Aug 14, 2015
@networm
Copy link
Member

networm commented Aug 14, 2015

@spacewander @gisphm @IceNature @M1sery 已合并入主干。

@spacewander spacewander deleted the 08-policy branch August 14, 2015 07:37
OlingCat pushed a commit to OlingCat/progit2-zh that referenced this pull request Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants