Skip to content

Commit

Permalink
remove repo status check in push; no git pull --rebase before push.
Browse files Browse the repository at this point in the history
  • Loading branch information
fbzhong committed Apr 25, 2012
1 parent 90382af commit 6f05b34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/git-gerrit
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ abandonChange() {

# git gerrit push
pushCommit() {
abort_on_bad_repo_state
# ignore the repo state check.
# abort_on_bad_repo_state

local remote="$1" refs="$2" change="$CHANGE" current="$CURRENT" track
local prompt_track=n
Expand Down Expand Up @@ -588,6 +589,8 @@ pushCommit() {
fi

if [[ -n "$change" ]] ; then
abort_on_bad_repo_state

# squash commits for submit change patch set.
#$GIT branch -f "$current.head"
local msg="$($GIT log --pretty=format:'%s%n%b%n%n' $remote/$track..HEAD)"
Expand All @@ -598,7 +601,7 @@ pushCommit() {
# pull --rebase to make sure pushed commit bases on correct parent.
local msg="Unable to pull and rebase your branch $track to the $remote/$track."
local msg="${msg}\nPlease resolve the pull issue and try again."
git pull --rebase $remote || die "$msg"
# git pull --rebase $remote || die "$msg"
fi

local log=$($GIT log --pretty="format:%s" $remote/$track..HEAD)
Expand Down

0 comments on commit 6f05b34

Please sign in to comment.