git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Update update-index --cacheinfo entries' format
@ 2020-08-24 14:51 Vadim Sannikov via GitGitGadget
  2020-08-24 14:51 ` [PATCH 1/2] Unify `update-index --cacheinfo` usage Vadim Sannikov via GitGitGadget
  2020-08-24 14:51 ` [PATCH 2/2] Unify `update-index --cacheinfo` usage (tests) Vadim Sannikov via GitGitGadget
  0 siblings, 2 replies; 4+ messages in thread
From: Vadim Sannikov via GitGitGadget @ 2020-08-24 14:51 UTC (permalink / raw)
  To: git; +Cc: Vadim Sannikov

According to git-update-index manual page:

> --cacheinfo <mode>,<object>,<path>--cacheinfo <mode> <object> <path>
> Directly insert the specified info into the index. For backward
> compatibility, you can also give these three arguments as three separate
> parameters, but new users are encouraged to use a single-parameter form.

So, my commits change every old-style entry in code to the new format. It's
not entirely necessary, but it unifies --cacheinfo usage across the code.

Vadim Sannikov (2):
  Unify `update-index --cacheinfo` usage
  Unify `update-index --cacheinfo` usage (tests)

 git-merge-one-file.sh             |  6 +++---
 git-mergetool.sh                  |  2 +-
 merge-recursive.c                 |  2 +-
 po/bg.po                          |  4 ++--
 po/ca.po                          |  4 ++--
 po/de.po                          |  4 ++--
 po/el.po                          |  2 +-
 po/es.po                          |  4 ++--
 po/fr.po                          |  4 ++--
 po/git.pot                        |  2 +-
 po/it.po                          |  4 ++--
 po/ko.po                          |  4 ++--
 po/ru.po                          |  8 ++++++--
 po/sv.po                          |  4 ++--
 po/tr.po                          |  4 ++--
 po/vi.po                          |  4 ++--
 po/zh_CN.po                       |  4 ++--
 po/zh_TW.po                       |  4 ++--
 t/lib-submodule-update.sh         |  2 +-
 t/t0028-working-tree-encoding.sh  |  4 ++--
 t/t1006-cat-file.sh               |  2 +-
 t/t1010-mktree.sh                 |  2 +-
 t/t1050-large.sh                  |  2 +-
 t/t1450-fsck.sh                   |  4 ++--
 t/t3600-rm.sh                     |  4 ++--
 t/t5520-pull.sh                   |  2 +-
 t/t5526-fetch-submodules.sh       | 18 +++++++++---------
 t/t5531-deep-submodule-push.sh    |  2 +-
 t/t6130-pathspec-noglob.sh        |  2 +-
 t/t6430-merge-recursive.sh        |  2 +-
 t/t7003-filter-branch.sh          |  2 +-
 t/t7011-skip-worktree-reading.sh  |  4 ++--
 t/t7012-skip-worktree-writing.sh  |  4 ++--
 t/t7113-post-index-change-hook.sh |  2 +-
 t/t7406-submodule-update.sh       |  4 ++--
 t/t9350-fast-export.sh            |  8 ++++----
 t/test-lib-functions.sh           |  2 +-
 37 files changed, 73 insertions(+), 69 deletions(-)


base-commit: 675a4aaf3b226c0089108221b96559e0baae5de9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-708%2Fvadim-vj%2Fcacheinfo-modern-format-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-708/vadim-vj/cacheinfo-modern-format-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/708
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] Unify `update-index --cacheinfo` usage
  2020-08-24 14:51 [PATCH 0/2] Update update-index --cacheinfo entries' format Vadim Sannikov via GitGitGadget
