mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
am: counteract gender bias
Since 47f0b6d5
(Fall back to three-way merge when applying a patch.,
2005-10-06), i.e. for almost 11 years already, we used a male form
to describe "the other tree".
While it was unintended, this gave the erroneous impression as if
the Git developers thought of users as male, and were unaware of the
important role in software development played by female actors such
as Ada Lovelace, Grace Hopper and Margaret Hamilton. In fact, the
first professional software developers were all female.
Let's change those unfortunate references to the gender neutral
"their tree". Doing so also makes the fallback_merge_recursive(),
which is an oddball, more in line with the other parts of the system
where we contrast what we have vs what we obtain from others by
saying "ours" vs "theirs". This inconsistency was also unintended.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0b65a8dbdb
commit
715a51bcaf
16
builtin/am.c
16
builtin/am.c
|
@ -1579,14 +1579,14 @@ static int build_fake_ancestor(const struct am_state *state, const char *index_f
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do the three-way merge using fake ancestor, his tree constructed
|
* Do the three-way merge using fake ancestor, their tree constructed
|
||||||
* from the fake ancestor and the postimage of the patch, and our
|
* from the fake ancestor and the postimage of the patch, and our
|
||||||
* state.
|
* state.
|
||||||
*/
|
*/
|
||||||
static int run_fallback_merge_recursive(const struct am_state *state,
|
static int run_fallback_merge_recursive(const struct am_state *state,
|
||||||
unsigned char *orig_tree,
|
unsigned char *orig_tree,
|
||||||
unsigned char *our_tree,
|
unsigned char *our_tree,
|
||||||
unsigned char *his_tree)
|
unsigned char *their_tree)
|
||||||
{
|
{
|
||||||
struct child_process cp = CHILD_PROCESS_INIT;
|
struct child_process cp = CHILD_PROCESS_INIT;
|
||||||
int status;
|
int status;
|
||||||
|
@ -1594,7 +1594,7 @@ static int run_fallback_merge_recursive(const struct am_state *state,
|
||||||
cp.git_cmd = 1;
|
cp.git_cmd = 1;
|
||||||
|
|
||||||
argv_array_pushf(&cp.env_array, "GITHEAD_%s=%.*s",
|
argv_array_pushf(&cp.env_array, "GITHEAD_%s=%.*s",
|
||||||
sha1_to_hex(his_tree), linelen(state->msg), state->msg);
|
sha1_to_hex(their_tree), linelen(state->msg), state->msg);
|
||||||
if (state->quiet)
|
if (state->quiet)
|
||||||
argv_array_push(&cp.env_array, "GIT_MERGE_VERBOSITY=0");
|
argv_array_push(&cp.env_array, "GIT_MERGE_VERBOSITY=0");
|
||||||
|
|
||||||
|
@ -1602,7 +1602,7 @@ static int run_fallback_merge_recursive(const struct am_state *state,
|
||||||
argv_array_push(&cp.args, sha1_to_hex(orig_tree));
|
argv_array_push(&cp.args, sha1_to_hex(orig_tree));
|
||||||
argv_array_push(&cp.args, "--");
|
argv_array_push(&cp.args, "--");
|
||||||
argv_array_push(&cp.args, sha1_to_hex(our_tree));
|
argv_array_push(&cp.args, sha1_to_hex(our_tree));
|
||||||
argv_array_push(&cp.args, sha1_to_hex(his_tree));
|
argv_array_push(&cp.args, sha1_to_hex(their_tree));
|
||||||
|
|
||||||
status = run_command(&cp) ? (-1) : 0;
|
status = run_command(&cp) ? (-1) : 0;
|
||||||
discard_cache();
|
discard_cache();
|
||||||
|
@ -1615,7 +1615,7 @@ static int run_fallback_merge_recursive(const struct am_state *state,
|
||||||
*/
|
*/
|
||||||
static int fall_back_threeway(const struct am_state *state, const char *index_path)
|
static int fall_back_threeway(const struct am_state *state, const char *index_path)
|
||||||
{
|
{
|
||||||
unsigned char orig_tree[GIT_SHA1_RAWSZ], his_tree[GIT_SHA1_RAWSZ],
|
unsigned char orig_tree[GIT_SHA1_RAWSZ], their_tree[GIT_SHA1_RAWSZ],
|
||||||
our_tree[GIT_SHA1_RAWSZ];
|
our_tree[GIT_SHA1_RAWSZ];
|
||||||
|
|
||||||
if (get_sha1("HEAD", our_tree) < 0)
|
if (get_sha1("HEAD", our_tree) < 0)
|
||||||
|
@ -1652,7 +1652,7 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
|
||||||
return error(_("Did you hand edit your patch?\n"
|
return error(_("Did you hand edit your patch?\n"
|
||||||
"It does not apply to blobs recorded in its index."));
|
"It does not apply to blobs recorded in its index."));
|
||||||
|
|
||||||
if (write_index_as_tree(his_tree, &the_index, index_path, 0, NULL))
|
if (write_index_as_tree(their_tree, &the_index, index_path, 0, NULL))
|
||||||
return error("could not write tree");
|
return error("could not write tree");
|
||||||
|
|
||||||
say(state, stdout, _("Falling back to patching base and 3-way merge..."));
|
say(state, stdout, _("Falling back to patching base and 3-way merge..."));
|
||||||
|
@ -1662,13 +1662,13 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is not so wrong. Depending on which base we picked, orig_tree
|
* This is not so wrong. Depending on which base we picked, orig_tree
|
||||||
* may be wildly different from ours, but his_tree has the same set of
|
* may be wildly different from ours, but their_tree has the same set of
|
||||||
* wildly different changes in parts the patch did not touch, so
|
* wildly different changes in parts the patch did not touch, so
|
||||||
* recursive ends up canceling them, saying that we reverted all those
|
* recursive ends up canceling them, saying that we reverted all those
|
||||||
* changes.
|
* changes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (run_fallback_merge_recursive(state, orig_tree, our_tree, his_tree)) {
|
if (run_fallback_merge_recursive(state, orig_tree, our_tree, their_tree)) {
|
||||||
rerere(state->allow_rerere_autoupdate);
|
rerere(state->allow_rerere_autoupdate);
|
||||||
return error(_("Failed to merge in the changes."));
|
return error(_("Failed to merge in the changes."));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue