Bug 31479 - gear-clone configures fetch differently from the default result of "git remote add"
Summary: gear-clone configures fetch differently from the default result of "git remot...
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: mithraen-build-utils (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 31482
  Show dependency tree
 
Reported: 2015-11-12 18:28 MSK by Ivan Zakharyaschev
Modified: 2015-11-13 13:35 MSK (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2015-11-12 18:28:16 MSK
mithraen-build-utils-0.1.27-alt1

While using gear-clone, I've noticed that the fetch rule for origin works differently from how the default one created by "git remote add" works.

As a result, some unexpected not nice things happen. For example, I get duplicate remote refs for the refs from origin (probably because of the default operation of "git push"):

~/TOOLS/vc/girar-nmu/girar-nmu $ git branch -r | fgrep sisyphus
  origin/HEAD -> origin/sisyphus
  origin/heads/sisyphus
  origin/sisyphus
~/TOOLS/vc/girar-nmu/girar-nmu $ 

Is this done consciously for some reason? Or this could be done in the standard way?

The current code:

git --git-dir=".git" config 'remote.origin.fetch' "refs/heads/*:refs/remotes/origin/heads/*"

The suggested standard behavior:

git --git-dir=".git" config 'remote.origin.fetch' "refs/heads/*:refs/remotes/origin/*"

An example of the configuration after "git remote add viy@ALT git.alt:/people/viy/packages/girar-nmu.git" -- there is no "heads" infix:

[remote "viy@ALT"]
	url = git.alt:/people/viy/packages/girar-nmu.git
	fetch = +refs/heads/*:refs/remotes/viy@ALT/*

The configuration currently created by gear-clone:

[remote "origin"]
	url = git.alt:packages/girar-nmu
	fetch = refs/heads/*:refs/remotes/origin/heads/*
	push = refs/heads/*:refs/heads/*

What do you think?
Comment 3 Repository Robot 2015-11-13 13:30:31 MSK
mithraen-build-utils-0.1.28-alt1 -> sisyphus:

* Fri Nov 13 2015 Denis Smirnov <mithraen@altlinux> 0.1.28-alt1
- gear-clone: fix origin remote config (ALT #31479)
Comment 4 Ivan Zakharyaschev 2015-11-13 13:35:48 MSK
Thanks!