Skip to content

Commit 33403d1

Browse files
committed
fixup! status: carry the --no-lock-index option for backwards-compatibility
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 19107ef commit 33403d1

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

Documentation/git-status.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,6 @@ ignored, then the directory is not shown, but all contents are shown.
149149
threshold.
150150
See also linkgit:git-diff[1] `--find-renames`.
151151

152-
--no-lock-index::
153-
--lock-index::
154-
(DEPRECATED: use --no-optional-locks instead)
155-
Specifies whether `git status` should try to lock the index and
156-
update it afterwards if any changes were detected. Defaults to
157-
`--lock-index`.
158-
159152
<pathspec>...::
160153
See the 'pathspec' entry in linkgit:gitglossary[7].
161154

builtin/commit.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
14751475
{
14761476
static int no_renames = -1;
14771477
static const char *rename_score_arg = (const char *)-1;
1478-
static int no_lock_index = 0;
14791478
static struct wt_status s;
14801479
unsigned int progress_flag = 0;
14811480
int fd;
@@ -1514,9 +1513,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
15141513
OPT_CALLBACK_F('M', "find-renames", &rename_score_arg,
15151514
N_("n"), N_("detect renames, optionally set similarity index"),
15161515
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, opt_parse_rename_score),
1517-
OPT_BOOL(0, "no-lock-index", &no_lock_index,
1518-
N_("(DEPRECATED: use `git --no-optional-locks status` "
1519-
"instead) Do not lock the index")),
15201516
OPT_END(),
15211517
};
15221518

@@ -1533,12 +1529,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
15331529
finalize_colopts(&s.colopts, -1);
15341530
finalize_deferred_config(&s);
15351531

1536-
if (no_lock_index) {
1537-
warning("--no-lock-index is deprecated, use --no-optional-locks"
1538-
" instead");
1539-
setenv(GIT_OPTIONAL_LOCKS_ENVIRONMENT, "false", 1);
1540-
}
1541-
15421532
handle_untracked_files_arg(&s);
15431533
handle_ignored_arg(&s);
15441534

t/t7508-status.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,17 +1646,6 @@ test_expect_success '"Initial commit" should not be noted in commit template' '
16461646
test_i18ngrep ! "Initial commit" output
16471647
'
16481648

1649-
test_expect_success '--no-lock-index prevents index update and is deprecated' '
1650-
test-tool chmtime =1234567890 .git/index &&
1651-
git status --no-lock-index 2>err &&
1652-
grep "no-lock-index is deprecated" err &&
1653-
test-tool chmtime -v +0 .git/index >out &&
1654-
grep ^1234567890 out &&
1655-
git status &&
1656-
test-tool chmtime -v +0 .git/index >out &&
1657-
! grep ^1234567890 out
1658-
'
1659-
16601649
test_expect_success '--no-optional-locks prevents index update' '
16611650
test_set_magic_mtime .git/index &&
16621651
git --no-optional-locks status &&

0 commit comments

Comments
 (0)