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: crates/but-bot/src/butbot.rs
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Don't be too verbose, but be thorough and outline everything you did.
52
52
53
53
### Core concepts
54
54
- **Project**: A Git repository that has been initialized with GitButler.
55
-
- **Stack**: A collection of dependent branchs that are used to manage changes in the project. With GitButler (as opposed to normal Git), multiple stacks can be applied at the same time.
55
+
- **Stack**: A collection of dependent branches that are used to manage changes in the project. With GitButler (as opposed to normal Git), multiple stacks can be applied at the same time.
56
56
- **Branch**: A pointer to a specific commit in the project. Branches can contain multiple commits. Commits are always listed newest to oldest.
57
57
- **Commit**: A snapshot of the project at a specific point in time.
58
58
- **File changes**: A set of changes made to the files in the project. This can include additions, deletions, and modifications of files. The user can assign these changes to stacks to keep things ordering.
@@ -68,13 +68,13 @@ In order to do that, please follow these steps:
68
68
4. Use the tools provided to you to perform the actions.
69
69
70
70
### Capabilities
71
-
You can generally perform the normal Git operations, such as creating branchs and committing to them.
71
+
You can generally perform the normal Git operations, such as creating branches and committing to them.
72
72
You can also perform more advanced operations, such as:
73
73
- `absorb`: Take a set of file changes and amend them into the existing commits in the project.
74
74
This requires you to figure out where the changes should go based on the locks, assignments and any other user provided information.
75
75
- `split a commit`: Take an existing commit and split it into multiple commits based on the the user directive.
76
76
This can be achieved by using the `split_commit` tool.
77
-
- `split a branch`: Take an existing branch and split it into two branchs. This basically takes a set of committed file changes and moves them to a new branch, removing them from the original branch.
77
+
- `split a branch`: Take an existing branch and split it into two branches. This basically takes a set of committed file changes and moves them to a new branch, removing them from the original branch.
78
78
This is useful when you want to separate the changes into a new branch for further work.
79
79
In order to do this, you will need to get the branch changes for the intended source branch (call the `get_branch_changes` tool), and then call the split branch tool with the changes you want to split off.
80
80
@@ -177,7 +177,7 @@ Take a look at the conversation, specifically, the last user request below, and
177
177
Alright, let's create the plan for what the user wants to do.
178
178
The plan should be based on the user request found in the conversation below.
179
179
Add items to the todo list based on the plan.
180
-
Reference relevant resources from the project status (e.g. branchs, commits, file changes) when creating the todo items.
180
+
Reference relevant resources from the project status (e.g. branches, commits, file changes) when creating the todo items.
181
181
182
182
<CONVERSATION>
183
183
{conversation}
@@ -356,7 +356,7 @@ Based on the conversation below and the project status, please update the status
356
356
</TODO>
357
357
358
358
<IMPORTANT_NOTES>
359
-
Be thorough in your response. Name relevant branchs, commits, file changes, and any other relevant information.
359
+
Be thorough in your response. Name relevant branches, commits, file changes, and any other relevant information.
360
360
Follow best practices.
361
361
ONLY perform the actions that are necessary to complete the todo item above.
362
362
If you need to perform investigations, do so, and be detailed in your findings. Don't perform actions.
Copy file name to clipboardExpand all lines: crates/gitbutler-hunk-dependency/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Hunk dependency
2
2
3
-
This crate contains the logic behind the calculation of the dependency graph between commits and between uncommited changes.
3
+
This crate contains the logic behind the calculation of the dependency graph between commits and between uncommitted changes.
4
4
5
5
## Overview
6
6
@@ -16,9 +16,9 @@ We should play around with the limits of what should be rearrangeable.
16
16
17
17
### What do we want?
18
18
19
-
1. Be able to tell which uncommited changes belong to which stacks.
19
+
1. Be able to tell which uncommitted changes belong to which stacks.
20
20
2. Be able to tell which commits depend on which preceding commits.
21
-
3. Be able to tell which commits are depended upon by following commits or uncommited changes (i.e. the inverse map of the previous two items).
21
+
3. Be able to tell which commits are depended upon by following commits or uncommitted changes (i.e. the inverse map of the previous two items).
22
22
23
23
### What do we need?
24
24
@@ -49,7 +49,7 @@ The items in the vector, i.e. hunk ranges, have the following information:
49
49
50
50
## Algorithm's pseudo code (roughly)
51
51
52
-
What we're rougly doing in the code is
52
+
What we're roughly doing in the code is
53
53
```
54
54
for all affected files:
55
55
for all input diff hunks:
@@ -61,7 +61,7 @@ for all affected files:
61
61
override all previous hunks
62
62
break
63
63
64
-
if there are no exsting hunks
64
+
if there are no existing hunks
65
65
add all diffs (can be multiple)
66
66
break
67
67
@@ -189,12 +189,12 @@ After processing the incoming hunk, the hunk range list looks like this
189
189
The existing range was split, and the incoming hunk split the existing range into the first and the last one.
190
190
The index of the next hunk range to visit is `2` and the index of the first hunk to shift is `3`.
191
191
When we process a following hunk, we need to compare it to the **3rd hunk range** (and following hunk ranges if any), but we need to shift the `start` lines of the hunk ranges following the ones we updated, in this case the **4th hunk range**.
192
-
Since the net lines are 0, everythin stays as is.
192
+
Since the net lines are 0, everything stays as is.
193
193
194
194
### Multiple shifts per commit
195
195
---
196
196
197
-
Inside a commit, multple hunks will most probably shift the lines different amounts.
197
+
Inside a commit, multiple hunks will most probably shift the lines different amounts.
198
198
We keep track of the cumulative line shift, and update only the hunks that follow the hunk that introduced the shift.
0 commit comments