uri is useless here
This commit is contained in:
parent
78a2494d5e
commit
e170ef281b
3 changed files with 9 additions and 11 deletions
|
@ -464,7 +464,7 @@ public class GitActivity extends ActionBarActivity {
|
|||
username = hostname.split("@")[0];
|
||||
}
|
||||
|
||||
if (localDir.exists()) {
|
||||
if (localDir.exists() && localDir.listFiles().length != 0) {
|
||||
new AlertDialog.Builder(this).
|
||||
setTitle(R.string.dialog_delete_title).
|
||||
setMessage(R.string.dialog_delete_msg).
|
||||
|
@ -565,9 +565,9 @@ public class GitActivity extends ActionBarActivity {
|
|||
GitOperation op;
|
||||
|
||||
if (operation == REQUEST_PULL) {
|
||||
op = new PullOperation(localDir, activity).setCommand(hostname);
|
||||
op = new PullOperation(localDir, activity).setCommand();
|
||||
} else if (operation == REQUEST_PUSH) {
|
||||
op = new PushOperation(localDir, activity).setCommand(hostname);
|
||||
op = new PushOperation(localDir, activity).setCommand();
|
||||
} else {
|
||||
Log.e(TAG, "Sync operation not recognized : " + operation);
|
||||
return;
|
||||
|
@ -594,11 +594,11 @@ public class GitActivity extends ActionBarActivity {
|
|||
|
||||
switch (requestCode) {
|
||||
case REQUEST_PULL:
|
||||
op = new PullOperation(localDir, activity).setCommand(hostname);
|
||||
op = new PullOperation(localDir, activity).setCommand();
|
||||
break;
|
||||
|
||||
case REQUEST_PUSH:
|
||||
op = new PushOperation(localDir, activity).setCommand(hostname);
|
||||
op = new PushOperation(localDir, activity).setCommand();
|
||||
break;
|
||||
|
||||
case GitOperation.GET_SSH_KEY_FROM_CLONE:
|
||||
|
|
|
@ -20,11 +20,10 @@ public class PullOperation extends GitOperation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the command using the repository uri
|
||||
* @param uri the uri of the repository
|
||||
* Sets the command
|
||||
* @return the current object
|
||||
*/
|
||||
public PullOperation setCommand(String uri) {
|
||||
public PullOperation setCommand() {
|
||||
this.command = new Git(repository)
|
||||
.pull()
|
||||
.setRebase(true)
|
||||
|
|
|
@ -20,11 +20,10 @@ public class PushOperation extends GitOperation {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the command using the repository uri
|
||||
* @param uri the uri of the repository
|
||||
* Sets the command
|
||||
* @return the current object
|
||||
*/
|
||||
public PushOperation setCommand(String uri) {
|
||||
public PushOperation setCommand() {
|
||||
this.command = new Git(repository)
|
||||
.push()
|
||||
.setPushAll()
|
||||
|
|
Loading…
Reference in a new issue