File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -187,13 +187,12 @@ static int need_to_gc(void)
187
187
static const char * lock_repo_for_gc (int force , pid_t * ret_pid )
188
188
{
189
189
static struct lock_file lock ;
190
- static char locking_host [128 ];
191
190
char my_host [128 ];
192
191
struct strbuf sb = STRBUF_INIT ;
193
192
struct stat st ;
194
193
uintmax_t pid ;
195
194
FILE * fp ;
196
- int fd , should_exit ;
195
+ int fd ;
197
196
198
197
if (pidfile )
199
198
/* already locked */
@@ -205,6 +204,8 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
205
204
fd = hold_lock_file_for_update (& lock , git_path ("gc.pid" ),
206
205
LOCK_DIE_ON_ERROR );
207
206
if (!force ) {
207
+ static char locking_host [128 ];
208
+ int should_exit ;
208
209
fp = fopen (git_path ("gc.pid" ), "r" );
209
210
memset (locking_host , 0 , sizeof (locking_host ));
210
211
should_exit =
You can’t perform that action at this time.
0 commit comments