Skip to content
This repository has been archived by the owner on May 1, 2018. It is now read-only.

Commit

Permalink
Use branch --track when, well tracking a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
webmat committed Feb 23, 2013
1 parent 29c4802 commit 2144ef7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/git_remote_branch.rb
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions test/functional/grb_test.rb
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 2144ef7

Please sign in to comment.