@ 2020-08-24 14:51 ` Vadim Sannikov via GitGitGadget
  2020-08-24 18:51   ` Junio C Hamano
  2020-08-24 14:51 ` [PATCH 2/2] Unify `update-index --cacheinfo` usage (tests) Vadim Sannikov via GitGitGadget
  1 sibling, 1 reply; 4+ messages in thread
From: Vadim Sannikov via GitGitGadget @ 2020-08-24 14:51 UTC (permalink / raw)
  To: git; +Cc: Vadim Sannikov, Vadim Sannikov

From: Vadim Sannikov <vsj.vadim@gmail.com>

The old three separate parameters format (`<mode> <object> <path>`)
is replaced with the modern, single-parameter form
(`<mode>,<object>,<path>`).

Different parts of Git code use different syntax, so the commit unifies
it. According to `git-update-index` manual page, the new form is
preferred.

Signed-off-by: Vadim Sannikov <vsj.vadim@gmail.com>
---
 git-merge-one-file.sh | 6 +++---
 git-mergetool.sh      | 2 +-
 merge-recursive.c     | 2 +-
 po/bg.po              | 4 ++--
 po/ca.po              | 4 ++--
 po/de.po              | 4 ++--
 po/el.po              | 2 +-
 po/es.po              | 4 ++--
 po/fr.po              | 4 ++--
 po/git.pot            | 2 +-
 po/it.po              | 4 ++--
 po/ko.po              | 4 ++--
 po/ru.po              | 8 ++++++--
 po/sv.po              | 4 ++--
 po/tr.po              | 4 ++--
 po/vi.po              | 4 ++--
 po/zh_CN.po           | 4 ++--
 po/zh_TW.po           | 4 ++--
 18 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index f6d9852d2f..5691c4e7ff 100755
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
@@ -71,7 +71,7 @@ case "${1:-.}${2:-.}${3:-.}" in
 ".$2.")
 	# the other side did not add and we added so there is nothing
 	# to be done, except making the path merged.
-	exec git update-index --add --cacheinfo "$6" "$2" "$4"
+	exec git update-index --add --cacheinfo "$6","$2","$4"
 	;;
 "..$3")
 	echo "Adding $4"
@@ -80,7 +80,7 @@ case "${1:-.}${2:-.}${3:-.}" in
 		echo "ERROR: untracked $4 is overwritten by the merge." >&2
 		exit 1
 	fi
-	git update-index --add --cacheinfo "$7" "$3" "$4" &&
+	git update-index --add --cacheinfo "$7","$3","$4" &&
 		exec git checkout-index -u -f -- "$4"
 	;;
 
@@ -95,7 +95,7 @@ case "${1:-.}${2:-.}${3:-.}" in
 		exit 1
 	fi
 	echo "Adding $4"
-	git update-index --add --cacheinfo "$6" "$2" "$4" &&
+	git update-index --add --cacheinfo "$6","$2","$4" &&
 		exec git checkout-index -u -f -- "$4"
 	;;
 
diff --git a/git-mergetool.sh b/git-mergetool.sh
index e3f6d543fb..ad37b15f4b 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -224,7 +224,7 @@ stage_submodule () {
 	)
 	test -n "$work_rel_path" ||
 	die "fatal: unable to get path of module $path relative to work tree"
-	git update-index --add --replace --cacheinfo 160000 "$submodule_sha1" "${work_rel_path%/}" || die
+	git update-index --add --replace --cacheinfo 160000,"$submodule_sha1","${work_rel_path%/}" || die
 }
 
 checkout_staged_file () {
diff --git a/merge-recursive.c b/merge-recursive.c
index d0214335a7..dfe6f67ec8 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1259,7 +1259,7 @@ static int merge_submodule(struct merge_options *opt,
 		       "If this is correct simply add it to the index "
 		       "for example\n"
 		       "by using:\n\n"
-		       "  git update-index --cacheinfo 160000 %s \"%s\"\n\n"
+		       "  git update-index --cacheinfo 160000,%s,\"%s\"\n\n"
 		       "which will accept this suggestion.\n"),
 		       oid_to_hex(&merges.objects[0].item->oid), path);
 		break;
diff --git a/po/bg.po b/po/bg.po
index a189b16dc4..517c0e6b49 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -4737,13 +4737,13 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Ако това е така, добавете го към индекса с команда като следната:\n"
 "\n"
-"    git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "Това приема предложеното.\n"
 
diff --git a/po/ca.po b/po/ca.po
index c43c21bc22..61c3a7f9b0 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -4592,12 +4592,12 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Si això és correcte simplement afegiu-ho a l'índex per exemple utilitzant "
-"git update-index --cacheinfo 160000 per cents \"%s\" que acceptaran aquest "
+"  git update-index --cacheinfo 160000,%s,\"%s\" que acceptaran aquest "
 "suggeriment.\n"
 
 #: merge-recursive.c:1268
diff --git a/po/de.po b/po/de.po
index 656de24218..ec0106f2b8 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4641,14 +4641,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Falls das korrekt ist, fügen Sie es einfach der Staging-Area, zum Beispiel "
 "mit:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "hinzu, um diesen Vorschlag zu akzeptieren.\n"
 
diff --git a/po/el.po b/po/el.po
index 703f46d0c7..e775885187 100644
--- a/po/el.po
+++ b/po/el.po
@@ -3075,7 +3075,7 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
diff --git a/po/es.po b/po/es.po
index 41a72ca6fb..1c1aeebe47 100644
--- a/po/es.po
+++ b/po/es.po
@@ -4572,14 +4572,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Si esto es correcto simplemente agrégalo al índice por ejemplo\n"
 "usando:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "el cual aceptará esta sugerencia.\n"
 
diff --git a/po/fr.po b/po/fr.po
index d20fc440ab..157c41ff4c 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -4714,14 +4714,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Si c'est correct, ajoutez le simplement à l'index\n"
 "en utilisant par exemple :\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "qui acceptera cette suggestion.\n"
 
diff --git a/po/git.pot b/po/git.pot
index 198b6e0a4a..2d50bebf5a 100644
--- a/po/git.pot
+++ b/po/git.pot
@@ -4256,7 +4256,7 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
diff --git a/po/it.po b/po/it.po
index 53523e76df..c8264dd7bc 100644
--- a/po/it.po
+++ b/po/it.po
@@ -4649,14 +4649,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Se è corretta aggiungila semplicemente all'indice, ad esempio\n"
 "usando:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "per accettare questo suggerimento.\n"
 
diff --git a/po/ko.po b/po/ko.po
index dcfe21c223..47b611edee 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -2361,14 +2361,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "이 제안이 맞으면 인덱스에 추가하면 됩니다. 예를 들어\n"
 "다음 명령을 사용하면:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "제안을 받아들이게 됩니다.\n"
 
diff --git a/po/ru.po b/po/ru.po
index a77b462e62..a928cd879e 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -3523,10 +3523,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
-msgstr "Если оно верное, то просто добавьте его в индекс, например так:\n\n  git update-index --cacheinfo 160000 %s \"%s\"\n\nтем самым принимая это предположение.\n"
+msgstr "Если оно верное, то просто добавьте его в индекс, например так:\n"
+"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
+"\n"
+"тем самым принимая это предположение.\n"
 
 #: merge-recursive.c:1252
 #, c-format
diff --git a/po/sv.po b/po/sv.po
index 93f3c6f3f7..f5a850f0b7 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -4551,14 +4551,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Om detta är riktigt lägger du bara till det i indexet, till\n"
 "exempel så här:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "vilket godtar lösningen.\n"
 
diff --git a/po/tr.po b/po/tr.po
index 9a17c19b25..af5f9ba7f8 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -4619,13 +4619,13 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Eğer bu doğruysa yalnızca indekse ekleyin, örneğinbu öneriyi kabul edecek:\n"
 "\n"
-"\tgit update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "komutunu kullanmanız yeterlidir.\n"
 
diff --git a/po/vi.po b/po/vi.po
index d730cf1141..beec050125 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -4548,14 +4548,14 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "Nếu đây là đúng đơn giản thêm nó vào mục lục ví dụ\n"
 "bằng cách dùng:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "cái mà sẽ chấp nhận gợi ý này.\n"
 
diff --git a/po/zh_CN.po b/po/zh_CN.po
index a531819623..69dd29140b 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -4567,13 +4567,13 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "如果这个正确,将其添加到索引,例如使用命令:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "以接受此建议。\n"
 
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 9334b46faa..18e6b8985a 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -4692,13 +4692,13 @@ msgid ""
 "If this is correct simply add it to the index for example\n"
 "by using:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "which will accept this suggestion.\n"
 msgstr ""
 "如果這個正確,將其新增到索引,例如使用指令:\n"
 "\n"
-"  git update-index --cacheinfo 160000 %s \"%s\"\n"
+"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
 "\n"
 "以接受此建議。\n"
 
-- 
gitgitgadget


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Unify `update-index --cacheinfo` usage (tests)
  2020-08-24 14:51 [PATCH 0/2] Update update-index --cacheinfo entries' format Vadim Sannikov via GitGitGadget
  2020-08-24 14:51 ` [PATCH 1/2] Unify `update-index --cacheinfo` usage Vadim Sannikov via GitGitGadget
