Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2014-01-28 01:24:10 +0400
committerBen Straub <bs@github.com>2014-01-31 03:51:00 +0400
commit6357388e983be6ad5831d63b84aeb2f9c449411e (patch)
tree73cf84782ef40139c089fe62ea7ea09d51f48dcc /src/refdb_fs.c
parenta2311f92c29e0fee5348d580c3318cf6724cd765 (diff)
Enhance clarity
Diffstat (limited to 'src/refdb_fs.c')
-rw-r--r--src/refdb_fs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 9ae784782..41ff01998 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -1438,8 +1438,10 @@ static int reflog_append(refdb_fs_backend *backend, const git_reference *ref, co
git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
git_repository *repo = backend->repo;
- /* Creation of symbolic references doesn't get a reflog entry */
- if (ref->type == GIT_REF_SYMBOLIC && strcmp(ref->name, GIT_HEAD_FILE))
+ /* Creation of a symbolic reference doesn't get a reflog entry, except for
+ * HEAD. git_repository_set_head and friends go through here. */
+ if (ref->type == GIT_REF_SYMBOLIC &&
+ 0 != strcmp(ref->name, GIT_HEAD_FILE))
return 0;
error = git_reference_name_to_id(&old_id, repo, ref->name);