Files
git/builtin
Johannes Schindelin c480eeb574 commit --interactive: make it work with the built-in add -i
The built-in `git add -i` machinery obviously has its `the_repository`
structure initialized at the point where `cmd_commit()` calls it, and
therefore does not look at the environment variable `GIT_INDEX_FILE`.

But when being called from `commit --interactive`, it has to, because
the index was already locked in that case, and we want to ask the
interactive add machinery to work on the `index.lock` file instead of
the `index` file.

Technically, we could teach `run_add_i()`, or for that matter
`run_add_p()`, to look specifically at that environment variable, but
the entire idea of passing in a parameter of type `struct repository *`
is to allow working on multiple repositories (and their index files)
independently.

So let's instead override the `index_file` field of that structure
temporarily.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-12-21 16:06:22 -08:00
..
2019-10-15 13:47:59 +09:00
2019-10-11 14:24:48 +09:00
2019-09-18 11:50:09 -07:00
2019-10-11 14:24:48 +09:00
2019-01-29 12:47:54 -08:00
2019-10-15 13:48:02 +09:00
2019-04-25 16:41:12 +09:00
2019-10-15 13:48:02 +09:00
2018-10-19 13:34:02 +09:00
2019-09-18 11:50:09 -07:00
2019-09-30 13:19:32 +09:00
2019-10-07 11:32:53 +09:00
2019-05-13 14:22:54 +09:00
2019-08-19 13:05:58 -07:00
2019-10-15 13:48:03 +09:00
2019-10-11 14:24:46 +09:00
2019-10-11 14:24:46 +09:00
2019-07-19 11:30:21 -07:00
2019-10-11 14:24:48 +09:00
2019-06-19 08:19:21 -07:00
2019-10-11 14:24:48 +09:00