git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] make --set-upstream work for local branches not in refs/heads
@ 2014-03-04 14:07 Krzesimir Nowak
  2014-03-04 14:07 ` [PATCH] RFC: make --set-upstream work for branches not in refs/heads/ Krzesimir Nowak
  2014-03-04 19:44 ` [RFC] make --set-upstream work for local branches not in refs/heads Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Krzesimir Nowak @ 2014-03-04 14:07 UTC (permalink / raw)
  To: git; +Cc: Krzesimir Nowak

It might be possible (in "Gerrited" setups) to have local branches
outside refs/heads/, like for example in following fetch config:

[remote "origin"]
	url = ssh://user@example.com/my-project
	fetch = +refs/heads/*:refs/remotes/origin/*
	fetch = +refs/wip/*:refs/remotes/origin-wip/*

Let's say that 'test' branch already exist in origin/refs/wip/. If I
call:

git checkout test

then it will create a new branch and add an entry to .git/config:

[branch "test"]
	remote = origin
	merge = refs/wip/test

But if I create a branch 'test2' and call:

git push --set-upstream origin test2:refs/wip/test2

then branch is pushed, but no entry in .git config is created. I have
to do it manually. I attached a hack-patch to have it working just to
check with you if anything like that would be accepted. Obviously the
get_local_refs() would need to compute the actual list of local
hierarchies (if it is possible at all). And it probably should get a
better name. And probably something else.

What do you think?

Krzesimir Nowak (1):
  RFC: make --set-upstream work for branches not in refs/heads/

 transport.c | 41 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 7 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-06  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 14:07 [RFC] make --set-upstream work for local branches not in refs/heads Krzesimir Nowak
2014-03-04 14:07 ` [PATCH] RFC: make --set-upstream work for branches not in refs/heads/ Krzesimir Nowak
2014-03-04 19:44 ` [RFC] make --set-upstream work for local branches not in refs/heads Junio C Hamano
2014-03-06  9:27   ` Krzesimir Nowak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).