{"thread":{"id":"23917","subject":"Branch Names and tracking branches","startedAt":"2010-05-26T20:39:17Z","lastAt":"2010-05-26T20:54:15Z","messageCount":2,"participants":["Troy Telford"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142392","messageId":"201005261439.17442.ttelford.groups@gmail.com","threadId":"23917","inReplyTo":null,"subject":"Branch Names and tracking branches","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2010-05-26T20:39:17Z","receivedAt":"2010-05-26T20:39:17Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"I've got a situation where I'm trying to integrate git into another tool, so \nthat when you make a commit into a git branch, a post-receive hook will then \npush the code changes into the other tool when the user pushes their changes \ninto the repository.\n\nThe problem:  The other tool uses colons in the name.  So, I looked at 'man \ngit-check-ref-format', and found that the colon can't be used.\n\nSo, I looked for a substitute character that isn't likely to be used anyway -- \nsemicolon seemed to be a good choice.\n\nAs I decided to use a semicolon, a conversion as needed in the post hook.  It \nworks fine with the git branch names along the lines of sna;foo;bar.\n\nBut using a branch name of \"sna;foo;bar\" is not entirely great, as the \nsemicolon has to be escaped on the command line when referencing the branch \nname.\n\nSo, I decided to use a tracking branch:\n git branch --track branch \"refs/origin/sna;foo;bar\"\n\nAgain, it checks out okay, and it is able to pull in changes fine.  However, \nchanges can't be pushed into the remote repository at all; 'git push' simply \nreturns \"Everything up-to-date,\" even when changes are made.\n\nThis differs from the behavior I've seen in the past for tracking branches - \nI'm used to (and was expecting) the git push to push the changes into the \nremote's \"refs/heads/sna;foo;bar\" branch.\n\nUsing another character is, of course, an option; but the semicolon isn't \nexplicitly forbidden and it works for everything I've used but 'git push'.\n\nSo am I just doing something wrong, or have I found a bug or documentation \nissue?\n"},{"id":"142393","messageId":"201005261454.15277.ttelford.groups@gmail.com","threadId":"23917","inReplyTo":"201005261439.17442.ttelford.groups@gmail.com","subject":"Re: Branch Names and tracking branches","fromName":"Troy Telford","fromEmail":"ttelford.groups@gmail.com","sentAt":"2010-05-26T20:54:15Z","receivedAt":"2010-05-26T20:54:15Z","isPatch":false,"sender":{"key":"ttelford.groups@gmail.com","avatar":"https://gravatar.com/avatar/7fb1a08052bfe7645125d4c1bcd6d8f58b780239c783f9064f341831d9456049?d=mp&s=160"},"body":"I just realized it's a config issue.  <sigh>\n\ngit config push.default tracking\n\nSorry for that...\n\nOn Wednesday, May 26, 2010 02:39:17 pm Troy Telford wrote:\n> I've got a situation where I'm trying to integrate git into another tool,\n> so that when you make a commit into a git branch, a post-receive hook will\n> then push the code changes into the other tool when the user pushes their\n> changes into the repository.\n> \n> The problem:  The other tool uses colons in the name.  So, I looked at 'man\n> git-check-ref-format', and found that the colon can't be used.\n> \n> So, I looked for a substitute character that isn't likely to be used anyway\n> -- semicolon seemed to be a good choice.\n> \n> As I decided to use a semicolon, a conversion as needed in the post hook. \n> It works fine with the git branch names along the lines of sna;foo;bar.\n> \n> But using a branch name of \"sna;foo;bar\" is not entirely great, as the\n> semicolon has to be escaped on the command line when referencing the branch\n> name.\n> \n> So, I decided to use a tracking branch:\n>  git branch --track branch \"refs/origin/sna;foo;bar\"\n> \n> Again, it checks out okay, and it is able to pull in changes fine. \n> However, changes can't be pushed into the remote repository at all; 'git\n> push' simply returns \"Everything up-to-date,\" even when changes are made.\n> \n> This differs from the behavior I've seen in the past for tracking branches\n> - I'm used to (and was expecting) the git push to push the changes into\n> the remote's \"refs/heads/sna;foo;bar\" branch.\n> \n> Using another character is, of course, an option; but the semicolon isn't\n> explicitly forbidden and it works for everything I've used but 'git push'.\n> \n> So am I just doing something wrong, or have I found a bug or documentation\n> issue?\n"}]}