Thread (41 messages) 41 messages, 2 authors, 2016-06-15

[PATCH v7 37/38] Move read_index() definition to read-cache.c

flat view
DORMANTno replies

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:02:37
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v7 of 2 in this series.

Revisions (2)
  1. v6 [diff vs current]
  2. v7 current
lockfile.c contains the general API for locking any file. Code
specifically about the index file doesn't belong here.

Signed-off-by: Michael Haggerty <redacted>
---
 lockfile.c   | 8 --------
 read-cache.c | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lockfile.c b/lockfile.c
index b2f5d36..63f4e94 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -340,14 +340,6 @@ int commit_lock_file(struct lock_file *lk)
 	return err;
 }
 
-int hold_locked_index(struct lock_file *lk, int die_on_error)
-{
-	return hold_lock_file_for_update(lk, get_index_file(),
-					 die_on_error
-					 ? LOCK_DIE_ON_ERROR
-					 : 0);
-}
-
 void rollback_lock_file(struct lock_file *lk)
 {
 	if (!lk->active)
diff --git a/read-cache.c b/read-cache.c
index e887e23..9f137e7 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1367,6 +1367,14 @@ static int read_index_extension(struct index_state *istate,
 	return 0;
 }
 
+int hold_locked_index(struct lock_file *lk, int die_on_error)
+{
+	return hold_lock_file_for_update(lk, get_index_file(),
+					 die_on_error
+					 ? LOCK_DIE_ON_ERROR
+					 : 0);
+}
+
 int read_index(struct index_state *istate)
 {
 	return read_index_from(istate, get_index_file());
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help