Git Tag: Initial support for tagging

Branching in git even more useful if using tags. Simulate relase branches,
maintenance branches and so on is therefore really useful in this tool.

Now, rudimentary tagging is implemented, where tags can be attached to the
commits, and referenced by for exmapmle git checkout

Signed-off-by: Max Sikström <msikstrom@op5.com>
This commit is contained in:
Max Sikström 2013-10-08 18:41:00 +02:00
parent fa7b918be9
commit 74342e2028
13 changed files with 2009 additions and 29 deletions

View file

@ -557,6 +557,24 @@ var commandConfig = {
destination: tracking
});
}
},
tag: {
regex: /^git +tag($|\s)/,
execute: function(engine, command) {
var generalArgs = command.getGeneralArgs();
if (generalArgs.length === 0) {
var tags = engine.getTags();
engine.printTags(tags);
return;
}
command.twoArgsImpliedHead(generalArgs);
engine.tag(generalArgs[0], generalArgs[1]);
}
}
};