git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Vadim Sannikov via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Vadim Sannikov <vsj.vadim@gmail.com>,
	Vadim Sannikov <vsj.vadim@gmail.com>
Subject: [PATCH 1/2] Unify `update-index --cacheinfo` usage
Date: Mon, 24 Aug 2020 14:51:42 +0000	[thread overview]
Message-ID: <fc2138e1db2de46793100b87c00dbde270f6b350.1598280704.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.708.git.1598280703.gitgitgadget@gmail.com>

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


  reply	other threads:[~2020-08-24 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-08-24 18:51   ` [PATCH 1/2] Unify `update-index --cacheinfo` usage Junio C Hamano
2020-08-24 14:51 ` [PATCH 2/2] Unify `update-index --cacheinfo` usage (tests) Vadim Sannikov via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc2138e1db2de46793100b87c00dbde270f6b350.1598280704.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=vsj.vadim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).