threads / discuss / 46444

index.lock porcelain interface?

Subject: index.lock porcelain interface?

## tl;dr

One message between Jul 23, 2017 and Jul 23, 2017.

replies: 0people: 1as markdown or json

Jason Pyeron· Jul 23, 2017, 07:07 UTC · lore

While working on some scripts for continuous integration, we wanted to check if git was doing anything, before running our script.

The best we came up with was checking for the existence of index.lock or if a merge in progress. The MERGE_HEAD can be checked, but we chose to use git status --porcelain=v2 . Is there a better check than does .git/index.lock exists, e.g. a porcelain interface?

-Jason
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

← back to recent threads