git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/3] branch: add a --copy to go with --move

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2017, 00:37 UTC
Message-ID
<xmqq60f6h03t.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170705231454.15666-1-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 5 quoted lines
> Even though this modifies some of the same files as
> mh/packed-ref-store it looks to me like this doesn't conflict with
> that topic in any meaningful way, but I may be missing something. I
> can't get a merge between this & gitster/mh/packed-ref-store
> compiling,...

That is because each ref backend is required to implement a new method by that topic. The following patch needs to be squashed in while merging the two topics, making the resulting commit an evil merge.

FWIW, the result of applying these three patches on 'master' and merging the result to a commit on 'pu' that is just before the merge of previous round of the same topic, with the attached fix-up, exactly matches the commit on 'pu' that merges the previous round, iow, I see there is no meaningful change (perhaps other than log message? I didn't check) in this new round.

Note that I am not complaining that this new round does not bring any improvements---I am not commending that you didn't screw up while rebasing to a new commit, either ;-).

diff --git b/refs/packed-backend.c a/refs/packed-backend.c
index dc09012300..96f9141656 100644
--- b/refs/packed-backend.c
+++ a/refs/packed-backend.c
@@ -794,6 +794,13 @@ static int packed_rename_ref(struct ref_store *ref_store,
 	die("BUG: packed reference store does not support renaming references");
 }
 
+static int packed_copy_ref(struct ref_store *ref_store,
+			   const char *oldrefname, const char *newrefname,
+			   const char *logmsg)
+{
+	die("BUG: packed reference store does not support copying references");
+}
+
 static struct ref_iterator *packed_reflog_iterator_begin(struct ref_store *ref_store)
 {
 	return empty_ref_iterator_begin();
@@ -859,6 +866,7 @@ struct ref_storage_be refs_be_packed = {
 	packed_create_symref,
 	packed_delete_refs,
 	packed_rename_ref,
+	packed_copy_ref,
 
 	packed_ref_iterator_begin,
 	packed_read_raw_ref,
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 9 of 14 in “What's cooking in git.git (Jul 2017, #01; Wed, 5)”
  1. Junio C HamanoJul 5, 2017
  2. Stefan BellerJul 5, 2017
  3. Junio C HamanoJul 7, 2017
  4. Stefan BellerJul 10, 2017
  5. 0/3 branch: add a --copy to go with --moveÆvar Arnfjörð Bjarmason, Jul 5, 2017
  6. 1/3 config: create a function to format section headersÆvar Arnfjörð Bjarmason, Jul 5, 2017
  7. 2/3 branch: add test for -m renaming multiple config sectionsÆvar Arnfjörð Bjarmason, Jul 5, 2017
  8. 3/3 branch: add a --copy (-c) option to go with --move (-m)Ævar Arnfjörð Bjarmason, Jul 5, 2017
  9. Junio C HamanoJul 6, 2017
  10. 4/3 branch: fix "copy" to never touch HEADJunio C Hamano, Sep 22, 2017
  11. Brandon WilliamsSep 22, 2017
  12. Ævar Arnfjörð BjarmasonSep 26, 2017
  13. Junio C HamanoSep 27, 2017
  14. Ævar Arnfjörð BjarmasonSep 29, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.