Skip to content

Commit

Permalink
Update after checking out a branch under git_use_workdirs
Browse files Browse the repository at this point in the history
Problem report and diagnosis from Tom Lane.
  • Loading branch information
adunstan committed Apr 16, 2016
1 parent a08dc1c commit dbdfd1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions PGBuild/SCM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -688,16 +688,18 @@ sub checkout
my @colog;
if (grep {/\bbf_$branch\b/ } @branches)
{
# don't try to create an existing branch
# Don't try to create an existing branch
# the target dir only might have been wiped away,
# so we need to handle this case
# so we need to handle this case.
@colog =`git checkout -f bf_$branch 2>&1`;
}
else
{
@colog =`git checkout -f -b bf_$branch --track origin/$branch 2>&1`;
}
push(@gitlog,@colog);
# Make sure the branch we just checked out is up to date.
my @pull_log = `git pull 2>&1`;
push(@gitlog,@colog,@pull_log);

chdir "..";
}
Expand Down

0 comments on commit dbdfd1e

Please sign in to comment.