uri is useless here

This commit is contained in:
zeapo 2015-01-04 16:27:26 +01:00
parent 78a2494d5e
commit e170ef281b
3 changed files with 9 additions and 11 deletions

View file

@ -464,7 +464,7 @@ public class GitActivity extends ActionBarActivity {
username = hostname.split("@")[0]; username = hostname.split("@")[0];
} }
if (localDir.exists()) { if (localDir.exists() && localDir.listFiles().length != 0) {
new AlertDialog.Builder(this). new AlertDialog.Builder(this).
setTitle(R.string.dialog_delete_title). setTitle(R.string.dialog_delete_title).
setMessage(R.string.dialog_delete_msg). setMessage(R.string.dialog_delete_msg).
@ -565,9 +565,9 @@ public class GitActivity extends ActionBarActivity {
GitOperation op; GitOperation op;
if (operation == REQUEST_PULL) { if (operation == REQUEST_PULL) {
op = new PullOperation(localDir, activity).setCommand(hostname); op = new PullOperation(localDir, activity).setCommand();
} else if (operation == REQUEST_PUSH) { } else if (operation == REQUEST_PUSH) {
op = new PushOperation(localDir, activity).setCommand(hostname); op = new PushOperation(localDir, activity).setCommand();
} else { } else {
Log.e(TAG, "Sync operation not recognized : " + operation); Log.e(TAG, "Sync operation not recognized : " + operation);
return; return;
@ -594,11 +594,11 @@ public class GitActivity extends ActionBarActivity {
switch (requestCode) { switch (requestCode) {
case REQUEST_PULL: case REQUEST_PULL:
op = new PullOperation(localDir, activity).setCommand(hostname); op = new PullOperation(localDir, activity).setCommand();
break; break;
case REQUEST_PUSH: case REQUEST_PUSH:
op = new PushOperation(localDir, activity).setCommand(hostname); op = new PushOperation(localDir, activity).setCommand();
break; break;
case GitOperation.GET_SSH_KEY_FROM_CLONE: case GitOperation.GET_SSH_KEY_FROM_CLONE:

View file

@ -20,11 +20,10 @@ public class PullOperation extends GitOperation {
} }
/** /**
* Sets the command using the repository uri * Sets the command
* @param uri the uri of the repository
* @return the current object * @return the current object
*/ */
public PullOperation setCommand(String uri) { public PullOperation setCommand() {
this.command = new Git(repository) this.command = new Git(repository)
.pull() .pull()
.setRebase(true) .setRebase(true)

View file

@ -20,11 +20,10 @@ public class PushOperation extends GitOperation {
} }
/** /**
* Sets the command using the repository uri * Sets the command
* @param uri the uri of the repository
* @return the current object * @return the current object
*/ */
public PushOperation setCommand(String uri) { public PushOperation setCommand() {
this.command = new Git(repository) this.command = new Git(repository)
.push() .push()
.setPushAll() .setPushAll()