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

Re: [PATCH v2] commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 24, 2023, 11:07 UTC
Message-ID
<ZWCD-cDbhTCU0aU-@tanuki>
In-Reply-To
<xmqq7cm8bsny.fsf@gitster.g>
On Thu, Nov 23, 2023 at 08:44:33PM +0900, Junio C Hamano wrote:
Show 27 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > Note that this requires us to amend some tests to manually turn on the
> > paranoid checks again. This is because we cause repository corruption by
> > manually deleting objects which are part of the commit graph already.
> > These circumstances shouldn't usually happen in repositories.
> > ...
> > diff --git a/t/t6022-rev-list-missing.sh b/t/t6022-rev-list-missing.sh
> > index 40265a4f66..1ca4eb5a36 100755
> > --- a/t/t6022-rev-list-missing.sh
> > +++ b/t/t6022-rev-list-missing.sh
> > @@ -13,6 +13,11 @@ test_expect_success 'create repository and alternate directory' '
> >  	test_commit 3
> >  '
> >  
> > +# We manually corrupt the repository, which means that the commit-graph may
> > +# contain references to already-deleted objects. We thus need to enable
> > +# commit-graph paranoia to not returned these deleted commits from the graph.
> > +export GIT_COMMIT_GRAPH_PARANOIA=true
> 
> test-lint-shell-syntax is a bit overly strict and complains against
> this line, so until it is loosened, I'd suggest to do
> 
> 	GIT_COMMIT_GRAPH_PARANOIA=true
> 	export GIT_COMMIT_GRAPH_PARANOIA
> 
> instead here.

Fair. I was pondering whether to do this when writing this line, but remembering the recent discussion about it being in POSIX [1] I didn't. Didn't know though we had a linting rule for this, so I'll send a v3 to split up the statement.

Patrick
[1]: <87430c6c-91c0-4be1-b89d-bf442b3f018b@gmail.com>
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 15 of 16 in “commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by default”
  1. commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by defaultPatrick Steinhardt, Nov 14, 2023
  2. Patrick SteinhardtNov 14, 2023
  3. Taylor BlauNov 14, 2023
  4. Junio C HamanoNov 14, 2023
  5. Junio C HamanoNov 14, 2023
  6. Jeff KingNov 14, 2023
  7. Junio C HamanoNov 15, 2023
  8. Jeff KingNov 15, 2023
  9. Patrick SteinhardtNov 15, 2023
  10. Junio C HamanoNov 16, 2023
  11. Patrick SteinhardtNov 16, 2023
  12. Jeff KingDec 6, 2023
  13. commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by defaultPatrick Steinhardt, Nov 20, 2023
  14. Junio C HamanoNov 23, 2023
  15. Patrick SteinhardtNov 24, 2023
  16. commit-graph: disable GIT_COMMIT_GRAPH_PARANOIA by defaultPatrick Steinhardt, Nov 24, 2023

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.