summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connect.c4
-rw-r--r--ssh-pull.c2
-rw-r--r--tools/mailinfo.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/connect.c b/connect.c
index d913f29..a20af1c 100644
--- a/connect.c
+++ b/connect.c
@@ -230,11 +230,9 @@ int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
if (src->peer_ref)
continue;
dst_peer = find_ref_by_name(dst, src->name);
- if (dst_peer && dst_peer->peer_ref)
+ if ((dst_peer && dst_peer->peer_ref) || (!dst_peer && !all))
continue;
if (!dst_peer) {
- if (!all)
- continue;
/* Create a new one and link it */
int len = strlen(src->name) + 1;
dst_peer = xcalloc(1, sizeof(*dst_peer) + len);
diff --git a/ssh-pull.c b/ssh-pull.c
index bdc99df..b7f313b 100644
--- a/ssh-pull.c
+++ b/ssh-pull.c
@@ -10,7 +10,7 @@ static int fd_out;
static unsigned char remote_version = 0;
static unsigned char local_version = 1;
-ssize_t force_write(int fd, void *buffer, size_t length)
+static ssize_t force_write(int fd, void *buffer, size_t length)
{
ssize_t ret = 0;
while (ret < length) {
diff --git a/tools/mailinfo.c b/tools/mailinfo.c
index 5a857f7..fb2ea2b 100644
--- a/tools/mailinfo.c
+++ b/tools/mailinfo.c
@@ -152,13 +152,13 @@ static void cleanup_space(char *buf)
static void handle_rest(void)
{
+ FILE *out = cmitmsg;
char *sub = cleanup_subject(subject);
cleanup_space(name);
cleanup_space(date);
cleanup_space(email);
cleanup_space(sub);
printf("Author: %s\nEmail: %s\nSubject: %s\nDate: %s\n\n", name, email, sub, date);
- FILE *out = cmitmsg;
do {
if (!memcmp("diff -", line, 6) ||