You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
14
14
-`make test` - Run unit and integration tests
15
15
-`cargo test` - Alternative test command
16
16
-`cargo test <test_name>` - Run specific test
17
+
-`make coverage` - Generate test coverage using tarpaulin
17
18
18
19
### Code Quality
19
20
-`make fmt` - Format code with rustfmt
@@ -41,11 +42,16 @@ Each Git workflow command is implemented as a separate module:
41
42
- Error handling uses `expect()` with descriptive messages
42
43
43
44
### Key Dependencies
44
-
-`clap` - Command-line parsing with derive macros
45
-
-`clap_complete` - Shell completion generation
46
-
-`console` - Terminal output formatting
45
+
-`clap` - Command-line parsing with derive macros and subcommands
46
+
-`console` - Terminal output formatting with colors and emojis
47
47
-`chrono` - Date/time handling for summary command
48
48
49
+
### Dev Dependencies
50
+
-`assert_cmd` - CLI testing framework for integration tests
51
+
-`tempfile` - Temporary Git repositories for testing
52
+
-`predicates` - Assertion helpers for test conditions
53
+
-`criterion` - Benchmarking framework
54
+
49
55
### Testing
50
56
- Integration tests in `tests/` directory
51
57
- Each command has corresponding `test_<command>.rs` file
@@ -54,5 +60,10 @@ Each Git workflow command is implemented as a separate module:
54
60
### Git Plugin Integration
55
61
The binary name `git-x` enables Git's plugin system - any executable named `git-<name>` can be invoked as `git <name>`. Commands like `git x info` work automatically once installed.
56
62
57
-
### Completion System
58
-
Shell completions are generated via `--generate-completions <shell>` flag using `clap_complete`. The README provides setup instructions for bash, zsh, fish, PowerShell, and Elvish.
63
+
### Error Handling and Types
64
+
- Common error type `GitXError` defined in `src/lib.rs` with variants for Git commands, IO, and parsing
65
+
- Most commands use `expect()` with descriptive messages for quick failure feedback
66
+
- Type alias `Result<T>` available for consistent error handling
67
+
68
+
### Shell Completion Generation
69
+
Shell completions can be generated via `--generate-completions <shell>` flag using `clap_complete`. The README provides setup instructions for bash, zsh, fish, PowerShell, and Elvish.
0 commit comments