8000 fix: git remote: change url instead of rm / add by hparfr · Pull Request #81 · acsone/git-aggregator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: git remote: change url instead of rm / add #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

hparfr
Copy link
Contributor
@hparfr hparfr commented Apr 9, 2024

With some repos, there is an issue when the origin url is changed to a fork in repo.yml.

Errors look like unable to read sha1 file of, index-pack failed

It's occuring when the remote is removed (git remote rm origin) then added back with another url (git remote add origin ).

With this fix, we change the url inplace. git remote set-url origin <new url>

With some repos, there is an issue when the origin url is changed
to a fork in repo.yml.

Errors look like `unable to read sha1 file of`, `index-pack failed`

It's occuring when the remote is removed (git remote rm origin) then
added back with another url (git remote add origin <new url>).

With this fix, we change the url inplace. `git remote set-url origin <new url>`
@hparfr
Copy link
Contributor Author
hparfr commented Apr 9, 2024

My test file is:

./external-src/pattern-import-export:
  merges:
  - origin 16.0-mig-pattern-import-export2
  remotes:
    origin: https://github.com/akretion/pattern-import-export
  target: origin 16.0-mig-pattern-import-export2

then replaced by (the order is important):

./external-src/pattern-import-export:
  merges:
  - origin 16.0
  remotes:
    origin: https://github.com/shopinvader/pattern-import-export
  target: origin 16.0

Copy link
Member
@lmignon lmignon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems logic... (Code review)

@hparfr
Copy link
Contributor Author
hparfr commented Jun 3, 2024

@sbidoul please

@sbidoul sbidoul merged commit 63f2ca1 into acsone:master Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0