org.springframework.roo.addon.git
Interface GitOperations

All Known Implementing Classes:
GitOperationsImpl

public interface GitOperations

Operations offered by Git addon.

Since:
1.1
Author:
Stefan Schmidt

Method Summary
 void commitAllChanges(String message)
          Triggers commit for all changes in the Git tree.
 boolean isAutomaticCommit()
          Check if automatic commit is enabled for successful Roo commands.
 boolean isGitCommandAvailable()
          Check if Git commands are available in Shell.
 boolean isGitInstallationPossible()
          Check if Git setup command is available in Shell.
 void log(int maxHistory)
          Present git log.
 void push()
          Trigger git push.
 void reset(int noOfCommitsToReset, String message)
          Triggers Git reset (hard).
 void revertCommit(String revstr, String message)
          Trigger revert of commit with given rev string.
 void revertLastCommit(String message)
          Triggers revert of last commit.
 void setConfig(String category, String key, String value)
          Convenience access to the Git config (allows setting config options)
 void setup()
          Initial setup of git repository in target project.
 

Method Detail

commitAllChanges

void commitAllChanges(String message)
Triggers commit for all changes in the Git tree. (works like 'git commmit -a -m {message}')

Parameters:
message - Commit message

isAutomaticCommit

boolean isAutomaticCommit()
Check if automatic commit is enabled for successful Roo commands.

Returns:
automaticCommit

isGitCommandAvailable

boolean isGitCommandAvailable()
Check if Git commands are available in Shell. Depends on presence of .git repository.

Returns:
availability

isGitInstallationPossible

boolean isGitInstallationPossible()
Check if Git setup command is available in Shell.

Returns:
availability

log

void log(int maxHistory)
Present git log.

Parameters:
maxHistory -

push

void push()
Trigger git push.


reset

void reset(int noOfCommitsToReset,
           String message)
Triggers Git reset (hard).

Parameters:
noOfCommitsToReset - number of commits to reset (HEAD - n)
message - Commit message

revertCommit

void revertCommit(String revstr,
                  String message)
Trigger revert of commit with given rev string.

Parameters:
revstr -
message -

revertLastCommit

void revertLastCommit(String message)
Triggers revert of last commit.

Parameters:
message - Commit message

setConfig

void setConfig(String category,
               String key,
               String value)
Convenience access to the Git config (allows setting config options)

Parameters:
category - The Git config category.
key - The config key.
value - The config value.

setup

void setup()
Initial setup of git repository in target project.



Copyright © 2009–2015. All rights reserved.