summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c42
1 files changed, 12 insertions, 30 deletions
diff --git a/src/refs.c b/src/refs.c
index 04347d221..bc8827b46 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1,26 +1,8 @@
/*
- * 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.
+ * Copyright (C) 2009-2011 the libgit2 contributors
*
- * 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.
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
*/
#include "refs.h"
@@ -512,7 +494,7 @@ static int packed_load(git_repository *repo)
}
error = reference_read(&packfile, &ref_cache->packfile_time,
- repo->path_repository, GIT_PACKEDREFS_FILE, &updated);
+ repo->path_repository, GIT_PACKEDREFS_FILE, &updated);
/*
* If we couldn't find the file, we need to clear the table and
@@ -845,7 +827,7 @@ static int packed_write(git_repository *repo)
const void *GIT_UNUSED(_unused);
GIT_HASHTABLE_FOREACH(repo->references.packfile, _unused, reference,
- git_vector_insert(&packing_list, reference); /* cannot fail: vector already has the right size */
+ git_vector_insert(&packing_list, reference); /* cannot fail: vector already has the right size */
);
}
@@ -923,7 +905,7 @@ static int _reference_available_cb(const char *ref, void *data)
const char *lead = reflen < newlen ? new : ref;
if (!strncmp(new, ref, cmplen) &&
- lead[cmplen] == '/')
+ lead[cmplen] == '/')
return GIT_EEXISTS;
}
@@ -1072,7 +1054,7 @@ int git_reference_create_symbolic(git_reference **ref_out, git_repository *repo,
* need a new reference because we can't make a symbolic ref out
* of an oid one.
* If if didn't exist, then we need to create a new one anyway.
- */
+ */
if (ref && ref->type & GIT_REF_SYMBOLIC){
updated = 1;
} else {
@@ -1131,7 +1113,7 @@ int git_reference_create_oid(git_reference **ref_out, git_repository *repo, cons
* need a new reference because we can't make a symbolic ref out
* of an oid one.
* If if didn't exist, then we need to create a new one anyway.
- */
+ */
if (ref && ref-> type & GIT_REF_OID){
updated = 1;
} else {
@@ -1362,10 +1344,10 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
* writes reflogs by default in any repo with a working directory:
*
* "We only enable reflogs in repositories that have a working directory
- * associated with them, as shared/bare repositories do not have
- * an easy means to prune away old log entries, or may fail logging
- * entirely if the user's gecos information is not valid during a push.
- * This heuristic was suggested on the mailing list by Junio."
+ * associated with them, as shared/bare repositories do not have
+ * an easy means to prune away old log entries, or may fail logging
+ * entirely if the user's gecos information is not valid during a push.
+ * This heuristic was suggested on the mailing list by Junio."
*
* Shawn O. Pearce - 0bee59186976b1d9e6b2dd77332480c9480131d5
*