Skip to content
Browse files

Use branch --track when, well tracking a branch

  • Loading branch information...
1 parent 29c4802 commit 2144ef7eb15712f0e32228f889699c7a95c1bf88 @webmat committed Feb 22, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/git_remote_branch.rb
  2. +4 −4 test/functional/grb_test.rb
View
2 lib/git_remote_branch.rb
@@ -70,7 +70,7 @@ class NotOnGitRepositoryError < RuntimeError; end
:aliases => %w{track follow grab fetch},
:commands => [
'"#{GIT} fetch #{origin}"',
- '"#{GIT} branch --set-upstream-to=#{origin}/#{branch_name} #{branch_name}"'
+ '"#{GIT} branch --track #{branch_name} #{origin}/#{branch_name}"',
]
}
} unless defined?(COMMANDS)
View
8 test/functional/grb_test.rb
@@ -32,8 +32,8 @@ class GRBTest < Test::Unit::TestCase
should_have_branch 'new_branch', :local, :remote
- should "use the branch --set-upstream command" do
- assert_match %r{branch --set-upstream}, @output
+ should "use the branch --track command" do
+ assert_match %r{branch --track}, @output
end
end
@@ -45,8 +45,8 @@ class GRBTest < Test::Unit::TestCase
should_have_branch 'new_branch', :local, :remote
- should "use the branch --set-upstream command" do
- assert_match %r{branch --set-upstream}, @output
+ should "use the branch --track command" do
+ assert_match %r{branch --track}, @output
end
end
end

0 comments on commit 2144ef7

Please sign in to comment.
Something went wrong with that request. Please try again.