@ 2020-08-24 14:51 ` Vadim Sannikov via GitGitGadget
  1 sibling, 0 replies; 4+ messages in thread
From: Vadim Sannikov via GitGitGadget @ 2020-08-24 14:51 UTC (permalink / raw)
  To: git; +Cc: Vadim Sannikov, Vadim Sannikov

From: Vadim Sannikov <vsj.vadim@gmail.com>

The old three separate parameters format (`<mode> <object> <path>`)
is replaced with the modern, single-parameter form
(`<mode>,<object>,<path>`).

Different parts of Git code use different syntax, so the commit unifies
it. According to `git-update-index` manual page, the new form is
preferred.

Signed-off-by: Vadim Sannikov <vsj.vadim@gmail.com>
---
 t/lib-submodule-update.sh         |  2 +-
 t/t0028-working-tree-encoding.sh  |  4 ++--
 t/t1006-cat-file.sh               |  2 +-
 t/t1010-mktree.sh                 |  2 +-
 t/t1050-large.sh                  |  2 +-
 t/t1450-fsck.sh                   |  4 ++--
 t/t3600-rm.sh                     |  4 ++--
 t/t5520-pull.sh                   |  2 +-
 t/t5526-fetch-submodules.sh       | 18 +++++++++---------
 t/t5531-deep-submodule-push.sh    |  2 +-
 t/t6130-pathspec-noglob.sh        |  2 +-
 t/t6430-merge-recursive.sh        |  2 +-
 t/t7003-filter-branch.sh          |  2 +-
 t/t7011-skip-worktree-reading.sh  |  4 ++--
 t/t7012-skip-worktree-writing.sh  |  4 ++--
 t/t7113-post-index-change-hook.sh |  2 +-
 t/t7406-submodule-update.sh       |  4 ++--
 t/t9350-fast-export.sh            |  8 ++++----
 t/test-lib-functions.sh           |  2 +-
 19 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 87a759149f..75ce28a9c7 100644
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -139,7 +139,7 @@ create_lib_submodule_repo () {
 		git revert HEAD &&
 
 		git checkout -b invalid_sub1 add_sub1 &&
-		git update-index --cacheinfo 160000 $(test_oid numeric) sub1 &&
+		git update-index --cacheinfo 160000,$(test_oid numeric),sub1 &&
 		git commit -m "Invalid sub1 commit" &&
 		git checkout -b valid_sub1 &&
 		git revert HEAD &&
diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh
index bfc4fb9af5..aa4b719da0 100755
--- a/t/t0028-working-tree-encoding.sh
+++ b/t/t0028-working-tree-encoding.sh
@@ -213,7 +213,7 @@ test_expect_success 'error if encoding round trip is not the same during refresh
 	echo "*.utf16le text working-tree-encoding=utf-16le" >.gitattributes &&
 	echo "hallo" >nonsense.utf16le &&
 	TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&
-	git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&
+	git update-index --add --cacheinfo 100644,$TEST_HASH,nonsense.utf16le &&
 	COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
 	git update-ref refs/heads/master $COMMIT &&
 
@@ -229,7 +229,7 @@ test_expect_success 'error if encoding garbage is already in Git' '
 	# This simulates a Git version that has no checkoutEncoding support
 	cp nobom.utf16be.raw nonsense.utf16 &&
 	TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&
-	git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&
+	git update-index --add --cacheinfo 100644,$TEST_HASH,nonsense.utf16 &&
 	COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
 	git update-ref refs/heads/master $COMMIT &&
 
diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh
index 2f501d2dc9..b61b46eab4 100755
--- a/t/t1006-cat-file.sh
+++ b/t/t1006-cat-file.sh
@@ -134,7 +134,7 @@ run_tests 'blob' $hello_sha1 $hello_size "$hello_content" "$hello_content"
 
 test_expect_success '--batch-check without %(rest) considers whole line' '
 	echo "$hello_sha1 blob $hello_size" >expect &&
-	git update-index --add --cacheinfo 100644 $hello_sha1 "white space" &&
+	git update-index --add --cacheinfo 100644,$hello_sha1,"white space" &&
 	test_when_finished "git update-index --remove \"white space\"" &&
 	echo ":white space" | git cat-file --batch-check >actual &&
 	test_cmp expect actual
diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh
index b946f87686..558907af58 100755
--- a/t/t1010-mktree.sh
+++ b/t/t1010-mktree.sh
@@ -23,7 +23,7 @@ test_expect_success setup '
 	test_tick &&
 	git commit -q -m one &&
 	H=$(git rev-parse HEAD) &&
-	git update-index --add --cacheinfo 160000 $H sub &&
+	git update-index --add --cacheinfo 160000,$H,sub &&
 	test_tick &&
 	git commit -q -m two &&
 	git rev-parse HEAD^{tree} >tree.withsub &&
diff --git a/t/t1050-large.sh b/t/t1050-large.sh
index 61e89a8071..05d35d20d9 100755
--- a/t/t1050-large.sh
+++ b/t/t1050-large.sh
@@ -90,7 +90,7 @@ test_expect_success 'add a large file or two' '
 
 test_expect_success 'checkout a large file' '
 	large1=$(git rev-parse :large1) &&
-	git update-index --add --cacheinfo 100644 $large1 another &&
+	git update-index --add --cacheinfo 100644,$large1,another &&
 	git checkout another &&
 	test_cmp large1 another
 '
diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
index b17f5c21fb..643af25e3e 100755
--- a/t/t1450-fsck.sh
+++ b/t/t1450-fsck.sh
@@ -59,7 +59,7 @@ test_expect_success 'object with bad sha1' '
 	sha="$(dirname $new)$(basename $new)" &&
 	mv .git/objects/$old .git/objects/$new &&
 	test_when_finished "remove_object $sha" &&
-	git update-index --add --cacheinfo 100644 $sha foo &&
+	git update-index --add --cacheinfo 100644,$sha,foo &&
 	test_when_finished "git read-tree -u --reset HEAD" &&
 	tree=$(git write-tree) &&
 	test_when_finished "remove_object $tree" &&
@@ -438,7 +438,7 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
 	sha="$(dirname $new)$(basename $new)" &&
 	mv .git/objects/$old .git/objects/$new &&
 	test_when_finished "remove_object $sha" &&
-	git update-index --add --cacheinfo 100644 $sha foo &&
+	git update-index --add --cacheinfo 100644,$sha,foo &&
 	test_when_finished "git read-tree -u --reset HEAD" &&
 	tree=$(git write-tree) &&
 	test_when_finished "remove_object $tree" &&
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index efec8d13b6..a78a6b161b 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -305,7 +305,7 @@ EOF
 test_expect_success 'rm removes empty submodules from work tree' '
 	mkdir submod &&
 	hash=$(git rev-parse HEAD) &&
-	git update-index --add --cacheinfo 160000 "$hash" submod &&
+	git update-index --add --cacheinfo 160000,"$hash",submod &&
 	git config -f .gitmodules submodule.sub.url ./. &&
 	git config -f .gitmodules submodule.sub.path submod &&
 	git submodule init &&
@@ -632,7 +632,7 @@ test_expect_success 'setup subsubmodule' '
 	(
 		cd submod &&
 		hash=$(git rev-parse HEAD) &&
-		git update-index --add --cacheinfo 160000 "$hash" subsubmod &&
+		git update-index --add --cacheinfo 160000,"$hash",subsubmod &&
 		git config -f .gitmodules submodule.sub.url ../. &&
 		git config -f .gitmodules submodule.sub.path subsubmod &&
 		git submodule init &&
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 9fae07cdfa..3be5b64030 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -350,7 +350,7 @@ test_expect_success 'failed --rebase shows advice' '
 	git checkout -b diverging &&
 	test_commit attributes .gitattributes "* text=auto" attrs &&
 	sha1="$(printf "1\\r\\n" | git hash-object -w --stdin)" &&
-	git update-index --cacheinfo 0644 $sha1 file &&
+	git update-index --cacheinfo 0644,$sha1,file &&
 	git commit -m v1-with-cr &&
 	# force checkout because `git reset --hard` will not leave clean `file`
 	git checkout -f -b fails-to-rebase HEAD^ &&
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
index 63205dfdf9..470f470b3e 100755
--- a/t/t5526-fetch-submodules.sh
+++ b/t/t5526-fetch-submodules.sh
@@ -614,12 +614,12 @@ test_expect_success "fetch new submodule commits on-demand outside standard refs
 
 	C=$(git -C submodule commit-tree -m "new change outside refs/heads" HEAD^{tree}) &&
 	git -C submodule update-ref refs/changes/1 $C &&
-	git update-index --cacheinfo 160000 $C submodule &&
+	git update-index --cacheinfo 160000,$C,submodule &&
 	test_tick &&
 
 	D=$(git -C sub1 commit-tree -m "new change outside refs/heads" HEAD^{tree}) &&
 	git -C sub1 update-ref refs/changes/2 $D &&
-	git update-index --cacheinfo 160000 $D sub1 &&
+	git update-index --cacheinfo 160000,$D,sub1 &&
 
 	git commit -m "updated submodules outside of refs/heads" &&
 	E=$(git rev-parse HEAD) &&
@@ -638,12 +638,12 @@ test_expect_success 'fetch new submodule commit on-demand in FETCH_HEAD' '
 
 	C=$(git -C submodule commit-tree -m "another change outside refs/heads" HEAD^{tree}) &&
 	git -C submodule update-ref refs/changes/4 $C &&
-	git update-index --cacheinfo 160000 $C submodule &&
+	git update-index --cacheinfo 160000,$C,submodule &&
 	test_tick &&
 
 	D=$(git -C sub1 commit-tree -m "another change outside refs/heads" HEAD^{tree}) &&
 	git -C sub1 update-ref refs/changes/5 $D &&
-	git update-index --cacheinfo 160000 $D sub1 &&
+	git update-index --cacheinfo 160000,$D,sub1 &&
 
 	git commit -m "updated submodules outside of refs/heads" &&
 	E=$(git rev-parse HEAD) &&
@@ -669,12 +669,12 @@ test_expect_success 'fetch new submodule commits on-demand without .gitmodules e
 
 	C=$(git -C submodule commit-tree -m "yet another change outside refs/heads" HEAD^{tree}) &&
 	git -C submodule update-ref refs/changes/7 $C &&
-	git update-index --cacheinfo 160000 $C submodule &&
+	git update-index --cacheinfo 160000,$C,submodule &&
 	test_tick &&
 
 	D=$(git -C sub1 commit-tree -m "yet another change outside refs/heads" HEAD^{tree}) &&
 	git -C sub1 update-ref refs/changes/8 $D &&
-	git update-index --cacheinfo 160000 $D sub1 &&
+	git update-index --cacheinfo 160000,$D,sub1 &&
 
 	git commit -m "updated submodules outside of refs/heads" &&
 	E=$(git rev-parse HEAD) &&
@@ -696,15 +696,15 @@ test_expect_success 'fetch new submodule commit intermittently referenced by sup
 	F=$(git -C sub1 commit-tree -m "change 12 outside refs/heads" HEAD^{tree}) &&
 
 	git -C sub1 update-ref refs/changes/10 $D &&
-	git update-index --cacheinfo 160000 $D sub1 &&
+	git update-index --cacheinfo 160000,$D,sub1 &&
 	git commit -m "updated submodules outside of refs/heads" &&
 
 	git -C sub1 update-ref refs/changes/11 $E &&
-	git update-index --cacheinfo 160000 $E sub1 &&
+	git update-index --cacheinfo 160000,$E,sub1 &&
 	git commit -m "updated submodules outside of refs/heads" &&
 
 	git -C sub1 update-ref refs/changes/12 $F &&
-	git update-index --cacheinfo 160000 $F sub1 &&
+	git update-index --cacheinfo 160000,$F,sub1 &&
 	git commit -m "updated submodules outside of refs/heads" &&
 
 	G=$(git rev-parse HEAD) &&
diff --git a/t/t5531-deep-submodule-push.sh b/t/t5531-deep-submodule-push.sh
index 4ad059e6be..7b5dc2df00 100755
--- a/t/t5531-deep-submodule-push.sh
+++ b/t/t5531-deep-submodule-push.sh
@@ -301,7 +301,7 @@ test_expect_success 'push succeeds if submodule commit disabling recursion from
 test_expect_success 'submodule entry pointing at a tag is error' '
 	git -C work/gar/bage tag -a test1 -m "tag" &&
 	tag=$(git -C work/gar/bage rev-parse test1^{tag}) &&
-	git -C work update-index --cacheinfo 160000 "$tag" gar/bage &&
+	git -C work update-index --cacheinfo 160000,"$tag",gar/bage &&
 	git -C work commit -m "bad commit" &&
 	test_when_finished "git -C work reset --hard HEAD^" &&
 	test_must_fail git -C work push --recurse-submodules=on-demand ../pub.git master 2>err &&
diff --git a/t/t6130-pathspec-noglob.sh b/t/t6130-pathspec-noglob.sh
index ba7902c9cd..bd9cb80feb 100755
--- a/t/t6130-pathspec-noglob.sh
+++ b/t/t6130-pathspec-noglob.sh
@@ -11,7 +11,7 @@ test_expect_success 'create commits with glob characters' '
 	# on Windows (the tests below do not depend on the presence
 	# of the file in the worktree)
 	git config core.protectNTFS false &&
-	git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
+	git update-index --add --cacheinfo 100644,"$(git rev-parse HEAD:foo)","f*" &&
 	test_tick &&
 	git commit -m star &&
 	test_commit bracket "f[o][o]"
diff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh
index d48d211a95..c7766deb3a 100755
--- a/t/t6430-merge-recursive.sh
+++ b/t/t6430-merge-recursive.sh
@@ -246,7 +246,7 @@ test_expect_success 'setup 7' '
 	git rm d/e &&
 	test_tick &&
 	git commit -m "remove d/e" &&
-	git update-index --add --cacheinfo 160000 $c1 d &&
+	git update-index --add --cacheinfo 160000,$c1,d &&
 	test_tick &&
 	git commit -m "make d/ a submodule"
 '
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 36477cb1f4..49c7fff29e 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -467,7 +467,7 @@ test_expect_success 'replace submodule revision' '
 	git reset --hard original &&
 	git filter-branch -f --tree-filter \
 	    "if git ls-files --error-unmatch -- submod > /dev/null 2>&1
-	     then git update-index --cacheinfo 160000 $invalid submod
+	     then git update-index --cacheinfo 160000,$invalid,submod
 	     fi" HEAD &&
 	test $orig_head != $(git show-ref --hash --head HEAD)
 '
diff --git a/t/t7011-skip-worktree-reading.sh b/t/t7011-skip-worktree-reading.sh
index 37525cae3a..97f4cbedf5 100755
--- a/t/t7011-skip-worktree-reading.sh
+++ b/t/t7011-skip-worktree-reading.sh
@@ -26,7 +26,7 @@ EOF
 setup_absent() {
 	test -f 1 && rm 1
 	git update-index --remove 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
+	git update-index --add --cacheinfo 100644,$EMPTY_BLOB,1 &&
 	git update-index --skip-worktree 1
 }
 
@@ -40,7 +40,7 @@ test_absent() {
 setup_dirty() {
 	git update-index --force-remove 1 &&
 	echo dirty > 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
+	git update-index --add --cacheinfo 100644,$EMPTY_BLOB,1 &&
 	git update-index --skip-worktree 1
 }
 
diff --git a/t/t7012-skip-worktree-writing.sh b/t/t7012-skip-worktree-writing.sh
index 7476781979..1ad17d3606 100755
--- a/t/t7012-skip-worktree-writing.sh
+++ b/t/t7012-skip-worktree-writing.sh
@@ -56,7 +56,7 @@ test_expect_success 'read-tree removes worktree, dirty case' '
 setup_absent() {
 	test -f 1 && rm 1
 	git update-index --remove 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
+	git update-index --add --cacheinfo 100644,$EMPTY_BLOB,1 &&
 	git update-index --skip-worktree 1
 }
 
@@ -70,7 +70,7 @@ test_absent() {
 setup_dirty() {
 	git update-index --force-remove 1 &&
 	echo dirty > 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
+	git update-index --add --cacheinfo 100644,$EMPTY_BLOB,1 &&
 	git update-index --skip-worktree 1
 }
 
diff --git a/t/t7113-post-index-change-hook.sh b/t/t7113-post-index-change-hook.sh
index f011ad7eec..4272f542ca 100755
--- a/t/t7113-post-index-change-hook.sh
+++ b/t/t7113-post-index-change-hook.sh
@@ -132,7 +132,7 @@ test_expect_success 'test reset --mixed and update-index triggers the hook' '
 	test_path_is_file testsuccess && rm -f testsuccess &&
 	test_path_is_missing testfailure &&
 	git hash-object -w --stdin <dir1/file2.txt >expect &&
-	git update-index --cacheinfo 100644 "$(cat expect)" dir1/file1.txt &&
+	git update-index --cacheinfo 100644,"$(cat expect)",dir1/file1.txt &&
 	test_path_is_file testsuccess && rm -f testsuccess &&
 	test_path_is_missing testfailure &&
 	git update-index --skip-worktree dir1/file2.txt &&
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index aa19ff3a2e..404353d411 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -517,7 +517,7 @@ test_expect_success 'submodule init does not copy command into .git/config' '
 	 git ls-files -s submodule >out &&
 	 H=$(cut -d" " -f2 out) &&
 	 mkdir submodule1 &&
-	 git update-index --add --cacheinfo 160000 $H submodule1 &&
+	 git update-index --add --cacheinfo 160000,$H,submodule1 &&
 	 git config -f .gitmodules submodule.submodule1.path submodule1 &&
 	 git config -f .gitmodules submodule.submodule1.url ../submodule &&
 	 git config -f .gitmodules submodule.submodule1.update !false &&
@@ -928,7 +928,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '
 	 git rm --cached submodule2 &&
 	 rm -rf submodule2 &&
 	 mkdir -p "moved/sub module" &&
-	 git update-index --add --cacheinfo 160000 $H "moved/sub module" &&
+	 git update-index --add --cacheinfo 160000,$H,"moved/sub module" &&
 	 git config -f .gitmodules submodule.submodule2.path "moved/sub module" &&
 	 git commit -am "post move" &&
 	 git submodule update &&
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 1372842559..9135b75e2e 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -604,10 +604,10 @@ test_expect_success 'fast-export quotes pathnames' '
 	(cd crazy-paths &&
 	 blob=$(echo foo | git hash-object -w --stdin) &&
 	 git -c core.protectNTFS=false update-index --add \
-		--cacheinfo 100644 $blob "$(printf "path with\\nnewline")" \
-		--cacheinfo 100644 $blob "path with \"quote\"" \
-		--cacheinfo 100644 $blob "path with \\backslash" \
-		--cacheinfo 100644 $blob "path with space" &&
+		--cacheinfo 100644,$blob,"$(printf "path with\\nnewline")" \
+		--cacheinfo 100644,$blob,"path with \"quote\"" \
+		--cacheinfo 100644,$blob,"path with \\backslash" \
+		--cacheinfo 100644,$blob,"path with space" &&
 	 git commit -m addition &&
 	 git ls-files -z -s | perl -0pe "s{\\t}{$&subdir/}" >index &&
 	 git read-tree --empty &&
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 6a8e194a99..dc5e9af6c6 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -1230,7 +1230,7 @@ test_ln_s_add () {
 	else
 		printf '%s' "$1" >"$2" &&
 		ln_s_obj=$(git hash-object -w "$2") &&
-		git update-index --add --cacheinfo 120000 $ln_s_obj "$2" &&
+		git update-index --add --cacheinfo 120000,$ln_s_obj,"$2" &&
 		# pick up stat info from the file
 		git update-index "$2"
 	fi
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Unify `update-index --cacheinfo` usage
  2020-08-24 14:51 ` [PATCH 1/2] Unify `update-index --cacheinfo` usage Vadim Sannikov via GitGitGadget
