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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux