diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-07-11 02:58:00 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-07-11 02:59:18 +0200 |
commit | bdd18829ad6179947565dcb5b267163c37a045c9 (patch) | |
tree | 1447ff26dc5b226bce8c73ff363e960f74c64957 /include/git2 | |
parent | f27f29b1005d96d1a7adc8702e9958df3965d818 (diff) | |
download | libgit2-bdd18829ad6179947565dcb5b267163c37a045c9.tar.gz |
Cleanup external API
Some of the WIP API calls have been hidden in preparation for the next
minor release.
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/net.h | 38 | ||||
-rw-r--r-- | include/git2/pkt.h | 56 | ||||
-rw-r--r-- | include/git2/refspec.h | 33 | ||||
-rw-r--r-- | include/git2/remote.h | 35 |
4 files changed, 104 insertions, 58 deletions
diff --git a/include/git2/net.h b/include/git2/net.h index 4bef90509..01b307dae 100644 --- a/include/git2/net.h +++ b/include/git2/net.h @@ -1,3 +1,27 @@ +/* + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, + * as published by the Free Software Foundation. + * + * In addition to the permissions in the GNU General Public License, + * the authors give you unlimited permission to link the compiled + * version of this file into combinations with other programs, + * and to distribute those combinations without any restriction + * coming from the use of this file. (The General Public License + * restrictions do apply in other respects; for example, they cover + * modification of the file, and distribution when not linked into + * a combined executable.) + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ #ifndef INCLUDE_net_h__ #define INCLUDE_net_h__ @@ -16,15 +40,25 @@ #define GIT_DIR_FETCH 0 #define GIT_DIR_PUSH 1 -/* - * This is what we give out on ->ls() +/** + * @file git2/net.h + * @brief Git networking declarations + * @ingroup Git + * @{ */ +GIT_BEGIN_DECL +/** + * Remote head description, given out on `ls` calls. + */ struct git_remote_head { git_oid oid; char *name; }; +/** + * Array of remote heads + */ struct git_headarray { unsigned int len; struct git_remote_head **heads; diff --git a/include/git2/pkt.h b/include/git2/pkt.h deleted file mode 100644 index 0b17b3eed..000000000 --- a/include/git2/pkt.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2, - * as published by the Free Software Foundation. - * - * In addition to the permissions in the GNU General Public License, - * the authors give you unlimited permission to link the compiled - * version of this file into combinations with other programs, - * and to distribute those combinations without any restriction - * coming from the use of this file. (The General Public License - * restrictions do apply in other respects; for example, they cover - * modification of the file, and distribution when not linked into - * a combined executable.) - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "git2/net.h" - -enum git_pkt_type { - GIT_PKT_CMD, - GIT_PKT_FLUSH, - GIT_PKT_REF, - GIT_PKT_HAVE, -}; - -/* This would be a flush pkt */ -struct git_pkt { - enum git_pkt_type type; -}; - -struct git_pkt_cmd { - enum git_pkt_type type; - char *cmd; - char *path; - char *host; -}; - -/* This is a pkt-line with some info in it */ -struct git_pkt_ref { - enum git_pkt_type type; - git_remote_head head; - char *capabilities; -}; - -int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, size_t len); -int git_pkt_send_flush(int s); -void git_pkt_free(git_pkt *pkt); diff --git a/include/git2/refspec.h b/include/git2/refspec.h index e6b83c353..b5361edbb 100644 --- a/include/git2/refspec.h +++ b/include/git2/refspec.h @@ -1,9 +1,42 @@ +/* + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, + * as published by the Free Software Foundation. + * + * In addition to the permissions in the GNU General Public License, + * the authors give you unlimited permission to link the compiled + * version of this file into combinations with other programs, + * and to distribute those combinations without any restriction + * coming from the use of this file. (The General Public License + * restrictions do apply in other respects; for example, they cover + * modification of the file, and distribution when not linked into + * a combined executable.) + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ #ifndef INCLUDE_git_refspec_h__ #define INCLUDE_git_refspec_h__ #include "git2/types.h" /** + * @file git2/refspec.h + * @brief Git refspec attributes + * @defgroup git_refspec Git refspec attributes + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +/** * Get the source specifier * * @param refspec the refspec diff --git a/include/git2/remote.h b/include/git2/remote.h index 03e459569..fc05867c7 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -1,3 +1,27 @@ +/* + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, + * as published by the Free Software Foundation. + * + * In addition to the permissions in the GNU General Public License, + * the authors give you unlimited permission to link the compiled + * version of this file into combinations with other programs, + * and to distribute those combinations without any restriction + * coming from the use of this file. (The General Public License + * restrictions do apply in other respects; for example, they cover + * modification of the file, and distribution when not linked into + * a combined executable.) + * + * This file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ #ifndef INCLUDE_git_remote_h__ #define INCLUDE_git_remote_h__ @@ -14,6 +38,15 @@ */ /** + * @file git2/remote.h + * @brief Git remote management + * @defgroup git_remote Git remote management routines + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +/** * Get the information for a particular remote * * @param out pointer to the new remote object @@ -84,4 +117,6 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headarray *refs); */ GIT_EXTERN(void) git_remote_free(struct git_remote *remote); +GIT_END_DECL + #endif |