|
44 | 44 | * throughout the life of the program (i.e. you cannot use an |
45 | 45 | * on-stack variable to hold this structure). |
46 | 46 | * |
47 | | - * * Attempts to create a lockfile by calling |
48 | | - * `hold_lock_file_for_update()` or `hold_lock_file_for_append()`. |
| 47 | + * * Attempts to create a lockfile by calling `hold_lock_file_for_update()`. |
49 | 48 | * |
50 | 49 | * * Writes new content for the destination file by either: |
51 | 50 | * |
|
73 | 72 | * Even after the lockfile is committed or rolled back, the |
74 | 73 | * `lock_file` object must not be freed or altered by the caller. |
75 | 74 | * However, it may be reused; just pass it to another call of |
76 | | - * `hold_lock_file_for_update()` or `hold_lock_file_for_append()`. |
| 75 | + * `hold_lock_file_for_update()`. |
77 | 76 | * |
78 | 77 | * If the program exits before `commit_lock_file()`, |
79 | 78 | * `commit_lock_file_to()`, or `rollback_lock_file()` is called, the |
@@ -120,8 +119,7 @@ struct lock_file { |
120 | 119 | * Flags |
121 | 120 | * ----- |
122 | 121 | * |
123 | | - * The following flags can be passed to `hold_lock_file_for_update()` |
124 | | - * or `hold_lock_file_for_append()`. |
| 122 | + * The following flags can be passed to `hold_lock_file_for_update()`. |
125 | 123 | */ |
126 | 124 |
|
127 | 125 | /* |
@@ -167,28 +165,18 @@ static inline int hold_lock_file_for_update( |
167 | 165 | return hold_lock_file_for_update_timeout(lk, path, flags, 0); |
168 | 166 | } |
169 | 167 |
|
170 | | -/* |
171 | | - * Like `hold_lock_file_for_update()`, but before returning copy the |
172 | | - * existing contents of the file (if any) to the lockfile and position |
173 | | - * its write pointer at the end of the file. The flags argument and |
174 | | - * error handling are described above. |
175 | | - */ |
176 | | -extern int hold_lock_file_for_append(struct lock_file *lk, |
177 | | - const char *path, int flags); |
178 | | - |
179 | 168 | /* |
180 | 169 | * Append an appropriate error message to `buf` following the failure |
181 | | - * of `hold_lock_file_for_update()` or `hold_lock_file_for_append()` |
182 | | - * to lock `path`. `err` should be the `errno` set by the failing |
183 | | - * call. |
| 170 | + * of `hold_lock_file_for_update()` to lock `path`. `err` should be the |
| 171 | + * `errno` set by the failing call. |
184 | 172 | */ |
185 | 173 | extern void unable_to_lock_message(const char *path, int err, |
186 | 174 | struct strbuf *buf); |
187 | 175 |
|
188 | 176 | /* |
189 | 177 | * Emit an appropriate error message and `die()` following the failure |
190 | | - * of `hold_lock_file_for_update()` or `hold_lock_file_for_append()` |
191 | | - * to lock `path`. `err` should be the `errno` set by the failing |
| 178 | + * of `hold_lock_file_for_update()` to lock `path`. `err` should be the |
| 179 | + * `errno` set by the failing |
192 | 180 | * call. |
193 | 181 | */ |
194 | 182 | extern NORETURN void unable_to_lock_die(const char *path, int err); |
|
0 commit comments