Skip to content

Commit

Permalink
Split packed from unpacked references
Browse files Browse the repository at this point in the history
These two reference types are now stored separately to eventually allow
the removal/renaming of loose references and rewriting of the refs
packfile.

Signed-off-by: Vicent Marti <[email protected]>
  • Loading branch information
vmg committed Mar 3, 2011
1 parent 32054c2 commit 86194b2
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 257 deletions.
1 change: 0 additions & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,5 @@ typedef SSIZE_T ssize_t;
#include "bswap.h"

#define GIT_PATH_MAX 4096
#define GIT_FILELOCK_EXTENSION ".lock\0"

#endif /* INCLUDE_common_h__ */
3 changes: 0 additions & 3 deletions src/filebuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include "filebuf.h"
#include "fileops.h"

static const char *GIT_FILELOCK_EXTENSION = ".lock\0";
static const size_t GIT_FILELOCK_EXTLENGTH = 6;

static const size_t WRITE_BUFFER_SIZE = (4096 * 2);

static int lock_file(git_filebuf *file, int flags)
Expand Down
3 changes: 3 additions & 0 deletions src/filebuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#define GIT_FILEBUF_APPEND 0x2
#define GIT_FILEBUF_FORCE 0x4

#define GIT_FILELOCK_EXTENSION ".lock\0"
#define GIT_FILELOCK_EXTLENGTH 6

struct git_filebuf {
char *path_original;
char *path_lock;
Expand Down
5 changes: 3 additions & 2 deletions src/git2/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ typedef struct git_reference git_reference;

/** Basic type of any Git reference. */
typedef enum {
GIT_REF_ANY = -2, /** Reference can be an object id reference or a symbolic reference */
GIT_REF_INVALID = -1, /** Invalid reference */
GIT_REF_INVALID = 0, /** Invalid reference */
GIT_REF_OID = 1, /** A reference which points at an object id */
GIT_REF_SYMBOLIC = 2, /** A reference which points at another reference */
GIT_REF_PACKED = 4,
GIT_REF_HAS_PEEL = 8,
} git_rtype;

/** @} */
Expand Down
Loading

0 comments on commit 86194b2

Please sign in to comment.