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

Re: [PATCH v2] commit,shallow: unparse commits if grafts changed

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jun 3, 2022, 15:26 UTC
Message-ID
<20220603152649.486683-1-jonathantanmy@google.com>
In-Reply-To
<220603.86k09yxf4z.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 13 quoted lines
> Are we going to have the same issue with tags, c.f. parse_tag() and
> there being no unparse_tag()?
> 
> (I don't know offhand, just asking)
> 
> I have some semi-related (test) changes locally where we do have blind
> spots in tag v.s. commit parsing semi-related to this, i.e. in the whole
> "unparsed" stage.
> 
> So I wonder what happens with a tag that's pointing to a shallow object
> that's parsed, but its underlying commit becomes un-parsed.
> 
> Or maybe that's impossible, I'm not too familiar with "shallow"...
As Stolee said, grafts (and shallow) are only on commits.
[1] https://lore.kernel.org/git/394c054e-e1d2-41a5-a655-2ad3cb7219e0@github.com/
Show 15 quoted lines
> Nit: Can this be
> e.g. s/repo-with-unreachable-upstream-shallow/repo/. The overly long
> repo name makes this much harder to follow. Compare this one which would
> clean up after itself too:
> 
> 	test_when_finished "rm -rf repo" && 
> 	git init repo &&
> 	git -C repo submodule add ../a-submodule a-submodule &&
> 	git -C repo commit -m "added submodule" &&
> 
> 	SHALLOW=$(cat shallow/.git/shallow) &&
> 	git -C repo fetch --update-shallow ../shallow/.git "$SHALLOW":refs/heads/a-shallow
> 
> (I didn't check if that test really works, i.e. do we have a "repo"
> already, but you get the idea...

Yes I can do that. I'll see if there are any more comments and send out a new version after the weekend.

Previous: Jonathan TanNext: Jonathan Tan
Message 15 of 16 in “commit-reach: do not parse and iterate minima”
  1. commit-reach: do not parse and iterate minimaJonathan Tan, Mar 23, 2022
  2. Junio C HamanoMar 23, 2022
  3. Derrick StoleeMar 24, 2022
  4. Taylor BlauMar 24, 2022
  5. Derrick StoleeMar 25, 2022
  6. Jonathan TanMar 24, 2022
  7. Bagas SanjayaMar 24, 2022
  8. Jonathan TanMar 24, 2022
  9. Derrick StoleeMar 24, 2022
  10. Jonathan TanMar 24, 2022
  11. commit,shallow: unparse commits if grafts changedJonathan Tan, Jun 2, 2022
  12. Ævar Arnfjörð BjarmasonJun 3, 2022
  13. Derrick StoleeJun 3, 2022
  14. Jonathan TanJun 3, 2022
  15. Jonathan TanJun 3, 2022
  16. commit,shallow: unparse commits if grafts changedJonathan Tan, Jun 6, 2022

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.