Port git-tag.sh to C.
PATCH 1/1 Port git-tag.sh to C.
A more or less straight-forward port of git-tag.sh to C.
---
There's two behavioral changes here: git tag with no arguments behaves like git branch with no arguments; it lists all tags. The other change is an empty line in the tag message template to make it look more like the commit message template.
cheers,
Kristian
Makefile | 3 +- builtin-tag.c | 364 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ builtin.h | 1 + git-tag.sh | 183 ----------------------------- git.c | 1 + 5 files changed, 368 insertions(+), 184 deletions(-) create mode 100644 builtin-tag.c delete mode 100755 git-tag.sh
Makefile +2 -1
@@ -205,7 +205,7 @@ SCRIPT_SH = \ git-pull.sh git-rebase.sh \ git-repack.sh git-request-pull.sh git-reset.sh \ git-sh-setup.sh \ - git-tag.sh git-verify-tag.sh \ + git-verify-tag.sh \ git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ git-merge-resolve.sh git-merge-ours.sh \
@@ -372,6 +372,7 @@ BUILTIN_OBJS = \ builtin-show-branch.o \ builtin-stripspace.o \ builtin-symbolic-ref.o \ + builtin-tag.o \ builtin-tar-tree.o \ builtin-unpack-objects.o \ builtin-update-index.o \
builtin-tag.c new file +364 -0
364 lines not on this page · raw message
builtin.h +1 -0
@@ -72,6 +72,7 @@ extern int cmd_show(int argc, const char **argv, const char *prefix);extern int cmd_show_branch (int argc,const char **argv,const char *prefix);extern int cmd_stripspace (int argc,const char **argv,const char *prefix);extern int cmd_symbolic_ref (int argc,const char **argv,const char *prefix); +extern int cmd_tag (int argc,const char **argv,const char *prefix);extern int cmd_tar_tree (int argc,const char **argv,const char *prefix);extern int cmd_unpack_objects (int argc,const char **argv,const char *prefix);extern int cmd_update_index (int argc,const char **argv,const char *prefix);
git-tag.sh deleted +0 -183
183 lines not on this page · raw message
git.c +1 -0
@@ -285,6 +285,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp) { "show", cmd_show, RUN_SETUP | USE_PAGER }, { "stripspace", cmd_stripspace }, { "symbolic-ref", cmd_symbolic_ref, RUN_SETUP }, + { "tag", cmd_tag, RUN_SETUP }, { "tar-tree", cmd_tar_tree }, { "unpack-objects", cmd_unpack_objects, RUN_SETUP }, { "update-index", cmd_update_index, RUN_SETUP },
Signature · 1 line
1.5.2.1.134.g447c2
Hi,
Quoted 1 line · Kristian Høgsberg
A more or less straight-forward port of
git-tag.shto C.
It is somewhat unfortunate that you did not say that you were working on this stuff; we have a Google Summer of Code project going on, which tries to port many scripts to builtins.
As it happens, I am working with jasam on exactly the same script.
Pity,
Dscho
Quoted 9 lines · Johannes Schindelin
Hi,
Quoted 1 line · Kristian Høgsberg
A more or less straight-forward port of
git-tag.shto C.It is somewhat unfortunate that you did not say that you were working on this stuff; we have a Google Summer of Code project going on, which tries to port many scripts to builtins.
Ugh, yeah... wasted effort... I didn't see anything about the SoC project on the list and I didn't pre-announce my work because I only spent little more than half a day...
Quoted 1 line
As it happens, I am working with jasam on exactly the same script.
Hm... not sure how to resolve this. FWIW, I'm going to send an updated version of the patch that should also pass the test suite. The previous version always only creates annotated tags.
Kristian
2007/6/9, Kristian Høgsberg <[email protected]>:
Quoted 3 lines
Ugh, yeah... wasted effort... I didn't see anything about the SoC project on the list and I didn't pre-announce my work because I only spent little more than half a day...
Sorry, it should have been announced before this could happen.
Quoted 1 line
Quoted 1 line
As it happens, I am working with jasam on exactly the same script.
We were doing a conservative work to get exactly the same options and behaviour that git-tag.sh does. The work is now almost finished, so you could help us comparing the two versions to see how could end with a better git-tag. It would be fantastic if we could point what parts of my code can be enhanced with those of yours.
My test suite can also be run against the git-tag.sh code now, you can check check your code with it. Feel free to say everything you want about it!
Carlos
Hi,
Quoted 3 lines · Kristian H�gsberg
FWIW, I'm going to send an updated version of the patch that should also pass the test suite. The previous version always only creates annotated tags.
As it happens, jasam also worked on a relatively extensive test script.
You might want to test it:
http://repo.or.cz/w/git/builtin-gsoc.git
Branch is "builtin-tag", the test script is t/t7400-tag.sh.
Ciao,
Dscho
Hi,
Quoted 6 lines · Johannes Schindelin
Hi,
Quoted 1 line · Kristian Høgsberg
A more or less straight-forward port of
git-tag.shto C.
Quoted 8 lines
It is somewhat unfortunate that you did not say that you were working on this stuff; we have a Google Summer of Code project going on, which tries to port many scripts to builtins.
As it happens, I am working with jasam on exactly the same script.
Pity,
Dscho
Please consider the idea of showing (part of) the tag annotation with git-tag as well.
See message archived at:
http://permalink.gmane.org/gmane.comp.version-control.git/48962
Thanks,
Matthijs Melchior.