[anjuta] git: Make sure to separate files from command switches when doing a checkout



commit 25e65ac37fc00cd317381cabda6119f33d2f4ddf
Author: James Liggett <jrliggett cox net>
Date:   Mon Jul 13 18:34:02 2009 -0700

    git: Make sure to separate files from command switches when doing a checkout
    
    It could be possible that branch names could be confused with files if a branch happens to
    have the same name as a file under git's control, so make sure that options and paths are
    discretely separated.

 plugins/git/git-checkout-files-command.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/git/git-checkout-files-command.c b/plugins/git/git-checkout-files-command.c
index 2d90298..24c705d 100644
--- a/plugins/git/git-checkout-files-command.c
+++ b/plugins/git/git-checkout-files-command.c
@@ -44,7 +44,10 @@ git_checkout_files_command_run (AnjutaCommand *command)
 	if (self->priv->checkout_all)
 		git_command_add_arg (GIT_COMMAND (self), "-f");
 	else
+	{
+		git_command_add_arg (GIT_COMMAND (self), "--");
 		git_command_add_list_to_args (GIT_COMMAND (self), self->priv->paths);
+	}
 	
 	return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]