Skip to content

Commit

Permalink
Use macro GIT_BRANCHES
Browse files Browse the repository at this point in the history
Signed-off-by: Vector Li <[email protected]>
  • Loading branch information
Vector Li committed Jan 12, 2023
1 parent a01c29b commit c940af1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/fetch_git.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
#include "fetch.h"
#include "fetch_git.h"

// The main branch ("main") is fetched by default, but we also support to
// fetch the legacy one (i.e. "master") because it is required by some old
// repositories.
static const gchar *g_git_branches[] = {"main", "master"};
static const gchar *g_git_branches[] = {GIT_BRANCHES};

static gint
packet_length(const gchar *linelen)
Expand Down
6 changes: 6 additions & 0 deletions src/fetch_git.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#ifndef _RESTRAINT_FETCH_GIT_H
#define _RESTRAINT_FETCH_GIT_H

/*
* The main branch ("main") is fetched by default, but we also support to
* fetch the legacy one (i.e. "master") because it is required by some old
* repositories.
*/
#define GIT_BRANCHES "main", "master"
#define GIT_PORT 9418
#define HDR_LEN_SIZE 4

Expand Down

0 comments on commit c940af1

Please sign in to comment.