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

Re: [PATCH v3 0/8] refs: add reflog support to `git refs migrate`

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2024, 23:54 UTC
Message-ID
<xmqq34io8ptl.fsf@gitster.g>
In-Reply-To
<20241215-320-git-refs-migrate-reflogs-v3-0-4127fe707b98@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 5 quoted lines
> Overall, this series is a bit more involved, and I would appreciate it
> if it receives a bit more scrutiny.
>
> The series is based on top of e66fd72e97 (The fourteenth batch,
> 2024-12-06) with `kn/reftable-writer-log-write-verify` merged in.

t1460.6 does not pass for me. I noticed it after I merged it to 'seen', but it fails standalone as well.

  $ git log --first-parent --boundary master..kn/reflog-migration
  65a841566a refs: add support for migrating reflogs
  44ffb130f3 refs: allow multiple reflog entries for the same refname
  6134624eaf refs: introduce the `ref_transaction_update_reflog` function
  65a73fce30 refs: add `committer_info` to `ref_transaction_add_update()`
  5ed33e32c7 refs: extract out refname verification in transactions
  e9851924a2 refs/files: add count field to ref_lock
  cdfa2c379a refs: add `index` field to `struct ref_udpate`
  ee4d52c7f2 refs: include committer info in `ref_update` struct
  df5d7a7ba5 Merge branch 'kn/reftable-writer-log-write-verify' into kn/reflog-migration
  - 49c6b912e2 reftable/writer: ensure valid range for log's update_index
  - e66fd72e97 The fourteenth batch

... ok 5 - files: migration to same format fails

expecting success of 1460.6 'files -> reftable: migration with worktree fails':
                        test_when_finished "rm -rf repo" &&
                        git init --ref-format=$from_format repo &&
                        git -C repo worktree add wt &&
                        test_must_fail git -C repo refs migrate \
                                --ref-format=$to_format 2>err &&
                        cat >expect <<-EOF &&
                        error: migrating repositories with worktrees is not supported yet
                        EOF
                        test_cmp expect err
++ test_when_finished 'rm -rf repo'
++ test 0 = 0
++ test_cleanup='{ rm -rf repo
                } && (exit "$eval_ret"); eval_ret=$?; :'
