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

Re: [TopGit PATCH] hooks/pre-commit: check for cycles in dependencies

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Jun 8, 2009, 07:31 UTC
Message-ID
<36ca99e90906080031r3f5f545eo26c077e1966bf67@mail.gmail.com>
In-Reply-To
<20090605202526.GB671@pengutronix.de>
2009/6/5 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hi Bert,
Hi, Uwe,
Show 11 quoted lines
>
> On Thu, Jun 04, 2009 at 10:41:13PM +0200, Bert Wesarg wrote:
>> Only newly added dependencies needs to be considered.  For each of these deps
>> check if there is a path from this dep to the current HEAD.
>>
>> Use recursive_dep() for this task.  Even if recursive_dep() uses a DFS-like
>> traversal it will not run into an infty-loop if there would be a cycle, because
> I'm not sure how understandable this is.  After some thinking I
> understood DFS.  Up to now I thought infty is just the LaTeX macro name
> for "infinity", but apart of this, is this really the right term here?
> endless loop?
Yeah, 'endless loop' is the right term here.
Show 7 quoted lines
>
>> recursive_dep() takes .topdeps only from committed trees.  And it is required
>> that the committed dependency graph is acyclic.
>
> I didn't check the implementation deeply.  But all in all I don't have
> the usual warm and fuzzy feeling about it.  What happens during a remote
> update if only the merged dependency graph has a cycle[1]?
I suspect the merge commit, which would introduce this cycle, will abort.
BTW: Do you have any infos or need help on your TopGit successor?

Bye, Bert

Show 12 quoted lines
>
> Best regards
> Uwe
>
> [1] The question is a bit theoretic because remote updating is broken
> here.  If you are my remote and changed a .topdep file, my update simply
> discards your change.
>
> --
> Pengutronix e.K.                              | Uwe Kleine-König            |
> Industrial Linux Solutions                    | http://www.pengutronix.de/  |
>
Previous: Uwe Kleine-KönigNext: Uwe Kleine-König
Message 4 of 5 in “hooks/pre-commit: check for cycles in dependencies”
  1. hooks/pre-commit: check for cycles in dependenciesBert Wesarg, Jun 4, 2009
  2. Bert WesargJun 4, 2009
  3. Uwe Kleine-KönigJun 5, 2009
  4. Bert WesargJun 8, 2009
  5. TopGit successorUwe Kleine-König, Jun 8, 2009

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.