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

Re: Get rid of `warning: refs/remotes/origin/master usually tracks refs/heads/master, not refs/remotes/origin/master`

From
AAndry <andry@inbox.ru>
Date
Feb 25, 2023, 21:48 UTC
Message-ID
<1212192063.20230226004808@inbox.ru>
In-Reply-To
<942870379.20230223062101@inbox.ru>
Hello Git,
Thursday, February 23, 2023, 6:21:01 AM, you wrote:
A> Found this issue and could find a solution.
A> ...
A> Is there a way to unmirror the remote repository back?
Seems the problem was in the logic of the push algorithm.
There was 2 fors (pseudocode):
```python
for remote in remotes:
  for branch in branches:
    git_push([remote, ':refs/remotes/' + remote + '/' + branch])
```
Instead of 3 fors:
```python
for remote in remotes:
  for ref_remote in remotes:
    for branch in branches:
      git_push([remote, ':refs/remotes/' + ref_remote + '/' + branch])
```
Because each remote has `num(refs) = num(branches) x num(remotes)` after the mirror.
Previous: Andry
Message 2 of 2 in “Get rid of `warning: refs/remotes/origin/master usually tracks refs/heads/master, not refs/remotes/origin/master`”
  1. AndryFeb 23, 2023
  2. AndryFeb 25, 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.