Skip to content

Commit 697cc8e

Browse files
mhaggergitster
authored andcommitted
lockfile.h: extract new header file for the functions in lockfile.c
Move the interface declaration for the functions in lockfile.c from cache.h to a new file, lockfile.h. Add #includes where necessary (and remove some redundant includes of cache.h by files that already include builtin.h). Move the documentation of the lock_file state diagram from lockfile.c to the new header file. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 216aab1 commit 697cc8e

35 files changed

+118
-83
lines changed

builtin/add.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include "cache.h"
77
#include "builtin.h"
8+
#include "lockfile.h"
89
#include "dir.h"
910
#include "pathspec.h"
1011
#include "exec_cmd.h"

builtin/apply.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*
88
*/
99
#include "cache.h"
10+
#include "lockfile.h"
1011
#include "cache-tree.h"
1112
#include "quote.h"
1213
#include "blob.h"

builtin/checkout-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*/
77
#include "builtin.h"
8-
#include "cache.h"
8+
#include "lockfile.h"
99
#include "quote.h"
1010
#include "cache-tree.h"
1111
#include "parse-options.h"

builtin/checkout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "cache.h"
21
#include "builtin.h"
2+
#include "lockfile.h"
33
#include "parse-options.h"
44
#include "refs.h"
55
#include "commit.h"

builtin/clone.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include "builtin.h"
12+
#include "lockfile.h"
1213
#include "parse-options.h"
1314
#include "fetch-pack.h"
1415
#include "refs.h"

builtin/commit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "cache.h"
9+
#include "lockfile.h"
910
#include "cache-tree.h"
1011
#include "color.h"
1112
#include "dir.h"

builtin/describe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "cache.h"
2+
#include "lockfile.h"
23
#include "commit.h"
34
#include "tag.h"
45
#include "refs.h"

builtin/diff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2006 Junio C Hamano
55
*/
66
#include "cache.h"
7+
#include "lockfile.h"
78
#include "color.h"
89
#include "commit.h"
910
#include "blob.h"

builtin/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
#include "builtin.h"
14-
#include "cache.h"
14+
#include "lockfile.h"
1515
#include "parse-options.h"
1616
#include "run-command.h"
1717
#include "sigchain.h"

builtin/merge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "cache.h"
1010
#include "parse-options.h"
1111
#include "builtin.h"
12+
#include "lockfile.h"
1213
#include "run-command.h"
1314
#include "diff.h"
1415
#include "refs.h"

0 commit comments

Comments
 (0)