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
-**Version Locking**: Pin dependencies to specific commits, branches, or tags
19
19
-**Clean Git History**: Changes to vendored content appear as normal changes in your repository
20
20
-**Multiple Protocol Support**: Clone via SSH and HTTPS with appropriate authentication
21
-
-**Atomic Operations**: All content updates happen in a single atomic commit
21
+
-**Git-Aware Operations**: Operates only within clean Git repositories
22
22
-**Domain-Driven Design**: Clean architecture with proper separation of concerns for extensibility
23
23
24
24
## Core Concepts
@@ -67,9 +67,9 @@ Unlike Git submodules or tools that establish ongoing connections to external re
67
67
2. Extract only the specified content based on sparse paths
68
68
3. Clean the target mount point by removing all existing content (not using Git but native filesystem operations)
69
69
4. Copy new content to the clean target location in your project
70
-
5.Stage all changes (additions and removals) for Git
71
-
6. Commit all changes in a single atomic transaction
72
-
7. Clean up temporary data
70
+
5.Clean up temporary data
71
+
72
+
After these operations, the user needs to manually stage and commit the changes if they wish to persist them.
73
73
74
74
This approach ensures your repository maintains a clean history without extra metadata or hidden connections to external repositories. The complete cleaning of the mount point (step 3) is crucial for maintaining the integrity of the dependency directory, ensuring a clean slate for each update without relying on git-specific commands.
75
75
@@ -90,7 +90,7 @@ While [Gitman](../git/gitman.md) offers similar functionality for selective dire
90
90
- Truly zero submodule footprint, with content appearing as normal files
91
91
- More focused feature set without symlinks or post-checkout scripts
92
92
- Clean architecture design for extensibility
93
-
-Atomic operations for content updates
93
+
-Git-aware operations that respect repository state
94
94
95
95
## Development Rationale
96
96
@@ -140,8 +140,8 @@ A key aspect of the implementation is how content changes are handled:
140
140
1.**Complete Mount Point Cleaning**: For each update, the entire target directory is completely cleared using OS-native operations
141
141
2.**Filesystem Abstraction**: Directory removal operations are dependency-inverted to handle cross-OS differences
142
142
3.**Clean Slate Approach**: Rather than tracking diffs, each update creates a pristine copy of the current dependency state
143
-
4.**Conflict Detection**: Optional pre-cleaning checks for local modifications to vendored content
144
-
5.**Atomic Transactions**: All changes are applied in a single Git transaction after filesystem operations are complete
143
+
4.**Conflict Detection**: Pre-operation checks ensure the Git repository is in a clean state
144
+
5.**Safe Operations**: The tool operates only when Git status is clean, preventing accidental overwrites of uncommitted changes
145
145
146
146
Example of dependency inversion for directory cleaning:
`acdm` implements several safety features to protect your repository:
164
165
165
-
1.**Git Status Check**: Operations will fail if your git repository has uncommitted changes, ensuring a clean state before making modifications.
166
+
1.**Git Repository Requirement**: Operations will only run within a Git repository, ensuring you can track changes.
166
167
167
-
2.**Mount Point Confirmation**: Before purging mount points during updates, you'll be prompted to confirm the operation.
168
+
2.**Git Status Check**: Operations will fail if your Git repository has uncommitted changes, ensuring a clean state before making modifications.
168
169
169
-
3.**Atomic Operations**: All changes are staged together, ensuring consistent updates.
170
+
3.**Mount Point Confirmation**: Before purging mount points during updates, you'll be prompted to confirm the operation.
170
171
171
172
4.**Verbose Logging**: Detailed logs help troubleshoot issues and understand what's happening.
172
173
173
-
These safety features can be bypassed with the `--force` flag when necessary, but this should be used with caution.
174
+
The mount point confirmation can be bypassed with the `--force` flag when necessary, but this should be used with caution.
175
+
176
+
Note: Unlike previous versions, `acdm` will not automatically stage or commit any changes. After running operations that modify files, you'll need to stage and commit the changes manually.
174
177
175
178
## Best Practices
176
179
@@ -184,11 +187,13 @@ These safety features can be bypassed with the `--force` flag when necessary, bu
184
187
185
188
5.**Keep a clean git repository**: Commit your changes before running `acdm` operations.
186
189
187
-
6.**Use atomic updates**: Update all dependencies at once to ensure consistency.
190
+
6.**Batch updates**: Update all dependencies at once to ensure consistency.
188
191
189
192
7.**Version lock**: Update dependencies deliberately, not automatically.
190
193
191
-
8.**Review before committing**: After updates, review the changes before committing them.
194
+
8.**Review and commit manually**: After updates, review all changes and commit them manually.
195
+
196
+
9.**Create atomic commits**: For cleaner history, commit dependency updates separately from your own code changes.
0 commit comments