Skip to content

Commit

Permalink
Merge branch 'status-no-lock-index'
Browse files Browse the repository at this point in the history
This branch allows third-party tools to call `git status
--no-lock-index` to avoid lock contention with the interactive Git usage
of the actual human user.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 19, 2017
2 parents 09a79c9 + b8b0c5a commit c09b8a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion Documentation/git-status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ configuration variable documented in linkgit:git-config[1].
without options are equivalent to 'always' and 'never'
respectively.

<pathspec>...::
See the 'pathspec' entry in linkgit:gitglossary[7].

OUTPUT
Expand Down
3 changes: 3 additions & 0 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,7 @@ static int git_status_config(const char *k, const char *v, void *cb)

int cmd_status(int argc, const char **argv, const char *prefix)
{
static int no_lock_index = 0;
static struct wt_status s;
int fd;
struct object_id oid;
Expand Down Expand Up @@ -1381,6 +1382,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
N_("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)"),
PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
OPT_COLUMN(0, "column", &s.colopts, N_("list untracked files in columns")),
OPT_BOOL(0, "no-lock-index", &no_lock_index,
N_("do not lock the index")),
OPT_END(),
};

Expand Down

0 comments on commit c09b8a9

Please sign in to comment.