* Branch Names and tracking branches
@ 2010-05-26 20:39 Troy Telford
2010-05-26 20:54 ` Troy Telford
0 siblings, 1 reply; 2+ messages in thread
From: Troy Telford @ 2010-05-26 20:39 UTC (permalink / raw)
To: git
I've got a situation where I'm trying to integrate git into another tool, so
that when you make a commit into a git branch, a post-receive hook will then
push the code changes into the other tool when the user pushes their changes
into the repository.
The problem: The other tool uses colons in the name. So, I looked at 'man
git-check-ref-format', and found that the colon can't be used.
So, I looked for a substitute character that isn't likely to be used anyway --
semicolon seemed to be a good choice.
As I decided to use a semicolon, a conversion as needed in the post hook. It
works fine with the git branch names along the lines of sna;foo;bar.
But using a branch name of "sna;foo;bar" is not entirely great, as the
semicolon has to be escaped on the command line when referencing the branch
name.
So, I decided to use a tracking branch:
git branch --track branch "refs/origin/sna;foo;bar"
Again, it checks out okay, and it is able to pull in changes fine. However,
changes can't be pushed into the remote repository at all; 'git push' simply
returns "Everything up-to-date," even when changes are made.
This differs from the behavior I've seen in the past for tracking branches -
I'm used to (and was expecting) the git push to push the changes into the
remote's "refs/heads/sna;foo;bar" branch.
Using another character is, of course, an option; but the semicolon isn't
explicitly forbidden and it works for everything I've used but 'git push'.
So am I just doing something wrong, or have I found a bug or documentation
issue?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Branch Names and tracking branches
2010-05-26 20:39 Branch Names and tracking branches Troy Telford
@ 2010-05-26 20:54 ` Troy Telford
0 siblings, 0 replies; 2+ messages in thread
From: Troy Telford @ 2010-05-26 20:54 UTC (permalink / raw)
To: git
I just realized it's a config issue. <sigh>
git config push.default tracking
Sorry for that...
On Wednesday, May 26, 2010 02:39:17 pm Troy Telford wrote:
> I've got a situation where I'm trying to integrate git into another tool,
> so that when you make a commit into a git branch, a post-receive hook will
> then push the code changes into the other tool when the user pushes their
> changes into the repository.
>
> The problem: The other tool uses colons in the name. So, I looked at 'man
> git-check-ref-format', and found that the colon can't be used.
>
> So, I looked for a substitute character that isn't likely to be used anyway
> -- semicolon seemed to be a good choice.
>
> As I decided to use a semicolon, a conversion as needed in the post hook.
> It works fine with the git branch names along the lines of sna;foo;bar.
>
> But using a branch name of "sna;foo;bar" is not entirely great, as the
> semicolon has to be escaped on the command line when referencing the branch
> name.
>
> So, I decided to use a tracking branch:
> git branch --track branch "refs/origin/sna;foo;bar"
>
> Again, it checks out okay, and it is able to pull in changes fine.
> However, changes can't be pushed into the remote repository at all; 'git
> push' simply returns "Everything up-to-date," even when changes are made.
>
> This differs from the behavior I've seen in the past for tracking branches
> - I'm used to (and was expecting) the git push to push the changes into
> the remote's "refs/heads/sna;foo;bar" branch.
>
> Using another character is, of course, an option; but the semicolon isn't
> explicitly forbidden and it works for everything I've used but 'git push'.
>
> So am I just doing something wrong, or have I found a bug or documentation
> issue?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-26 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 20:39 Branch Names and tracking branches Troy Telford
2010-05-26 20:54 ` Troy Telford
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).