@ 2020-08-24 18:51   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2020-08-24 18:51 UTC (permalink / raw)
  To: Vadim Sannikov via GitGitGadget; +Cc: git, Vadim Sannikov

"Vadim Sannikov via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Subject: Re: [PATCH 1/2] Unify `update-index --cacheinfo` usage

Perhaps

	update-index: use single-argument form of --cacheinfo

see Documentation/SubmittingPatches[[summary-section]]

> Different parts of Git code use different syntax, so the commit unifies
> it. According to `git-update-index` manual page, the new form is
> preferred.

It is _encouraged_ to new users, but it is not like the old form is
getting removed.  IOW, there is no strong "preference".

	The "--cacheinfo" option of "update-index" can take two
	forms, but we encourage new users to use the form where the
	mode, object, and path are concatenated with a comma, into a
	single parameter.  Update the in-tree users of the command
	to also use the form to help new users who may want to copy
	and paste from our code.

or something?

This step is good, but it is not welcome to change the tests in such
a way that the three-separate-parameter form is not tested at all.
As long as we have tests to ensure the single-parameter form works
OK, no change is needed.

Thanks.

> Signed-off-by: Vadim Sannikov <vsj.vadim@gmail.com>
> ---
>  git-merge-one-file.sh | 6 +++---
>  git-mergetool.sh      | 2 +-
>  merge-recursive.c     | 2 +-
>  po/bg.po              | 4 ++--
>  po/ca.po              | 4 ++--
>  po/de.po              | 4 ++--
>  po/el.po              | 2 +-
>  po/es.po              | 4 ++--
>  po/fr.po              | 4 ++--
>  po/git.pot            | 2 +-
>  po/it.po              | 4 ++--
>  po/ko.po              | 4 ++--
>  po/ru.po              | 8 ++++++--
>  po/sv.po              | 4 ++--
>  po/tr.po              | 4 ++--
>  po/vi.po              | 4 ++--
>  po/zh_CN.po           | 4 ++--
>  po/zh_TW.po           | 4 ++--
>  18 files changed, 37 insertions(+), 33 deletions(-)
>
> diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
> index f6d9852d2f..5691c4e7ff 100755
> --- a/git-merge-one-file.sh
> +++ b/git-merge-one-file.sh
> @@ -71,7 +71,7 @@ case "${1:-.}${2:-.}${3:-.}" in
>  ".$2.")
>  	# the other side did not add and we added so there is nothing
>  	# to be done, except making the path merged.
> -	exec git update-index --add --cacheinfo "$6" "$2" "$4"
> +	exec git update-index --add --cacheinfo "$6","$2","$4"
>  	;;
>  "..$3")
>  	echo "Adding $4"
> @@ -80,7 +80,7 @@ case "${1:-.}${2:-.}${3:-.}" in
>  		echo "ERROR: untracked $4 is overwritten by the merge." >&2
>  		exit 1
>  	fi
> -	git update-index --add --cacheinfo "$7" "$3" "$4" &&
> +	git update-index --add --cacheinfo "$7","$3","$4" &&
>  		exec git checkout-index -u -f -- "$4"
>  	;;
>  
> @@ -95,7 +95,7 @@ case "${1:-.}${2:-.}${3:-.}" in
>  		exit 1
>  	fi
>  	echo "Adding $4"
> -	git update-index --add --cacheinfo "$6" "$2" "$4" &&
> +	git update-index --add --cacheinfo "$6","$2","$4" &&
>  		exec git checkout-index -u -f -- "$4"
>  	;;
>  
> diff --git a/git-mergetool.sh b/git-mergetool.sh
> index e3f6d543fb..ad37b15f4b 100755
> --- a/git-mergetool.sh
> +++ b/git-mergetool.sh
> @@ -224,7 +224,7 @@ stage_submodule () {
>  	)
>  	test -n "$work_rel_path" ||
>  	die "fatal: unable to get path of module $path relative to work tree"
> -	git update-index --add --replace --cacheinfo 160000 "$submodule_sha1" "${work_rel_path%/}" || die
> +	git update-index --add --replace --cacheinfo 160000,"$submodule_sha1","${work_rel_path%/}" || die
>  }
>  
>  checkout_staged_file () {
> diff --git a/merge-recursive.c b/merge-recursive.c
> index d0214335a7..dfe6f67ec8 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -1259,7 +1259,7 @@ static int merge_submodule(struct merge_options *opt,
>  		       "If this is correct simply add it to the index "
>  		       "for example\n"
>  		       "by using:\n\n"
> -		       "  git update-index --cacheinfo 160000 %s \"%s\"\n\n"
> +		       "  git update-index --cacheinfo 160000,%s,\"%s\"\n\n"
>  		       "which will accept this suggestion.\n"),
>  		       oid_to_hex(&merges.objects[0].item->oid), path);
>  		break;
> diff --git a/po/bg.po b/po/bg.po
> index a189b16dc4..517c0e6b49 100644
> --- a/po/bg.po
> +++ b/po/bg.po
> @@ -4737,13 +4737,13 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Ако това е така, добавете го към индекса с команда като следната:\n"
>  "\n"
> -"    git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "Това приема предложеното.\n"
>  
> diff --git a/po/ca.po b/po/ca.po
> index c43c21bc22..61c3a7f9b0 100644
> --- a/po/ca.po
> +++ b/po/ca.po
> @@ -4592,12 +4592,12 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Si això és correcte simplement afegiu-ho a l'índex per exemple utilitzant "
> -"git update-index --cacheinfo 160000 per cents \"%s\" que acceptaran aquest "
> +"  git update-index --cacheinfo 160000,%s,\"%s\" que acceptaran aquest "
>  "suggeriment.\n"
>  
>  #: merge-recursive.c:1268
> diff --git a/po/de.po b/po/de.po
> index 656de24218..ec0106f2b8 100644
> --- a/po/de.po
> +++ b/po/de.po
> @@ -4641,14 +4641,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Falls das korrekt ist, fügen Sie es einfach der Staging-Area, zum Beispiel "
>  "mit:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "hinzu, um diesen Vorschlag zu akzeptieren.\n"
>  
> diff --git a/po/el.po b/po/el.po
> index 703f46d0c7..e775885187 100644
> --- a/po/el.po
> +++ b/po/el.po
> @@ -3075,7 +3075,7 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
> diff --git a/po/es.po b/po/es.po
> index 41a72ca6fb..1c1aeebe47 100644
> --- a/po/es.po
> +++ b/po/es.po
> @@ -4572,14 +4572,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Si esto es correcto simplemente agrégalo al índice por ejemplo\n"
>  "usando:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "el cual aceptará esta sugerencia.\n"
>  
> diff --git a/po/fr.po b/po/fr.po
> index d20fc440ab..157c41ff4c 100644
> --- a/po/fr.po
> +++ b/po/fr.po
> @@ -4714,14 +4714,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Si c'est correct, ajoutez le simplement à l'index\n"
>  "en utilisant par exemple :\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "qui acceptera cette suggestion.\n"
>  
> diff --git a/po/git.pot b/po/git.pot
> index 198b6e0a4a..2d50bebf5a 100644
> --- a/po/git.pot
> +++ b/po/git.pot
> @@ -4256,7 +4256,7 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
> diff --git a/po/it.po b/po/it.po
> index 53523e76df..c8264dd7bc 100644
> --- a/po/it.po
> +++ b/po/it.po
> @@ -4649,14 +4649,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Se è corretta aggiungila semplicemente all'indice, ad esempio\n"
>  "usando:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "per accettare questo suggerimento.\n"
>  
> diff --git a/po/ko.po b/po/ko.po
> index dcfe21c223..47b611edee 100644
> --- a/po/ko.po
> +++ b/po/ko.po
> @@ -2361,14 +2361,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "이 제안이 맞으면 인덱스에 추가하면 됩니다. 예를 들어\n"
>  "다음 명령을 사용하면:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "제안을 받아들이게 됩니다.\n"
>  
> diff --git a/po/ru.po b/po/ru.po
> index a77b462e62..a928cd879e 100644
> --- a/po/ru.po
> +++ b/po/ru.po
> @@ -3523,10 +3523,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
> -msgstr "Если оно верное, то просто добавьте его в индекс, например так:\n\n  git update-index --cacheinfo 160000 %s \"%s\"\n\nтем самым принимая это предположение.\n"
> +msgstr "Если оно верное, то просто добавьте его в индекс, например так:\n"
> +"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
> +"\n"
> +"тем самым принимая это предположение.\n"
>  
>  #: merge-recursive.c:1252
>  #, c-format
> diff --git a/po/sv.po b/po/sv.po
> index 93f3c6f3f7..f5a850f0b7 100644
> --- a/po/sv.po
> +++ b/po/sv.po
> @@ -4551,14 +4551,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Om detta är riktigt lägger du bara till det i indexet, till\n"
>  "exempel så här:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "vilket godtar lösningen.\n"
>  
> diff --git a/po/tr.po b/po/tr.po
> index 9a17c19b25..af5f9ba7f8 100644
> --- a/po/tr.po
> +++ b/po/tr.po
> @@ -4619,13 +4619,13 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Eğer bu doğruysa yalnızca indekse ekleyin, örneğinbu öneriyi kabul edecek:\n"
>  "\n"
> -"\tgit update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "komutunu kullanmanız yeterlidir.\n"
>  
> diff --git a/po/vi.po b/po/vi.po
> index d730cf1141..beec050125 100644
> --- a/po/vi.po
> +++ b/po/vi.po
> @@ -4548,14 +4548,14 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "Nếu đây là đúng đơn giản thêm nó vào mục lục ví dụ\n"
>  "bằng cách dùng:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "cái mà sẽ chấp nhận gợi ý này.\n"
>  
> diff --git a/po/zh_CN.po b/po/zh_CN.po
> index a531819623..69dd29140b 100644
> --- a/po/zh_CN.po
> +++ b/po/zh_CN.po
> @@ -4567,13 +4567,13 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "如果这个正确,将其添加到索引,例如使用命令:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "以接受此建议。\n"
>  
> diff --git a/po/zh_TW.po b/po/zh_TW.po
> index 9334b46faa..18e6b8985a 100644
> --- a/po/zh_TW.po
> +++ b/po/zh_TW.po
> @@ -4692,13 +4692,13 @@ msgid ""
>  "If this is correct simply add it to the index for example\n"
>  "by using:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "which will accept this suggestion.\n"
>  msgstr ""
>  "如果這個正確,將其新增到索引,例如使用指令:\n"
>  "\n"
> -"  git update-index --cacheinfo 160000 %s \"%s\"\n"
> +"  git update-index --cacheinfo 160000,%s,\"%s\"\n"
>  "\n"
>  "以接受此建議。\n"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-24 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 14:51 [PATCH 0/2] Update update-index --cacheinfo entries' format Vadim Sannikov via GitGitGadget
2020-08-24 14:51 ` [PATCH 1/2] Unify `update-index --cacheinfo` usage Vadim Sannikov via GitGitGadget
2020-08-24 18:51   ` Junio C Hamano
2020-08-24 14:51 ` [PATCH 2/2] Unify `update-index --cacheinfo` usage (tests) Vadim Sannikov via GitGitGadget

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).