Skip to content

feat(status): add --porcelain flag for machine-readable output#1403

Merged
genedna merged 3 commits into
gitmono-dev:mainfrom
vvishuluck:feat/add-porcelain-flag
Sep 3, 2025
Merged

feat(status): add --porcelain flag for machine-readable output#1403
genedna merged 3 commits into
gitmono-dev:mainfrom
vvishuluck:feat/add-porcelain-flag

Conversation

@vvishuluck

Copy link
Copy Markdown
Contributor

此 PR 完成了 r2cn 测试任务#1395,为 status 命令添加 --porcelain 参数,提供机器可读的输出格式。

Signed-off-by: vvishuluck <wh224224@outlook.com>
@vercel

vercel Bot commented Sep 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mega Ready Ready Preview Comment Sep 3, 2025 0:44am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a --porcelain flag to the status command for machine-readable output, implementing task #1395. The porcelain format provides a standardized, parseable output format similar to Git's status command.

  • Adds StatusArgs struct with porcelain flag to control output format
  • Implements output_porcelain function for machine-readable status output
  • Updates command integration to use the new argument structure

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
libra/src/command/status.rs Adds StatusArgs struct, porcelain output function, and refactors execute function to support both human and machine-readable formats
libra/src/cli.rs Updates CLI to accept StatusArgs instead of no arguments for status command
libra/src/command/switch.rs Updates status function calls to use new StatusArgs::default()
libra/tests/command/status_test.rs Adds comprehensive tests for porcelain output format and integration testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread libra/src/command/status.rs Outdated
Comment thread libra/tests/command/status_test.rs Outdated
Comment thread libra/tests/command/status_test.rs Outdated
Signed-off-by: vvishuluck <wh224224@outlook.com>
@genedna

genedna commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

Signed-off-by: vvishuluck <wh224224@outlook.com>
@genedna
genedna disabled auto-merge September 3, 2025 14:53
@genedna
genedna merged commit c1293c7 into gitmono-dev:main Sep 3, 2025
13 checks passed
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.

3 participants