Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Stankowski <git@trakos.pl>2022-01-10 17:18:18 +0300
committerPiotr Stankowski <git@trakos.pl>2022-03-07 22:25:08 +0300
commitf6c210fc5a0642d02aff0ed2dda543749778aa9c (patch)
treedce1db20b755a40f4e59a21949e5bb4675e2f8ab
parenta928ebb0951f52bfccbfc2e67543abe8bc3f3963 (diff)
git2go: Fix comments in MergeCommand
In Git, "ours" and "theirs" are named from the perspective of the maintainer accepting the changes. Ours is the main target ref that we merge into, and theirs is the source ref. Based on orders of parents in call to CreateCommitFromIds (ours, theirs) that is how we use those as well, only this comment was wrong. This is probably related to https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2868 and it was fixed in code, but the mistaken comment was left. This is important to iron out before we add squashing, as the wrong parent for squashed commit could be catastrophic.
-rw-r--r--internal/git2go/merge.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/git2go/merge.go b/internal/git2go/merge.go
index fe5965977..b03b3e499 100644
--- a/internal/git2go/merge.go
+++ b/internal/git2go/merge.go
@@ -23,13 +23,13 @@ type MergeCommand struct {
AuthorName string
// AuthorMail is the author mail of merge commit.
AuthorMail string
- // AuthorDate is the auithor date of merge commit.
+ // AuthorDate is the author date of merge commit.
AuthorDate time.Time
// Message is the message to be used for the merge commit.
Message string
- // Ours is the commit that is to be merged into theirs.
+ // Ours is the commit into which theirs is to be merged.
Ours string
- // Theirs is the commit into which ours is to be merged.
+ // Theirs is the commit that is to be merged into ours.
Theirs string
// AllowConflicts controls whether conflicts are allowed. If they are,
// then conflicts will be committed as part of the result.