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

git refs migrate does not migrate stash entries

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 22, 2025, 02:09 UTC
Message-ID
<Z5BTQRlsOj1sygun@tapette.crustytoothpaste.net>

After the recent fix for reflog migrations posted to the list, I converted two work repositories. Unfortunately, it doesn't appear as though the reflog for `refs/stash` was converted, so I think I may have lost my stashes. While I would have liked to retain them, fortunately they were not essential in these repos and I can live without them, but we probably do want to fix this issue since users in general will want to maintain them.

Here's a shell script that reproduces the problem on the latest `next`: ---- #!/bin/sh -e

rm -fr test-repo git version git init -b dev test-repo cd test-repo touch abc.txt git add abc.txt git commit -m + echo abc >abc.txt git stash git show stash@{0} git stash list -p

echo "Converting..." git refs migrate --ref-format=reftable

echo "Now using reftable."

git stash show git show stash@{0} git stash list -p ----

My expectation is that the script exits 0 and prints the stashes a second time, but it exits early and unsuccessfully and the stashes don't appear to be preserved. It does appear to work correctly if you comment out the `git refs migrate` command.

I would have liked to have done more investigation, but I'm dealing with some administrivia in my personal life that has taken up more of my evenings than I would have liked, so I have not done so.

I also apologize for sending a constant barrage of bug reports that might make it seem like I'm dissatisfied with the work on reftable, when in fact that's not the case and I do very much appreciate the work being done. I did promise Patrick that I'd try it out and be the guinea pig, and so I'm doing so. I'm excited to see it end up in its final state.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Next: Karthik Nayak
Message 1 of 2 in “git refs migrate does not migrate stash entries”
  1. brian m. carlsonJan 22, 2025
  2. Karthik NayakJan 22, 2025

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.