++ git init --ref-format=files repo
Initialized empty Git repository in /home/gitster/w/git.git/t/trash directory.t1460-refs-migrate/repo/.git/
++ git -C repo worktree add wt
No possible source branch, inferring '--orphan'
Preparing worktree (new branch 'wt')
++ test_must_fail git -C repo refs migrate --ref-format=reftable
++ case "$1" in
++ _test_ok=
++ test_must_fail_acceptable git -C repo refs migrate --ref-format=reftable
++ test git = env
++ test git = nongit
++ case "$1" in
++ return 0
++ git -C repo refs migrate --ref-format=reftable
/home/gitster/w/git.git/t/test-lib-functions.sh: line 1175: 3403665 Aborted                 "$@" 2>&7
++ exit_code=134
++ test 134 -eq 0
++ test_match_signal 13 134
++ test 134 = 141
++ test 134 = 269
++ return 1
++ test 134 -gt 129
++ test 134 -le 192
++ echo 'test_must_fail: died by signal 6: git -C repo refs migrate --ref-format=reftable'
test_must_fail: died by signal 6: git -C repo refs migrate --ref-format=reftable
++ return 1
error: last command exited with $?=1
not ok 6 - files -> reftable: migration with worktree fails
#
#                               test_when_finished "rm -rf repo" &&
#                               git init --ref-format=$from_format repo &&
#                               git -C repo worktree add wt &&
#                               test_must_fail git -C repo refs migrate \
#                                       --ref-format=$to_format 2>err &&
#                               cat >expect <<-EOF &&
#                               error: migrating repositories with worktrees is not supported yet
#                               EOF
#                               test_cmp expect err
#
1..6
Previous: karthik nayakNext: karthik nayak
Message 33 of 63 in “refs: add reflog support to `git refs migrate`”
  1. 0/8 refs: add reflog support to `git refs migrate`Karthik Nayak, Dec 13, 2024
  2. 1/8 refs: include committer info in `ref_update` structKarthik Nayak, Dec 13, 2024
  3. 2/8 refs: add `index` field to `struct ref_udpate`Karthik Nayak, Dec 13, 2024
  4. 3/8 refs/files: add count field to ref_lockKarthik Nayak, Dec 13, 2024
  5. 4/8 refs: extract out refname verification in transactionsKarthik Nayak, Dec 13, 2024
  6. 5/8 refs: add `committer_info` to `ref_transaction_add_update()`Karthik Nayak, Dec 13, 2024
  7. Patrick SteinhardtDec 13, 2024
  8. karthik nayakDec 13, 2024
  9. Toon ClaesDec 19, 2024
  10. karthik nayakDec 20, 2024
  11. 6/8 refs: introduce the `ref_transaction_update_reflog` functionKarthik Nayak, Dec 13, 2024
  12. Christian CouderDec 13, 2024
  13. karthik nayakDec 13, 2024
  14. Patrick SteinhardtDec 13, 2024
  15. 7/8 refs: allow multiple reflog entries for the same refnameKarthik Nayak, Dec 13, 2024
  16. Patrick SteinhardtDec 13, 2024
  17. karthik nayakDec 13, 2024
  18. 8/8 refs: add support for migrating reflogsKarthik Nayak, Dec 13, 2024
  19. Patrick SteinhardtDec 13, 2024
  20. karthik nayakDec 15, 2024
  21. 0/8 refs: add reflog support to `git refs migrate`Karthik Nayak, Dec 15, 2024
  22. 1/8 refs: include committer info in `ref_update` structKarthik Nayak, Dec 15, 2024
  23. 2/8 refs: add `index` field to `struct ref_udpate`Karthik Nayak, Dec 15, 2024
  24. 3/8 refs/files: add count field to ref_lockKarthik Nayak, Dec 15, 2024
  25. 4/8 refs: extract out refname verification in transactionsKarthik Nayak, Dec 15, 2024
  26. 5/8 refs: add `committer_info` to `ref_transaction_add_update()`Karthik Nayak, Dec 15, 2024
  27. 6/8 refs: introduce the `ref_transaction_update_reflog` functionKarthik Nayak, Dec 15, 2024
  28. 7/8 refs: allow multiple reflog entries for the same refnameKarthik Nayak, Dec 15, 2024
  29. 8/8 refs: add support for migrating reflogsKarthik Nayak, Dec 15, 2024
  30. Patrick SteinhardtDec 16, 2024
  31. Junio C HamanoDec 16, 2024
  32. karthik nayakDec 16, 2024
  33. Junio C HamanoDec 15, 2024
  34. karthik nayakDec 16, 2024
  35. Junio C HamanoDec 16, 2024
  36. 0/8 refs: add reflog support to `git refs migrate`Karthik Nayak, Dec 16, 2024
  37. 1/8 refs: include committer info in `ref_update` structKarthik Nayak, Dec 16, 2024
  38. 2/8 refs: add `index` field to `struct ref_udpate`Karthik Nayak, Dec 16, 2024
  39. Toon ClaesDec 19, 2024
  40. karthik nayakDec 20, 2024
  41. 3/8 refs/files: add count field to ref_lockKarthik Nayak, Dec 16, 2024
  42. 4/8 refs: extract out refname verification in transactionsKarthik Nayak, Dec 16, 2024
  43. Toon ClaesDec 19, 2024
  44. karthik nayakDec 20, 2024
  45. 5/8 refs: add `committer_info` to `ref_transaction_add_update()`Karthik Nayak, Dec 16, 2024
  46. Toon ClaesDec 19, 2024
  47. karthik nayakDec 20, 2024
  48. 6/8 refs: introduce the `ref_transaction_update_reflog` functionKarthik Nayak, Dec 16, 2024
  49. Toon ClaesDec 19, 2024
  50. Junio C HamanoDec 19, 2024
  51. karthik nayakDec 20, 2024
  52. refs: mark invalid refname message for translationKarthik Nayak, Dec 20, 2024
  53. Junio C HamanoDec 20, 2024
  54. Toon ClaesDec 24, 2024
  55. 7/8 refs: allow multiple reflog entries for the same refnameKarthik Nayak, Dec 16, 2024
  56. Toon ClaesDec 19, 2024
  57. karthik nayakDec 20, 2024
  58. 8/8 refs: add support for migrating reflogsKarthik Nayak, Dec 16, 2024
  59. Patrick SteinhardtDec 17, 2024
  60. karthik nayakDec 17, 2024
  61. Junio C HamanoDec 17, 2024
  62. Toon ClaesDec 19, 2024
  63. karthik nayakDec 20, 2024

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.