[
https://issues.jboss.org/browse/JBIDE-12138?page=com.atlassian.jira.plugi...
]
Andre Dietisheim updated JBIDE-12138:
-------------------------------------
Attachment: check-for-null-pushresults.patch
serveradapter is git forcing without asking when error occurs in
normal git commit
----------------------------------------------------------------------------------
Key: JBIDE-12138
URL:
https://issues.jboss.org/browse/JBIDE-12138
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Reporter: Max Rydahl Andersen
Assignee: Rob Stryker
Priority: Critical
Fix For: 3.3.0.CR1
Attachments: check-for-null-pushresults.patch, JBIDE-12138.patch,
JBIDE-12138improved.txt
Was noticed through reading the code that if another error than "up to date"
occurs jbosstools is *forcing* a push witohut asking the user.
This must be fixed since otherwise you are nuking users history!
Steps to reproduce:
# create myapp in tools with openshift in ~/git/myapp
# take the git url and clone the app into a separate directory (to simulate other
changes)
mkdir temp
cd temp
git clone ssh:<specifichost>/myapp.git/
cd myapp
edit README or some other existing file
git commit -m "external change" README
git push
<ton of output>
cd ~/git/myapp
git push will now fail with something like:
ax@slowbeard: $ git push
~/git/appmy
To ssh://b8ab8a46a2984d16b1666f3b172c4199@appmy-man.rhcloud.com/~/git/appmy.git/
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to
'ssh://b8ab8a46a2984d16b1666f3b172c4199@appmy-man.rhcloud.com/~/git/appmy.git/'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
Thus when trying to publish from tools it should *not* let you push and it should ask you
before pushing with force.
You can verify it did not push force by using
git pull
git log README
and check that "external change" is still present.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira