{"thread":{"id":"52152","subject":"[PATCH] apply: clarify that index information is embedded, not the index itself","startedAt":"2019-10-30T01:55:21Z","lastAt":"2019-10-30T03:37:55Z","messageCount":2,"participants":["Alex Henrie","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"385128","messageId":"20191030015503.156441-1-alexhenrie24@gmail.com","threadId":"52152","inReplyTo":null,"subject":"[PATCH] apply: clarify that index information is embedded, not the index itself","fromName":"Alex Henrie","fromEmail":"alexhenrie24@gmail.com","sentAt":"2019-10-30T01:55:03Z","receivedAt":"2019-10-30T01:55:21Z","isPatch":true,"sender":{"key":"alexhenrie24@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5951993?v=4"},"body":"Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>\n---\nThe Spanish translation got this wrong.\n---\n Documentation/git-apply.txt | 2 +-\n apply.c                     | 4 ++++\n 2 files changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\nindex b9aa39000f..474be244ca 100644\n--- a/Documentation/git-apply.txt\n+++ b/Documentation/git-apply.txt\n@@ -92,7 +92,7 @@ OPTIONS\n \twith the `--reject` and the `--cached` options.\n \n --build-fake-ancestor=<file>::\n-\tNewer 'git diff' output has embedded 'index information'\n+\tNewer 'git diff' output has 'index information' embedded\n \tfor each blob to help identify the original version that\n \tthe patch applies to.  When this flag is given, and if\n \tthe original versions of the blobs are available locally,\ndiff --git a/apply.c b/apply.c\nindex f8a046a6a5..86f7cb3d88 100644\n--- a/apply.c\n+++ b/apply.c\n@@ -4987,6 +4987,10 @@ int apply_parse_options(int argc, const char **argv,\n \t\tOPT_BOOL('3', \"3way\", &state->threeway,\n \t\t\t N_( \"attempt three-way merge if a patch does not apply\")),\n \t\tOPT_FILENAME(0, \"build-fake-ancestor\", &state->fake_ancestor,\n+\t\t\t/*\n+\t\t\t * TRANSLATORS: Information about the index is embedded, not the\n+\t\t\t * index itself.\n+\t\t\t */\n \t\t\tN_(\"build a temporary index based on embedded index information\")),\n \t\t/* Think twice before adding \"--nul\" synonym to this */\n \t\tOPT_SET_INT('z', NULL, &state->line_termination,\n-- \n2.23.0\n\n"},{"id":"385134","messageId":"xmqq36fa52ex.fsf@gitster-ct.c.googlers.com","threadId":"52152","inReplyTo":"20191030015503.156441-1-alexhenrie24@gmail.com","subject":"Re: [PATCH] apply: clarify that index information is embedded, not the index itself","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-10-30T03:37:42Z","receivedAt":"2019-10-30T03:37:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Henrie <alexhenrie24@gmail.com> writes:\n\n> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>\n> ---\n> The Spanish translation got this wrong.\n> ---\n>  Documentation/git-apply.txt | 2 +-\n>  apply.c                     | 4 ++++\n>  2 files changed, 5 insertions(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\n> index b9aa39000f..474be244ca 100644\n> --- a/Documentation/git-apply.txt\n> +++ b/Documentation/git-apply.txt\n> @@ -92,7 +92,7 @@ OPTIONS\n>  \twith the `--reject` and the `--cached` options.\n>  \n>  --build-fake-ancestor=<file>::\n> -\tNewer 'git diff' output has embedded 'index information'\n> +\tNewer 'git diff' output has 'index information' embedded\n>  \tfor each blob to help identify the original version that\n\nThanks.  \n\nWhile we are looking at this paragraph, let me remind us that this\n\"Newer\" refers to the output from \"git diff\" and friends newer than\nec1fcc16 (\"Show original and resulting blob object info in diff\noutput.\", 2005-10-07); it way outlived its freshness and we probably\nshould drop it.\n\n> diff --git a/apply.c b/apply.c\n> index f8a046a6a5..86f7cb3d88 100644\n> --- a/apply.c\n> +++ b/apply.c\n> @@ -4987,6 +4987,10 @@ int apply_parse_options(int argc, const char **argv,\n>  \t\tOPT_BOOL('3', \"3way\", &state->threeway,\n>  \t\t\t N_( \"attempt three-way merge if a patch does not apply\")),\n>  \t\tOPT_FILENAME(0, \"build-fake-ancestor\", &state->fake_ancestor,\n> +\t\t\t/*\n> +\t\t\t * TRANSLATORS: Information about the index is embedded, not the\n> +\t\t\t * index itself.\n> +\t\t\t */\n\nI am not sure if this helps much.  The term \"index information\" was\ncoined purely based on where this piece of info appears (i.e. on the\n\"index from..to\" line of the diff output).  We use \"object names on\nthe 'index' line of the patch\" to build the temporary index to\nperform --3way, and it is fair to say \"object names are embedded on\nthe index line\", but calling the information \"index info embedded on\nthe index line\" feels quite redundant.\n\nIt is too late for this cycle to touch the translatable strings, but\nI think it is better to revamp any docs and messages that say\n\"embedded index information\" soon after the next release.\n\n>  \t\t\tN_(\"build a temporary index based on embedded index information\")),\n\nPerhaps\n\n\tN_(\"build a temporary index using object names in the patch\")\n\nor something.\n\nNotice I kept saying \"object names\" and not \"blob object names\"?\nThat is because we can show commit object name when the diff\ninvolves a submodule.  We have a choice to make here. (1) strive to\ntechnical correctness, somewhat sacrificing readability by avoiding\nthe word \"blob\", or (2) tell a white lie for the sake of simplicity\nand pretend there is no submodule involved.  I actually think the\nlatter may be more appropriate here, in which case\n\n\tN_(\"build a temporary index using blobs recorded in the patch\")\n\nmay be easier.  The documentation needs to match, but it already\npretends that there is no such thing as submodule ...\n\n> +\tNewer 'git diff' output has 'index information' embedded\n>  \tfor each blob to help identify the original version that\n\n... probably because the paragraph predates the invention of\nthe submodule mechanism.\n\n"}]}