{"thread":{"id":"39480","subject":"[PATCH 0/2] uniform error messages for index read and write","startedAt":"2015-06-01T13:50:03Z","lastAt":"2015-06-01T23:01:14Z","messageCount":4,"participants":["Michael J Gruber","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"262590","messageId":"cover.1433166363.git.git@drmicha.warpmail.net","threadId":"39480","inReplyTo":null,"subject":"[PATCH 0/2] uniform error messages for index read and write","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-06-01T13:50:03Z","receivedAt":"2015-06-01T13:50:03Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Currently we use different messages for the same error.\nMake them uniform.\n\nMichael J Gruber (2):\n  show-index: uniform error messages for index read\n  messages: uniform error messages for index write\n\n builtin/add.c            |  2 +-\n builtin/apply.c          |  2 +-\n builtin/checkout-index.c |  2 +-\n builtin/checkout.c       |  4 ++--\n builtin/clone.c          |  2 +-\n builtin/commit.c         | 17 ++++++++++-------\n builtin/merge.c          |  2 +-\n builtin/mv.c             |  2 +-\n builtin/read-tree.c      |  2 +-\n builtin/rm.c             |  2 +-\n builtin/update-index.c   |  2 +-\n merge-recursive.c        |  2 +-\n merge.c                  |  2 +-\n rerere.c                 |  2 +-\n sequencer.c              |  5 +++--\n show-index.c             |  4 ++--\n 16 files changed, 29 insertions(+), 25 deletions(-)\n\n-- \n2.4.2.548.g1e81565\n"},{"id":"262592","messageId":"b87777a4de06a56472f2d23ab8bbce9a332bb2d7.1433166363.git.git@drmicha.warpmail.net","threadId":"39480","inReplyTo":"cover.1433166363.git.git@drmicha.warpmail.net","subject":"[PATCH 1/2] show-index: uniform error messages for index read","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-06-01T13:50:04Z","receivedAt":"2015-06-01T13:50:04Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Currently, we have different wordings for the same index read error\nmessage, which may be confusing to users and increase3s the risk of more\nseverely different translated messages:\n\nbuiltin/apply.c:\t\t\tdie(_(\"unable to read index file\"));\nshow-index.c:\t\t\tdie(\"unable to read index\");\nshow-index.c:\t\t\tdie(\"unable to read index\");\ntest-dump-cache-tree.c:\t\tdie(\"unable to read index file\");\ntest-dump-untracked-cache.c:\t\tdie(\"unable to read index file\");\ntest-scrap-cache-tree.c:\t\tdie(\"unable to read index file\");\nbuiltin/commit.c:\t\t\tdie(_(\"Cannot read index\"));\nrerere.c:\t\treturn error(\"Could not read index\");\nrerere.c:\t\treturn error(\"Could not read index\");\nrerere.c:\t\treturn error(\"Could not read index\");\n\nTurn all of them into \"unable to read index file\" except for the rerere\nmessages: They appear on a higher level (index file access + parsing)\nand are worded similarly to other rerere messages.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n builtin/commit.c | 2 +-\n show-index.c     | 4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 254477f..04d49d5 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -878,7 +878,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,\n \t\tconst char *parent = \"HEAD\";\n \n \t\tif (!active_nr && read_cache() < 0)\n-\t\t\tdie(_(\"Cannot read index\"));\n+\t\t\tdie(_(\"unable to read index file\"));\n \n \t\tif (amend)\n \t\t\tparent = \"HEAD^1\";\ndiff --git a/show-index.c b/show-index.c\nindex 5a9eed7..e7797d0 100644\n--- a/show-index.c\n+++ b/show-index.c\n@@ -22,11 +22,11 @@ int main(int argc, char **argv)\n \t\tif (version < 2 || version > 2)\n \t\t\tdie(\"unknown index version\");\n \t\tif (fread(top_index, 256 * 4, 1, stdin) != 1)\n-\t\t\tdie(\"unable to read index\");\n+\t\t\tdie(\"unable to read index file\");\n \t} else {\n \t\tversion = 1;\n \t\tif (fread(&top_index[2], 254 * 4, 1, stdin) != 1)\n-\t\t\tdie(\"unable to read index\");\n+\t\t\tdie(\"unable to read index file\");\n \t}\n \tnr = 0;\n \tfor (i = 0; i < 256; i++) {\n-- \n2.4.2.548.g1e81565\n"},{"id":"262591","messageId":"0835711582b9db4ee067f2ea1fb767e0df13c4a0.1433166363.git.git@drmicha.warpmail.net","threadId":"39480","inReplyTo":"cover.1433166363.git.git@drmicha.warpmail.net","subject":"[RFC/PATCH 2/2] messages: uniform error messages for index write","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-06-01T13:50:05Z","receivedAt":"2015-06-01T13:50:05Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Currently, we have different wordings for the same index write error\nmessage, which may be confusing to users and increases the risk of\nmore severely different translated messages:\n\nbuiltin/add.c:\t\t\tdie(_(\"Unable to write new index file\"));\nbuiltin/apply.c:\t\t\tdie(_(\"Unable to write new index file\"));\nbuiltin/checkout.c:\t\tdie(_(\"unable to write new index file\"));\nbuiltin/checkout-index.c:\t\tdie(\"Unable to write new index file\");\nbuiltin/clone.c:\t\tdie(_(\"unable to write new index file\"));\nbuiltin/commit.c:\t\t\tdie(_(\"unable to create temporary index\"));\nbuiltin/commit.c:\t\t\t\tdie(_(\"unable to update temporary index file\"));\nbuiltin/commit.c:\t\t\t\tdie(_(\"unable to write index file\"));\nbuiltin/commit.c:\t\tdie(_(\"unable to write new_index file\"));\nbuiltin/commit.c:\t\t\tdie(_(\"unable to write new_index file\"));\nbuiltin/commit.c:\t\t\t\tdie(_(\"unable to write new_index file\"));\nbuiltin/commit.c:\t\tdie(_(\"unable to write temporary index file\"));\nbuiltin/commit.c:\t\t     \"new_index file. Check that disk is not full and quota is\\n\"\nbuiltin/merge.c:\t\treturn error(_(\"Unable to write index.\"));\nbuiltin/mv.c:\t\tdie(_(\"Unable to write new index file\"));\nbuiltin/read-tree.c:\t\tdie(\"unable to write new index file\");\nbuiltin/rm.c:\t\t\tdie(_(\"Unable to write new index file\"));\nbuiltin/update-index.c:\t\t\tdie(\"Unable to write new index file\");\nmerge.c:\t\tdie(_(\"unable to write new index file\"));\nmerge-recursive.c:\t\treturn error(_(\"Unable to write index.\"));\npack-write.c:\t\t\tdie_errno(\"unable to create '%s'\", index_name);\nrerere.c:\t\t\tdie(\"Unable to write new index file\");\nsequencer.c:\t\tdie(_(\"%s: Unable to write new index file\"), action_name(opts));\ntest-scrap-cache-tree.c:\t\tdie(\"unable to write index file\");\n\nExcept for \"checkout\", \"new index\" always refers to the new state of the\nindex file, which is extra confusing. \"checkout\" does not talk about\n\"new work tree\" (but \"work tree\") either. Therefore, word all of these\nas \"unable to write index file\" (by possibly omitting \"new\" or \"new_\",\nadjusting capitalization and punctuation, turning \"create\" into\n\"write\"), except for:\n\n* Leave \"temporary\" in place and add TRANSLATORS note.\n  It may happen that the index file is writable but not the temporary\n  one.\n\n* Leave pack-write.c alone.\n  It is low level without l10n.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nI am actually a bit torn on the \"temporary index\" messages. On the one hand\nwe should hide technicalities from the user; on the other hand, we should give\nhelpful information for debugging.\n\nMaybe \"new index\" and \"temporary index\" are really in the same camp? I would\nomit \"temporary\" in that case, too.\n\n\n builtin/add.c            |  2 +-\n builtin/apply.c          |  2 +-\n builtin/checkout-index.c |  2 +-\n builtin/checkout.c       |  4 ++--\n builtin/clone.c          |  2 +-\n builtin/commit.c         | 15 +++++++++------\n builtin/merge.c          |  2 +-\n builtin/mv.c             |  2 +-\n builtin/read-tree.c      |  2 +-\n builtin/rm.c             |  2 +-\n builtin/update-index.c   |  2 +-\n merge-recursive.c        |  2 +-\n merge.c                  |  2 +-\n rerere.c                 |  2 +-\n sequencer.c              |  5 +++--\n 15 files changed, 26 insertions(+), 22 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex df5135b..987dfdf 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -445,7 +445,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n finish:\n \tif (active_cache_changed) {\n \t\tif (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\t\tdie(_(\"Unable to write new index file\"));\n+\t\t\tdie(_(\"unable to write index file\"));\n \t}\n \n \treturn exit_status;\ndiff --git a/builtin/apply.c b/builtin/apply.c\nindex 146be97..4143f92 100644\n--- a/builtin/apply.c\n+++ b/builtin/apply.c\n@@ -4672,7 +4672,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)\n \n \tif (update_index) {\n \t\tif (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\t\tdie(_(\"Unable to write new index file\"));\n+\t\t\tdie(_(\"unable to write index file\"));\n \t}\n \n \treturn !!errs;\ndiff --git a/builtin/checkout-index.c b/builtin/checkout-index.c\nindex 8028c37..7a68ac2 100644\n--- a/builtin/checkout-index.c\n+++ b/builtin/checkout-index.c\n@@ -279,6 +279,6 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)\n \n \tif (0 <= newfd &&\n \t    write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\tdie(\"Unable to write new index file\");\n+\t\tdie(\"unable to write index file\");\n \treturn 0;\n }\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 9b49f0e..e7c109e 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -380,7 +380,7 @@ static int checkout_paths(const struct checkout_opts *opts,\n \t}\n \n \tif (write_locked_index(&the_index, lock_file, COMMIT_LOCK))\n-\t\tdie(_(\"unable to write new index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \n \tread_ref_full(\"HEAD\", 0, rev, &flag);\n \thead = lookup_commit_reference_gently(rev, 1);\n@@ -591,7 +591,7 @@ static int merge_working_tree(const struct checkout_opts *opts,\n \t\tcache_tree_update(&the_index, WRITE_TREE_SILENT | WRITE_TREE_REPAIR);\n \n \tif (write_locked_index(&the_index, lock_file, COMMIT_LOCK))\n-\t\tdie(_(\"unable to write new index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \n \tif (!opts->force && !opts->quiet)\n \t\tshow_local_changes(&new->commit->object, &opts->diff_options);\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex b878252..20c9a91 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -660,7 +660,7 @@ static int checkout(void)\n \t\tdie(_(\"unable to checkout working tree\"));\n \n \tif (write_locked_index(&the_index, lock_file, COMMIT_LOCK))\n-\t\tdie(_(\"unable to write new index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \n \terr |= run_hook_le(NULL, \"post-checkout\", sha1_to_hex(null_sha1),\n \t\t\t   sha1_to_hex(sha1), \"1\", NULL);\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex 04d49d5..b5b1158 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -341,7 +341,8 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \t\trefresh_cache_or_die(refresh_flags);\n \n \t\tif (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))\n-\t\t\tdie(_(\"unable to create temporary index\"));\n+\t\t\t/* TRANSLATORS: match with \"unable to write index file\" */\n+\t\t\tdie(_(\"unable to write temporary index file\"));\n \n \t\told_index_env = getenv(INDEX_ENVIRONMENT);\n \t\tsetenv(INDEX_ENVIRONMENT, index_lock.filename.buf, 1);\n@@ -360,7 +361,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \t\t\tif (reopen_lock_file(&index_lock) < 0)\n \t\t\t\tdie(_(\"unable to write index file\"));\n \t\t\tif (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))\n-\t\t\t\tdie(_(\"unable to update temporary index\"));\n+\t\t\t\tdie(_(\"unable to write temporary index file\"));\n \t\t} else\n \t\t\twarning(_(\"Failed to update main cache tree\"));\n \n@@ -386,7 +387,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \t\trefresh_cache_or_die(refresh_flags);\n \t\tupdate_main_cache_tree(WRITE_TREE_SILENT);\n \t\tif (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))\n-\t\t\tdie(_(\"unable to write new_index file\"));\n+\t\t\tdie(_(\"unable to write index file\"));\n \t\tcommit_style = COMMIT_NORMAL;\n \t\treturn index_lock.filename.buf;\n \t}\n@@ -411,7 +412,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \t\tif (active_cache_changed) {\n \t\t\tif (write_locked_index(&the_index, &index_lock,\n \t\t\t\t\t       COMMIT_LOCK))\n-\t\t\t\tdie(_(\"unable to write new_index file\"));\n+\t\t\t\tdie(_(\"unable to write index file\"));\n \t\t} else {\n \t\t\trollback_lock_file(&index_lock);\n \t\t}\n@@ -460,7 +461,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \trefresh_cache(REFRESH_QUIET);\n \tupdate_main_cache_tree(WRITE_TREE_SILENT);\n \tif (write_locked_index(&the_index, &index_lock, CLOSE_LOCK))\n-\t\tdie(_(\"unable to write new_index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \n \thold_lock_file_for_update(&false_lock,\n \t\t\t\t  git_path(\"next-index-%\"PRIuMAX,\n@@ -472,6 +473,7 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix\n \trefresh_cache(REFRESH_QUIET);\n \n \tif (write_locked_index(&the_index, &false_lock, CLOSE_LOCK))\n+\t\t/* TRANSLATORS: match with \"unable to write index file\" */\n \t\tdie(_(\"unable to write temporary index file\"));\n \n \tdiscard_cache();\n@@ -1783,8 +1785,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)\n \tunlink(git_path(\"SQUASH_MSG\"));\n \n \tif (commit_index_files())\n+\t\t/* TRANSLATORS: match with \"unable to write index file\" */\n \t\tdie (_(\"Repository has been updated, but unable to write\\n\"\n-\t\t     \"new_index file. Check that disk is not full and quota is\\n\"\n+\t\t     \"index file. Check that disk is not full and quota is\\n\"\n \t\t     \"not exceeded, and then \\\"git reset HEAD\\\" to recover.\"));\n \n \trerere(0);\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 7e2541a..aa3d0c8 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -642,7 +642,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,\n \trefresh_cache(REFRESH_QUIET);\n \tif (active_cache_changed &&\n \t    write_locked_index(&the_index, &lock, COMMIT_LOCK))\n-\t\treturn error(_(\"Unable to write index.\"));\n+\t\treturn error(_(\"unable to write index file\"));\n \trollback_lock_file(&lock);\n \n \tif (!strcmp(strategy, \"recursive\") || !strcmp(strategy, \"subtree\")) {\ndiff --git a/builtin/mv.c b/builtin/mv.c\nindex d1d4316..41e2018 100644\n--- a/builtin/mv.c\n+++ b/builtin/mv.c\n@@ -276,7 +276,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)\n \n \tif (active_cache_changed &&\n \t    write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\tdie(_(\"Unable to write new index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \n \treturn 0;\n }\ndiff --git a/builtin/read-tree.c b/builtin/read-tree.c\nindex 43b47f7..b21d8f7 100644\n--- a/builtin/read-tree.c\n+++ b/builtin/read-tree.c\n@@ -244,6 +244,6 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)\n \t\tprime_cache_tree(&the_index, trees[0]);\n \n \tif (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\tdie(\"unable to write new index file\");\n+\t\tdie(\"unable to write index file\");\n \treturn 0;\n }\ndiff --git a/builtin/rm.c b/builtin/rm.c\nindex 80b972f..c502832 100644\n--- a/builtin/rm.c\n+++ b/builtin/rm.c\n@@ -427,7 +427,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \n \tif (active_cache_changed) {\n \t\tif (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))\n-\t\t\tdie(_(\"Unable to write new index file\"));\n+\t\t\tdie(_(\"unable to write index file\"));\n \t}\n \n \treturn 0;\ndiff --git a/builtin/update-index.c b/builtin/update-index.c\nindex 7431938..0c67dcd 100644\n--- a/builtin/update-index.c\n+++ b/builtin/update-index.c\n@@ -1134,7 +1134,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)\n \t\t\tunable_to_lock_die(get_index_file(), lock_error);\n \t\t}\n \t\tif (write_locked_index(&the_index, lock_file, COMMIT_LOCK))\n-\t\t\tdie(\"Unable to write new index file\");\n+\t\t\tdie(\"unable to write index file\");\n \t}\n \n \trollback_lock_file(lock_file);\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 44d85be..4e4dcf5 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -2015,7 +2015,7 @@ int merge_recursive_generic(struct merge_options *o,\n \t\t\tresult);\n \tif (active_cache_changed &&\n \t    write_locked_index(&the_index, lock, COMMIT_LOCK))\n-\t\treturn error(_(\"Unable to write index.\"));\n+\t\treturn error(_(\"unable to write index file\"));\n \n \treturn clean ? 0 : 1;\n }\ndiff --git a/merge.c b/merge.c\nindex fcff632..0f7bde4 100644\n--- a/merge.c\n+++ b/merge.c\n@@ -91,6 +91,6 @@ int checkout_fast_forward(const unsigned char *head,\n \tif (unpack_trees(nr_trees, t, &opts))\n \t\treturn -1;\n \tif (write_locked_index(&the_index, lock_file, COMMIT_LOCK))\n-\t\tdie(_(\"unable to write new index file\"));\n+\t\tdie(_(\"unable to write index file\"));\n \treturn 0;\n }\ndiff --git a/rerere.c b/rerere.c\nindex 94aea9a..45ef340 100644\n--- a/rerere.c\n+++ b/rerere.c\n@@ -491,7 +491,7 @@ static void update_paths(struct string_list *update)\n \n \tif (active_cache_changed) {\n \t\tif (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))\n-\t\t\tdie(\"Unable to write new index file\");\n+\t\t\tdie(\"unable to write index file\");\n \t} else\n \t\trollback_lock_file(&index_lock);\n }\ndiff --git a/sequencer.c b/sequencer.c\nindex c4f4b7d..2fb309d 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -317,8 +317,9 @@ static int do_recursive_merge(struct commit *base, struct commit *next,\n \n \tif (active_cache_changed &&\n \t    write_locked_index(&the_index, &index_lock, COMMIT_LOCK))\n-\t\t/* TRANSLATORS: %s will be \"revert\" or \"cherry-pick\" */\n-\t\tdie(_(\"%s: Unable to write new index file\"), action_name(opts));\n+\t\t/* TRANSLATORS: %s will be \"revert\" or \"cherry-pick\"\n+ \t\t   match this with \"unable to write index file\" */\n+\t\tdie(_(\"%s: unable to write index file\"), action_name(opts));\n \trollback_lock_file(&index_lock);\n \n \tif (opts->signoff)\n-- \n2.4.2.548.g1e81565\n"},{"id":"262659","messageId":"xmqqsiab3uf9.fsf@gitster.dls.corp.google.com","threadId":"39480","inReplyTo":"0835711582b9db4ee067f2ea1fb767e0df13c4a0.1433166363.git.git@drmicha.warpmail.net","subject":"Re: [RFC/PATCH 2/2] messages: uniform error messages for index write","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-06-01T23:01:14Z","receivedAt":"2015-06-01T23:01:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> * Leave \"temporary\" in place and add TRANSLATORS note.\n>   It may happen that the index file is writable but not the temporary\n>   one.\n>\n> * Leave pack-write.c alone.\n>   It is low level without l10n.\n>\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> I am actually a bit torn on the \"temporary index\" messages. On the one hand\n> we should hide technicalities from the user; on the other hand, we should give\n> helpful information for debugging.\n>\n> Maybe \"new index\" and \"temporary index\" are really in the same camp? I would\n> omit \"temporary\" in that case, too.\n\nIt is true that we never overwrite the file in-place, but instead\ncreate a new file and then rename it to the destiation.  So in that\nsense, we are always writing \"new index file\".\n\nThere however indeed is a different kind of \"temporary\" index\ninvolved, when you are doing \"git commit paths\" to create a partial\ncommit.  We populate a pristine (relative to HEAD) index, update the\ncontents of it with the working tree contents at specified paths in\norder to write the tree out, but do not use that index after that.\nThe real index is updated the same way for the specified paths to\nmatch what was committed, but what was added to the real index\noutside the specified paths before the partial commit was made is\nall kept in the real index.  The presense of this \"temporary\" index\nis something the end users may have to be aware of, if they want to\npeek into the state of the index from inside their hooks, so in that\nsense, it may make sense to include the word \"temporary\" in the\nerror message in that codepath.\n"}]}