展示HN:使用Git进行多次代码审查(git-cl)

1作者: bhfock6 个月前原帖
我在提交代码之前会进行多次审查。第一次审查的文件标记为“已审查”,经过彻底的第二次审查后,文件标记为“准备就绪”。<p><pre><code> git cl add reviewed utils.py parser.py # 第一次审查 git cl add ready tests.py # 双重检查 git cl status # 查看审查进度 git cl commit ready -m "添加功能" </code></pre> 之所以构建这个工具,是因为Git的暂存区是二进制的,而我的审查过程并不是。我需要跟踪哪些文件我审查过一次和两次。 这是一个单一的Python文件,它为Git添加了多个命名的暂存区。<p><a href="https://github.com/BHFock/git-cl" rel="nofollow">https://github.com/BHFock/git-cl</a>
查看原文
I review my code in multiple passes before committing. First pass goes to &quot;reviewed&quot;, thorough second pass moves files to &quot;ready&quot;.<p><pre><code> git cl add reviewed utils.py parser.py # First review git cl add ready tests.py # Double-checked git cl status # See review progress git cl commit ready -m &quot;Add feature&quot; </code></pre> Built this because Git&#x27;s staging area is binary but my review process isn&#x27;t. Need to track which files I&#x27;ve reviewed once vs twice. Single Python file that adds multiple named staging areas to Git.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;BHFock&#x2F;git-cl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BHFock&#x2F;git-cl</a>