This makes it harder to misread the name as LOCK_NODE_REF.
Suggested-by: Torsten Bögershausen <[email protected]>
Signed-off-by: Michael Haggerty <[email protected]>
---
Documentation/technical/api-lockfile.txt | 4 ++--
cache.h | 2 +-
lockfile.c | 4 ++--
refs.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/technical/api-lockfile.txt
b/Documentation/technical/api-lockfile.txt
index 3ee4299..40cd524 100644
--- a/Documentation/technical/api-lockfile.txt
+++ b/Documentation/technical/api-lockfile.txt
@@ -31,11 +31,11 @@ hold_lock_file_for_update::
to the file. The flags parameter is a combination of
+
--
-LOCK_NODEREF::
+LOCK_NO_DEREF::
Usually symbolic links in path are resolved in path and the
lockfile is created by adding ".lock" to the resolved path;
- however, if `LOCK_NODEREF` is set, then the lockfile is
+ however, if `LOCK_NO_DEREF` is set, then the lockfile is
created by adding ".lock" to the path argument itself.
LOCK_DIE_ON_ERROR::
diff --git a/cache.h b/cache.h
index 45688d5..d610fab 100644
--- a/cache.h
+++ b/cache.h
@@ -583,7 +583,7 @@ struct lock_file {
struct strbuf filename;
};
#define LOCK_DIE_ON_ERROR 1
-#define LOCK_NODEREF 2
+#define LOCK_NO_DEREF 2
extern int unable_to_lock_error(const char *path, int err);
extern void unable_to_lock_message(const char *path, int err,
struct strbuf *buf);
diff --git a/lockfile.c b/lockfile.c
index 480c2ba..432d624 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -17,7 +17,7 @@
*
* Usually, if $FILENAME is a symlink, then it is resolved, and the
* file ultimately pointed to is the one that is locked and later
- * replaced. However, if LOCK_NODEREF is used, then $FILENAME
+ * replaced. However, if LOCK_NO_DEREF is used, then $FILENAME
* itself is locked and later replaced, even if it is a symlink.
*
* 2. Write the new file contents to the lockfile.
@@ -186,7 +186,7 @@ static int lock_file(struct lock_file *lk, const char
*path, int flags)
}
strbuf_add(&lk->filename, path, pathlen);
- if (!(flags & LOCK_NODEREF))
+ if (!(flags & LOCK_NO_DEREF))
resolve_symlink(&lk->filename);
strbuf_addstr(&lk->filename, LOCK_SUFFIX);
lk->fd = open(lk->filename.buf, O_RDWR | O_CREAT | O_EXCL, 0666);
diff --git a/refs.c b/refs.c
index c6e15f9a..525ce4b 100644
--- a/refs.c
+++ b/refs.c
@@ -2134,7 +2134,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char
*refname,
lflags = 0;
if (flags & REF_NODEREF) {
refname = orig_refname;
- lflags |= LOCK_NODEREF;
+ lflags |= LOCK_NO_DEREF;
}
lock->ref_name = xstrdup(refname);
lock->orig_ref_name = xstrdup(orig_refname);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html