Skip to content
代码片段 群组 项目
未验证 提交 4f5cc52d 编辑于 作者: Rémy Coutable's avatar Rémy Coutable 提交者: GitLab
浏览文件

Merge branch 'gitlab-housekeeper-color-diff' into 'master'

Force diff output to color gitlab-housekeeper preview

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141839



Merged-by: default avatarRémy Coutable <remy@rymai.me>
Approved-by: default avatarTiger Watson <twatson@gitlab.com>
Approved-by: default avatarRémy Coutable <remy@rymai.me>
Co-authored-by: default avatarDylan Griffith <dyl.griffith@gmail.com>
No related branches found
No related tags found
无相关合并请求
...@@ -77,7 +77,8 @@ def dry_run(change, branch_name) ...@@ -77,7 +77,8 @@ def dry_run(change, branch_name)
puts puts
puts '=> Diff:' puts '=> Diff:'
puts Shell.execute('git', '--no-pager', 'diff', 'master', branch_name, '--', *change.changed_files) puts Shell.execute('git', '--no-pager', 'diff', '--color=always', 'master', branch_name, '--',
*change.changed_files)
puts puts
end end
......
...@@ -83,13 +83,13 @@ ...@@ -83,13 +83,13 @@
# Branches get shown and pushed # Branches get shown and pushed
expect(::Gitlab::Housekeeper::Shell).to receive(:execute) expect(::Gitlab::Housekeeper::Shell).to receive(:execute)
.with('git', '--no-pager', 'diff', 'master', .with('git', '--no-pager', 'diff', '--color=always', 'master',
'the-identifier-for-the-first-change', '--', 'change1.txt', 'change2.txt') 'the-identifier-for-the-first-change', '--', 'change1.txt', 'change2.txt')
expect(::Gitlab::Housekeeper::Shell).to receive(:execute) expect(::Gitlab::Housekeeper::Shell).to receive(:execute)
.with('git', 'push', '-f', 'housekeeper', .with('git', 'push', '-f', 'housekeeper',
'the-identifier-for-the-first-change:the-identifier-for-the-first-change') 'the-identifier-for-the-first-change:the-identifier-for-the-first-change')
expect(::Gitlab::Housekeeper::Shell).to receive(:execute) expect(::Gitlab::Housekeeper::Shell).to receive(:execute)
.with('git', '--no-pager', 'diff', 'master', .with('git', '--no-pager', 'diff', '--color=always', 'master',
'the-identifier-for-the-second-change', '--', 'change1.txt', 'change2.txt') 'the-identifier-for-the-second-change', '--', 'change1.txt', 'change2.txt')
expect(::Gitlab::Housekeeper::Shell).to receive(:execute) expect(::Gitlab::Housekeeper::Shell).to receive(:execute)
.with('git', 'push', '-f', 'housekeeper', .with('git', 'push', '-f', 'housekeeper',
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册