Skip to content

Commit 174f9e6

Browse files
committed
Merge branch 'js/am-call-theirs-theirs-in-fallback-3way' into maint
One part of "git am" had an oddball helper function that called stuff from outside "his" as opposed to calling what we have "ours", which was not gender-neutral and also inconsistent with the rest of the system where outside stuff is usuall called "theirs" in contrast to "ours". * js/am-call-theirs-theirs-in-fallback-3way: am: counteract gender bias
2 parents 8a81d5f + 715a51b commit 174f9e6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

builtin/am.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,30 +1578,30 @@ static int build_fake_ancestor(const struct am_state *state, const char *index_f
15781578
}
15791579

15801580
/**
1581-
* Do the three-way merge using fake ancestor, his tree constructed
1581+
* Do the three-way merge using fake ancestor, their tree constructed
15821582
* from the fake ancestor and the postimage of the patch, and our
15831583
* state.
15841584
*/
15851585
static int run_fallback_merge_recursive(const struct am_state *state,
15861586
unsigned char *orig_tree,
15871587
unsigned char *our_tree,
1588-
unsigned char *his_tree)
1588+
unsigned char *their_tree)
15891589
{
15901590
struct child_process cp = CHILD_PROCESS_INIT;
15911591
int status;
15921592

15931593
cp.git_cmd = 1;
15941594

15951595
argv_array_pushf(&cp.env_array, "GITHEAD_%s=%.*s",
1596-
sha1_to_hex(his_tree), linelen(state->msg), state->msg);
1596+
sha1_to_hex(their_tree), linelen(state->msg), state->msg);
15971597
if (state->quiet)
15981598
argv_array_push(&cp.env_array, "GIT_MERGE_VERBOSITY=0");
15991599

16001600
argv_array_push(&cp.args, "merge-recursive");
16011601
argv_array_push(&cp.args, sha1_to_hex(orig_tree));
16021602
argv_array_push(&cp.args, "--");
16031603
argv_array_push(&cp.args, sha1_to_hex(our_tree));
1604-
argv_array_push(&cp.args, sha1_to_hex(his_tree));
1604+
argv_array_push(&cp.args, sha1_to_hex(their_tree));
16051605

16061606
status = run_command(&cp) ? (-1) : 0;
16071607
discard_cache();
@@ -1614,7 +1614,7 @@ static int run_fallback_merge_recursive(const struct am_state *state,
16141614
*/
16151615
static int fall_back_threeway(const struct am_state *state, const char *index_path)
16161616
{
1617-
unsigned char orig_tree[GIT_SHA1_RAWSZ], his_tree[GIT_SHA1_RAWSZ],
1617+
unsigned char orig_tree[GIT_SHA1_RAWSZ], their_tree[GIT_SHA1_RAWSZ],
16181618
our_tree[GIT_SHA1_RAWSZ];
16191619

16201620
if (get_sha1("HEAD", our_tree) < 0)
@@ -1651,7 +1651,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
16511651
return error(_("Did you hand edit your patch?\n"
16521652
"It does not apply to blobs recorded in its index."));
16531653

1654-
if (write_index_as_tree(his_tree, &the_index, index_path, 0, NULL))
1654+
if (write_index_as_tree(their_tree, &the_index, index_path, 0, NULL))
16551655
return error("could not write tree");
16561656

16571657
say(state, stdout, _("Falling back to patching base and 3-way merge..."));
@@ -1661,13 +1661,13 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
16611661

16621662
/*
16631663
* This is not so wrong. Depending on which base we picked, orig_tree
1664-
* may be wildly different from ours, but his_tree has the same set of
1664+
* may be wildly different from ours, but their_tree has the same set of
16651665
* wildly different changes in parts the patch did not touch, so
16661666
* recursive ends up canceling them, saying that we reverted all those
16671667
* changes.
16681668
*/
16691669

1670-
if (run_fallback_merge_recursive(state, orig_tree, our_tree, his_tree)) {
1670+
if (run_fallback_merge_recursive(state, orig_tree, our_tree, their_tree)) {
16711671
rerere(state->allow_rerere_autoupdate);
16721672
return error(_("Failed to merge in the changes."));
16731673
}

0 commit comments

Comments
 (0)