[GSoC][PATCH v7 02/20] rebase -i: rewrite append_todo_help() in C

2018-08-28 Thread Alban Gruin
This rewrites append_todo_help() from shell to C. It also incorporates some parts of initiate_action() and complete_action() that also write help texts to the todo file. This also introduces the source file rebase-interactive.c. This file will contain functions necessary for interactive rebase

[GSoC][PATCH v7 00/20] rebase -i: rewrite in C

2018-08-28 Thread Alban Gruin
This patch series rewrite the interactive rebase from shell to C. It is based on ffc6fa0e39 ("Fourth batch for 2.19 cycle", 2018-07-24). This conflicts a bit with b9dfa238d5 ("Getting ready for -rc1", 2017-08-27) because of the range-diff, but a 3-way merge can solve these conflicts cleanly.

Re: Contributor Summit planning

2018-08-28 Thread Johannes Schindelin
Hi Stolee, On Mon, 27 Aug 2018, Derrick Stolee wrote: > On 8/27/2018 9:22 AM, Johannes Schindelin wrote: > > Point in favor of the pure-online meeting: the informal standup on IRC > > every second Friday. I really try to attend it (it is a bit awkward > > because it is on a Friday evening in my

[PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Tiago Botelho
This will enable users to implement bisecting on first parents which can be useful for when the commits from a feature branch that we want to merge are not always tested. Signed-off-by: Tiago Botelho --- This patch refactors **only** the tests according to the suggestions made by Junio in v5

Re: Questions about the hash function transition

2018-08-28 Thread Derrick Stolee
On 8/28/2018 8:04 AM, Johannes Schindelin wrote: Hi, On Thu, 23 Aug 2018, Jonathan Nieder wrote: Ævar Arnfjörð Bjarmason wrote: [...] Since all operations that make new objects (e.g., "git commit") add the new objects to the corresponding index, this mapping is possible for all objects in

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Nikolay Kasyanov wrote: > Hi, > > I’ve found something that may be a regression in git rebase implementation in > 2.18.0. > First I spotted it on macOS but I can also confirm it happening on Linux. > Git 2.19.0.rc0.48.gb9dfa238d is affected too. > > In order to trigger it,

Re: [PATCH 0/1] Teach the builtin rebase about the builtin interactive rebase

2018-08-28 Thread Johannes Schindelin
Hi Junio, On Mon, 27 Aug 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> Please include this information in the commit message. It's super > >> helpful to find this kind of information about why a patch does what > >> it does when encountering a patch later "in the wild" (in

Re: $GIT_DIR is no longer set when pre-commit hooks are called

2018-08-28 Thread Johannes Schindelin
Hi Peff, On Mon, 27 Aug 2018, Jeff King wrote: > On Mon, Aug 27, 2018 at 06:25:26PM +0200, Johannes Schindelin wrote: > > > On Sat, 25 Aug 2018, Jeff King wrote: > > > > > On Wed, Aug 22, 2018 at 04:16:00PM -0700, Gregory Oschwald wrote: > > > > > > diff --git a/builtin/commit.c

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Johannes Schindelin
Hi Tiago, On Tue, 28 Aug 2018, Tiago Botelho wrote: > This will enable users to implement bisecting on first parents > which can be useful for when the commits from a feature branch > that we want to merge are not always tested. This message is still lacking the explanation I asked for, namely

Re: Would a config var for --force-with-lease be useful?

2018-08-28 Thread Phillip Wood
Hi Johannes On 27/08/18 22:21, Johannes Schindelin wrote: Hi, On Sat, 25 Aug 2018, Constantin Weißer wrote: I think there are two aspects to using "force with lease". There is a third, very, very important aspect. When you use --force-with-lease (and I, for one, do, all the time), keep in

[GSoC][PATCH v7 11/20] rebase -i: rewrite complete_action() in C

2018-08-28 Thread Alban Gruin
This rewrites complete_action() from shell to C. A new mode is added to rebase--helper (`--complete-action`), as well as a new flag (`--autosquash`). Finally, complete_action() is stripped from git-rebase--interactive.sh. The original complete_action() would return the code 2 when the todo list

[GSoC][PATCH v7 19/20] rebase -i: remove git-rebase--interactive.sh

2018-08-28 Thread Alban Gruin
This removes git-rebase--interactive.sh, as its functionnality has been replaced by git-rebase--interactive2. git-rebase--interactive2.c is then renamed to git-rebase--interactive.c. Signed-off-by: Alban Gruin --- No changes since v6. .gitignore| 1 -

[GSoC][PATCH v7 04/20] rebase -i: rewrite the edit-todo functionality in C

2018-08-28 Thread Alban Gruin
This rewrites the edit-todo functionality from shell to C. To achieve that, a new command mode, `edit-todo`, is added, and the `write-edit-todo` flag is removed, as the shell script does not need to write the edit todo help message to the todo list anymore. The shell version is then stripped in

[GSoC][PATCH v7 20/20] rebase -i: move rebase--helper modes to rebase--interactive

2018-08-28 Thread Alban Gruin
This moves the rebase--helper modes still used by git-rebase--preserve-merges.sh (`--shorten-ids`, `--expand-ids`, `--check-todo-list`, `--rearrange-squash` and `--add-exec-commands`) to rebase--interactive.c. git-rebase--preserve-merges.sh is modified accordingly, and rebase--helper.c is removed

[GSoC][PATCH v7 15/20] rebase -i: rewrite write_basic_state() in C

2018-08-28 Thread Alban Gruin
This rewrites write_basic_state() from git-rebase.sh in C. This is the first step in the conversion of init_basic_state(), hence the mode in rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be converted in the next commit. The part of read_strategy_opts() that parses the

[GSoC][PATCH v7 14/20] rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C

2018-08-28 Thread Alban Gruin
This rewrites the part of init_revisions_and_shortrevisions() needed by `--complete-action` (which initialize $shortrevisions) from shell to C. When `upstream` is empty, it means that the user launched a `rebase --root`, and `onto` contains the ID of an empty commit. As a range between an empty

[GSoC][PATCH v7 09/20] sequencer: change the way skip_unnecessary_picks() returns its result

2018-08-28 Thread Alban Gruin
Instead of skip_unnecessary_picks() printing its result to stdout, it returns it into a struct object_id, as the rewrite of complete_action() (to come in the next commit) will need it. rebase--helper then is modified to fit this change. Signed-off-by: Alban Gruin --- No changes since v6.

[GSoC][PATCH v7 12/20] rebase -i: remove unused modes and functions

2018-08-28 Thread Alban Gruin
This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`, and `--checkout-onto` from rebase--helper.c, the functions of git-rebase--interactive.sh that were rendered useless by the rewrite of complete_action(), and append_todo_help_to_file() from rebase-interactive.c.

[GSoC][PATCH v7 18/20] rebase--interactive2: rewrite the submodes of interactive rebase in C

2018-08-28 Thread Alban Gruin
This rewrites the submodes of interactive rebase (`--continue`, `--skip`, `--edit-todo`, and `--show-current-patch`) in C. git-rebase.sh is then modified to call directly git-rebase--interactive2 instead of git-rebase--interactive.sh. Signed-off-by: Alban Gruin ---

[GSoC][PATCH v7 16/20] rebase -i: rewrite init_basic_state() in C

2018-08-28 Thread Alban Gruin
This rewrites init_basic_state() from shell to C. The call to write_basic_state() in cmd_rebase__helper() is replaced by a call to the new function. The shell version is then stripped from git-rebase--interactive.sh. Signed-off-by: Alban Gruin --- No changes since v6.

[GSoC][PATCH v7 13/20] rebase -i: implement the logic to initialize $revisions in C

2018-08-28 Thread Alban Gruin
This rewrites the part of init_revisions_and_shortrevisions() needed by `--make-script` from shell to C. The new version is called get_revision_ranges(), and is a static function inside of rebase--helper.c. As this does not initialize $shortrevision, the original shell version is not yet

[GSoC][PATCH v7 17/20] rebase -i: implement the main part of interactive rebase as a builtin

2018-08-28 Thread Alban Gruin
This rewrites the part of interactive rebase which initializes the basic state, make the script and complete the action, as a buitin, named git-rebase--interactive2 for now. Others modes (`--continue`, `--edit-todo`, etc.) will be rewritten in the next commit. git-rebase--interactive.sh is

[GSoC][PATCH v7 07/20] rebase -i: rewrite checkout_onto() in C

2018-08-28 Thread Alban Gruin
This rewrites checkout_onto() from shell to C. A new command (“checkout-onto”) is added to rebase--helper.c. The shell version is then stripped. Signed-off-by: Alban Gruin --- No changes since v6. builtin/rebase--helper.c | 7 ++- git-rebase--interactive.sh | 25

[GSoC][PATCH v7 06/20] rebase -i: rewrite setup_reflog_action() in C

2018-08-28 Thread Alban Gruin
This rewrites (the misnamed) setup_reflog_action() from shell to C. The new version is called prepare_branch_to_be_rebased(). A new command is added to rebase--helper.c, “checkout-base”, as well as a new flag, “verbose”, to avoid silencing the output of the checkout operation called by

[GSoC][PATCH v7 01/20] sequencer: make three functions and an enum from sequencer.c public

2018-08-28 Thread Alban Gruin
This makes rebase_path_todo(), get_missing_commit_check_level(), write_message() and the enum check_level accessible outside sequencer.c, renames check_level to missing_commit_check_level, and prefixes its value names by MISSING_COMMIT_ to avoid namespace pollution. This function and this enum

[GSoC][PATCH v7 05/20] sequencer: add a new function to silence a command, except if it fails

2018-08-28 Thread Alban Gruin
This adds a new function, run_command_silent_on_success(), to redirect the stdout and stderr of a command to a strbuf, and then to run that command. This strbuf is printed only if the command fails. It is functionnaly similar to output() from git-rebase.sh. run_git_commit() is then refactored to

[GSoC][PATCH v7 08/20] sequencer: refactor append_todo_help() to write its message to a buffer

2018-08-28 Thread Alban Gruin
This refactors append_todo_help() to write its message to a buffer instead of the todo-list. This is needed for the rewrite of complete_action(), which will come after the next commit. As rebase--helper still needs the file manipulation part of append_todo_help(), it is extracted to a temporary

[GSoC][PATCH v7 10/20] t3404: todo list with commented-out commands only aborts

2018-08-28 Thread Alban Gruin
If the todo list generated by `--make-script` is empty, complete_action() writes a noop, but if it has only commented-out commands, it will abort with the message "Nothing to do", and does not launch the editor. This adds a new test to ensure that complete_action() behaves this way.

[GSoC][PATCH v7 03/20] editor: add a function to launch the sequence editor

2018-08-28 Thread Alban Gruin
As part of the rewrite of interactive rebase, the sequencer will need to open the sequence editor to allow the user to edit the todo list. Instead of duplicating the existing launch_editor() function, this refactors it to a new function, launch_specified_editor(), which takes the editor as a

[PATCH] add -p: coalesce hunks before testing applicability

2018-08-28 Thread Jochen Sprickerhof
When a hunk was split before being edited manually, it does not apply anymore cleanly. Apply coalesce_overlapping_hunks() first to make it work. Enable test for it as well. Signed-off-by: Jochen Sprickerhof --- git-add--interactive.perl | 8 t/t3701-add-interactive.sh | 2 +- 2 files

[PATCH v4 0/8] use oidset for skiplist + docs + tests + comment support

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > Does that just mean that when cloning with --recursive with > transfer.fsckObjects=true we'll re-read the file for each "clone" > invocation, both for the main project and everything listed

[PATCH v4 5/8] fsck: add a performance test for skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
From: René Scharfe Create a performance test to see how the skipList implementation performs. First we setup N bad commits, then we see how progressively working our way up to 0..N in increments of 10x does. I.e. the needle(s) in the haystack get progressively more numerous. Signed-off-by: René

[PATCH v4 1/8] fsck tests: setup of bogus commit object

2018-08-28 Thread Ævar Arnfjörð Bjarmason
Several fsck tests used the exact same git-hash-object output, but had copy/pasted that part of the setup code. Let's instead do that setup once and use it in subsequent tests. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5504-fetch-receive-strict.sh | 8 1 file changed, 4

[PATCH v4 6/8] fsck: use strbuf_getline() to read skiplist file

2018-08-28 Thread Ævar Arnfjörð Bjarmason
From: René Scharfe The buffer is unlikely to contain a NUL character, so printing its contents using %s in a die() format is unsafe (detected with ASan). Use an idiomatic strbuf_getline() loop instead, which ensures the buffer is always NUL-terminated, supports CRLF files as well, accepts files

[PATCH v4 7/8] fsck: use oidset instead of oid_array for skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
From: René Scharfe Change the implementation of the skipList feature to use oidset instead of oid_array to store SHA-1s for later lookup. This list is parsed once on startup by fsck, fetch-pack or receive-pack depending on the *.skipList config in use. I.e. only once per invocation, but note

[PATCH v4 3/8] fsck: document and test sorted skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
Ever since the skipList support was first added in cd94c6f91 ("fsck: git receive-pack: support excluding objects from fsck'ing", 2015-06-22) the documentation for the format has that the file is a sorted list of object names. Thus, anyone using the feature would have thought the list needed to be

[PATCH v4 2/8] fsck tests: add a test for no skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
The recent 65a836fa6b ("fsck: add stress tests for fsck.skipList", 2018-07-27) added various stress tests for odd invocations of fsck.skipList, but didn't tests for some very simple ones, such as asserting that providing to skipList with a bad commit causes fsck to exit with a non-zero exit code.

[PATCH v4 8/8] fsck: support comments & empty lines in skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
It's annoying not to be able to put comments and empty lines in the skipList, when e.g. keeping a big central list of commits to skip in /etc/gitconfig, which was my motivation for 1362df0d41 ("fetch: implement fetch.fsck.*", 2018-07-27). Implement that, and document what version of Git this was

[PATCH v4 4/8] fsck: document and test commented & empty line skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
There is currently no comment syntax for the fsck.skipList, this isn't really by design, and it would be nice to have support for comments. Document that this doesn't work, and test for how this errors out. These tests reveal a current bug, if there's invalid input the output will emit some of

A rebase regression in Git 2.18.0

2018-08-28 Thread Nikolay Kasyanov
Hi, I’ve found something that may be a regression in git rebase implementation in 2.18.0. First I spotted it on macOS but I can also confirm it happening on Linux. Git 2.19.0.rc0.48.gb9dfa238d is affected too. In order to trigger it, a repo layout similar to the following is required: files/

Customize the sort of "git diff --stat" output

2018-08-28 Thread ROZAR Fabien
Hello there, I was looking for the possibility of sorting the output of the command "git diff --stat" by the number of modifications. Currently, the output of this command show the modified files by alphabetic order. I didn't find a "builtin" option which allows to sort the files by number of

Re: Questions about the hash function transition

2018-08-28 Thread Johannes Schindelin
Hi, On Thu, 23 Aug 2018, Jonathan Nieder wrote: > Ævar Arnfjörð Bjarmason wrote: > > [...] > >> Since all operations that make new objects (e.g., "git commit") add > >> the new objects to the corresponding index, this mapping is possible > >> for all objects in the object store. > > > > Are we

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Edward Thomson wrote: > On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason > wrote: >> If we instead had something like clean/smudge filters: >> >> [extensions] >> objectFilter = sha256-to-sha1 >> compatObjectFormat = sha1 >> [objectFilter

Re: [PATCH 0/1] Teach the builtin rebase about the builtin interactive rebase

2018-08-28 Thread Junio C Hamano
Johannes Schindelin writes: >> I do recall discouraging you from including irrelevant rant/whine in >> the log message a few times in the recent past, and also I do recall >> you never listening to me. Don't make me an excuse. > > Junio, I would really appreciate less emotional, and more

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Ævar Arnfjörð Bjarmason wrote: >> Transition plan >> --- > > One thing that's not covered in this document at all, which I feel is > missing, is how we're going to handle references to old commit IDs in > commit messages, bug trackers etc. once we go through the

Re: [PATCH v4 8/8] fsck: support comments & empty lines in skipList

2018-08-28 Thread René Scharfe
Am 28.08.2018 um 11:52 schrieb Ævar Arnfjörð Bjarmason: > It's annoying not to be able to put comments and empty lines in the > skipList, when e.g. keeping a big central list of commits to skip in > /etc/gitconfig, which was my motivation for 1362df0d41 ("fetch: > implement fetch.fsck.*",

Re: Questions about the hash function transition

2018-08-28 Thread Edward Thomson
On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason wrote: > If we instead had something like clean/smudge filters: > > [extensions] > objectFilter = sha256-to-sha1 > compatObjectFormat = sha1 > [objectFilter "sha256-to-sha1"] > clean = ... > smudge =

Re: [PATCH v3 6/7] fsck: use oidset for skiplist

2018-08-28 Thread René Scharfe
Am 27.08.2018 um 22:15 schrieb Ævar Arnfjörð Bjarmason: > > On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > >> From: René Scharfe >> >> Object IDs to skip are stored in a shared static oid_array. Lookups do >> a binary search on the sorted array. The code checks if the object IDs >> are

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-28 Thread Ben Peart
On 8/24/2018 2:40 PM, Duy Nguyen wrote: On Thu, Aug 23, 2018 at 7:33 PM Stefan Beller wrote: +core.fastIndex:: + Enable parallel index loading ++ +This can speed up operations like 'git diff' and 'git status' especially +when the index is very large. When enabled, Git will do the

Git in Outreachy Dec-Mar?

2018-08-28 Thread Jeff King
The Outreachy application period is set to begin on September 10th for interns participating in the December-March program. Do we want to participate? Details on the program are here: https://www.outreachy.org/communities/cfp/ If we want to, then we need: 1. Volunteers to mentor. This is

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Elijah Newren
On Tue, Aug 28, 2018 at 6:33 AM Johannes Schindelin wrote: > On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Aug 28 2018, Nikolay Kasyanov wrote: > > > > > I’ve found something that may be a regression in git rebase > > > implementation in 2.18.0. > > > First I spotted it on

Feature request: be able to pass arguments to difftool command

2018-08-28 Thread H.Merijn Brand
In short, I want to be able to do $ git difftool 5c5a -v2 where -v2 is passed to the tool invoked in the end. I'll elaborate on why ... Background. Some changes are not obvious to spot. One of the best examples I found is this one:

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Johannes Schindelin
Hi, On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote: > On Tue, Aug 28 2018, Nikolay Kasyanov wrote: > > > I’ve found something that may be a regression in git rebase implementation > > in 2.18.0. > > First I spotted it on macOS but I can also confirm it happening on Linux. > > Git

Re: Questions about the hash function transition

2018-08-28 Thread Junio C Hamano
Edward Thomson writes: > If I'm understanding you correctly, then on the libgit2 side, I'm very much > opposed to this proposal. We never execute commands, nor do I want to start > thinking that we can do so arbitrarily. We run in environments where that's > a non-starter > > At present, in

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Nikolay Kasyanov
Hi, Yes, it does fix this behavior. Could you please point me to the thread? Best, Nikolay > On 28. Aug 2018, at 15:33, Johannes Schindelin > wrote: > > Hi, > > On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote: > >> On Tue, Aug 28 2018, Nikolay Kasyanov wrote: >> >>> I’ve found something

Re: [PATCH] add -p: coalesce hunks before testing applicability

2018-08-28 Thread Junio C Hamano
Jochen Sprickerhof writes: > When a hunk was split before being edited manually, it does not apply > anymore cleanly. Apply coalesce_overlapping_hunks() first to make it > work. Enable test for it as well. > > Signed-off-by: Jochen Sprickerhof > --- > git-add--interactive.perl | 8 >

Re: [PATCH v1 00/25] RFC: structured logging

2018-08-28 Thread Jeff Hostetler
On 8/28/2018 1:38 PM, Junio C Hamano wrote: g...@jeffhostetler.com writes: From: Jeff Hostetler This RFC patch series adds structured logging to git. The motivation, ... Jeff Hostetler (25): structured-logging: design document structured-logging: add STRUCTURED_LOGGING=1 to

Re: Contributor Summit planning

2018-08-28 Thread Jonathan Nieder
Hi Derrick, Derrick Stolee wrote: > A focused aside, since you brought up the online "standup": it seems the IRC > channel has been less than ideal, with people trying to participate but > having nickname issues or being muted. You also describe another issue: the > timing. Having a real-time

Re: Contributor Summit planning

2018-08-28 Thread Jonathan Nieder
Jonathan Nieder wrote: > The current IRC experience might be a bit unrepresentative, due to > https://freenode.net/news/spam-shake: https://freenode.net/news/spambot-attack may be a better link. Thanks, Jonathan

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Tiago Botelho writes: > diff --git a/bisect.c b/bisect.c > index 4eafc8262..cb80f29c5 100644 > --- a/bisect.c > +++ b/bisect.c > @@ -82,15 +82,16 @@ static inline void weight_set(struct commit_list *elem, > int weight) > *((int*)(elem->item->util)) = weight; > } > > -static int

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Junio C Hamano
Elijah Newren writes: > - Add a flag to turn off directory rename detection, and set the > flag for every call from am.c in order to avoid problems like this. I'd say this is the only practical solution, before you deprecate the "pipe format-patch output to am -3" style of "git rebase" (and

Re: [PATCH 00/21] Kill the_index part 4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 7:32 PM Stefan Beller wrote: > > Besides some small conflicts on 'pu', like the previous part, it also > > breaks 'pu' because of API changes. The fix is trivial though, just > > prepend the_repository as the first argument for the broken function > > calls. > > This

[PATCH 1/2] tests: fix non-portable "${var:-"str"}" construct

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On both AIX 7200-00-01-1543 and FreeBSD 11.2-RELEASE-p2 the "${var:-"str"}" syntax means something different than what it does under the bash or dash shells. Both will consider the start of the new unescaped quotes to be a new argument to test_expect_success, resulting in the following error:

[PATCH 0/2] FreeBSD & AIX test portability fixes

2018-08-28 Thread Ævar Arnfjörð Bjarmason
This makes the vanilla test suite pass without errors on the FreeBSD system noted in the commit messages. On AIX things are still horribly broken, but this fixes one more issue that also affects that system. Ævar Arnfjörð Bjarmason (2): tests: fix non-portable "${var:-"str"}" construct

[PATCH 2/2] tests: fix non-portable iconv invocation

2018-08-28 Thread Ævar Arnfjörð Bjarmason
The iconv that comes with a FreeBSD 11.2-RELEASE-p2 box I have access to doesn't support the SHIFT-JIS encoding. Guard a test added in e92d62253 ("convert: add round trip check based on 'core.checkRoundtripEncoding'", 2018-04-15) first released with Git v2.18.0 with a prerequisite that checks for

Re: [PATCH 2/2] submodule.c: warn about missing submodule git directories

2018-08-28 Thread Junio C Hamano
Stefan Beller writes: > This is the continuation of f2d48994dc1 (submodule.c: submodule_move_head > works with broken submodules, 2017-04-18), which tones down the case of > "broken submodule" in case of a missing git directory of the submodule to > be only a warning. After seeing this warning,

Re: [PATCH 0/1] Teach the builtin rebase about the builtin interactive rebase

2018-08-28 Thread Jonathan Nieder
Johannes Schindelin wrote: > On Mon, 27 Aug 2018, Junio C Hamano wrote: >> Johannes Schindelin writes: >>> Jonathan Nieder wrote: Please include this information in the commit message. It's super helpful to find this kind of information about why a patch does what it does when

Re: Feature request: be able to pass arguments to difftool command

2018-08-28 Thread Junio C Hamano
"H.Merijn Brand" writes: > So, my wish would be to have an option, possibly using -- to pass > additional command line arguments to git difftool, so that > > $ git difftool $commit~1..$commit -- -m -v2 > > would pass the arguments after -- transparantly to ccdiff (in my case) At the syntax

Re: Questions about the hash function transition

2018-08-28 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Thu, 23 Aug 2018, Jonathan Nieder wrote: > > Ævar Arnfjörð Bjarmason wrote: >>> Are we going to need a midx version of these mapping files? How does >>> midx fit into this picture? Perhaps it's too obscure to worry about... >> >> That's a great question! I

Re: Questions about the hash function transition

2018-08-28 Thread Jonathan Nieder
Derrick Stolee wrote: > I'm not super-familiar with how the transition plan specifically needs this > mapping, but it seems like a good place to put it. Would you mind reading it through and letting me know your thoughts? More eyes can't hurt. Thanks, Jonathan

Re: [PATCH v1 00/25] RFC: structured logging

2018-08-28 Thread Junio C Hamano
g...@jeffhostetler.com writes: > From: Jeff Hostetler > > This RFC patch series adds structured logging to git. The motivation, > ... > > Jeff Hostetler (25): > structured-logging: design document > structured-logging: add STRUCTURED_LOGGING=1 to Makefile > structured-logging: add

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Tiago, > > On Tue, 28 Aug 2018, Tiago Botelho wrote: > >> This will enable users to implement bisecting on first parents >> which can be useful for when the commits from a feature branch >> that we want to merge are not always tested. > > This message is still

Re: [PATCH] read-cache.c: optimize reading index format v4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 9:36 PM Junio C Hamano wrote: > > PS. I notice that v4 does not pad to align entries at 4 byte boundary > > like v2/v3. This could cause a slight slow down on x86 and segfault on > > some other platforms. > > Care to elaborate? > > Long time ago, we used to mmap and read

RE: Git clean removing tracked files semi-regularly

2018-08-28 Thread Brennan Conroy
I'm using windows. Have had it happen on 8.1 and 10. "git status" shows "nothing to commit, working tree clean". I am using git version 2.17.1.windows.2 -Original Message- From: brian m. carlson Sent: Monday, August 27, 2018 5:58 PM To: Brennan Conroy Cc: git@vger.kernel.org Subject:

Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 8:37 PM Stefan Beller wrote: > > On Sun, Aug 26, 2018 at 3:03 AM Nguyễn Thái Ngọc Duy > wrote: > > > > This function calls do_diff_cache() which eventually needs to set this > > "istate" to unpack_options->src_index (*). This is an unfornate fact > > unfortunate > > >

[PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The commit-graph feature is tested in isolation by t5318-commit-graph.sh and t6600-test-reach.sh, but there are many more interesting scenarios involving commit walks. Many of these scenarios are covered by the existing test suite, but we need to maintain coverage when the

[PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Tim Schumacher
Previously, the sed command for generating manpage-base-url.xsl was printed to the console when being run. For the purpose of silencing it, define a $(QUIET) variable which contains an '@' if verbose mode isn't enabled and which is empty otherwise. This just silences the command invocation

Re: [PATCH 0/9] introducing oideq()

2018-08-28 Thread Jeff King
On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote: > > Due to the simplicity of the current code and our inlining, the compiler > > can usually figure this out for now. So I wouldn't expect this patch to > > actually improve performance right away. But as that discussion shows, > >

[PATCH v2 2/2] rerere: add note about files with existing conflict markers

2018-08-28 Thread Thomas Gummerer
When a file contains lines that look like conflict markers, 'git rerere' may fail not be able to record a conflict resolution. Emphasize that in the man page, and mention a possible workaround for the issue. Suggested-by: Junio C Hamano Signed-off-by: Thomas Gummerer --- Compared to v1, this

[PATCH v2 1/2] rerere: mention caveat about unmatched conflict markers

2018-08-28 Thread Thomas Gummerer
4af3220 ("rerere: teach rerere to handle nested conflicts", 2018-08-05) introduced slightly better behaviour if the user commits conflict markers and then gets another conflict in 'git rerere'. However this is just a heuristic to punt on such conflicts better, and doesn't deal with any unmatched

Re: [PATCH] commit-reach: correct accidental #include of C file

2018-08-28 Thread Derrick Stolee
On 8/28/2018 5:36 PM, Jonathan Nieder wrote: Without this change, the build breaks with clang: For some reason, it didn't fail with GCC for me, but this is an obviously correct change to make. Thanks! libgit/ref-filter.pic.o: multiple definition of 'filter_refs' libgit/commit-reach.pic.o:

Re: [PATCH 0/9] introducing oideq()

2018-08-28 Thread Derrick Stolee
On 8/28/2018 5:21 PM, Jeff King wrote: On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote: Due to the simplicity of the current code and our inlining, the compiler can usually figure this out for now. So I wouldn't expect this patch to actually improve performance right away. But

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-28 Thread Stefan Beller
> > > - echo "gitdir: > > > ../../../.git/modules/sub3/modules/dirdir/subsub" > > > >./sub3/dirdir/subsub/.git_expect > > > + echo "gitdir: > > > ../../../.git/modules/sub3/modules/dirdir%2fsubsub" > > > >./sub3/dirdir/subsub/.git_expect > > > > One interesting thing about

Re: [PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Junio C Hamano
Tim Schumacher writes: > Previously, the sed command for generating manpage-base-url.xsl > was printed to the console when being run. > > For the purpose of silencing it, define a $(QUIET) variable which > contains an '@' if verbose mode isn't enabled and which is empty > otherwise. This just

Re: GIT_TRACE doesn't show content filter files it's operating on

2018-08-28 Thread Stas Bekman
On 2018-08-27 06:13 PM, Stas Bekman wrote: [...] > I now know how get the filenames for "clean/smudge" filters. Can you > please help with the same for "textconv". %f doesn't work - it gets > stuck there waiting for stdin, the following seems to pass, but I'm not > sure it's correct: On a closer

Re: [PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-28 Thread Eric Sunshine
On Tue, Aug 28, 2018 at 4:14 PM Ævar Arnfjörð Bjarmason wrote: > On Fri, Aug 24 2018, Eric Sunshine wrote: > > Shortening the names makes them ugly and often unreadable. That's not > > a complaint with this patch; just a general observation regarding > > 8-byte limitation with this platform's

Trivial enhancement: All commands which require an author should accept --author

2018-08-28 Thread Ulrich Gemkow
Hello, A trivial enhancement request: All commands which require that the author is set (and complain if it is not set) should accept the option --author. At least the command stash does not accept this option. We are using git version 2.17.1 (Ubuntu 18.04). Thanks for the great work! Best

Re: [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Eric Sunshine
On Tue, Aug 28, 2018 at 5:31 PM Derrick Stolee wrote: > On 8/28/2018 4:41 PM, Stefan Beller wrote: > > On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget > > wrote: > >> + GIT_TEST_COMMIT_GRAPH=0 && > >> + test_must_fail git merge -m final G > > This

Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

2018-08-28 Thread Stefan Beller
> "r" it is! I forgot about it. But this is for local variable or > argument names only right? The field name (in diff_options for > example) should stay something more descriptive like repo, I think. Yea I agree, we should have more descriptive things in long lived structs. Thanks, Stefan

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> I would have preferred to reuse the already existing commits generated in >> the `setup` phase rather than generating yet another batch, and to not >> introduce an inconsistent way to present a commit graph (compare your >> diagram with

[PATCH 1/9] worktree: don't die() in library function find_worktree()

2018-08-28 Thread Eric Sunshine
Callers don't expect library function find_worktree() to die(); they expect it to return the named worktree if found, or NULL if not. Although find_worktree() itself never invokes die(), it calls real_pathdup() with 'die_on_error' incorrectly set to 'true', thus will die() indirectly if the

[PATCH 2/9] worktree: move delete_git_dir() earlier in file for upcoming new callers

2018-08-28 Thread Eric Sunshine
This is a pure code movement to avoid having to forward-declare the function when new callers are subsequently added. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/builtin/worktree.c

[PATCH 8/9] worktree: teach 'remove' to override lock when --force given twice

2018-08-28 Thread Eric Sunshine
For consistency with "add -f -f" and "move -f -f" which override the lock on a worktree, allow "remove -f -f" to do so, as well, as a convenience. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 1 + builtin/worktree.c | 11 ++- t/t2028-worktree-move.sh

[PATCH 9/9] worktree: delete .git/worktrees if empty after 'remove'

2018-08-28 Thread Eric Sunshine
For cleanliness, "git worktree prune" deletes the .git/worktrees directory if it is empty after pruning is complete. For consistency, make "git worktree remove " likewise delete .git/worktrees if it is empty after the removal. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 8

[PATCH 6/9] worktree: teach 'add' to respect --force for registered but missing path

2018-08-28 Thread Eric Sunshine
For safety, "git worktree add " will refuse to add a new worktree at if is already associated with a worktree entry, even if is missing (for instance, has been deleted or resides on non-mounted removable media or network share). The typical way to re-create a worktree at in such a situation is

[PATCH 0/9] worktree: fix bugs and broaden --force applicability

2018-08-28 Thread Eric Sunshine
This series started as a fix for a bug reported by Peff[1] in which the "database" of worktrees could be corrupted (or at least become internally inconsistent) by having multiple worktree entries associated with the same path. Peff's particular use-case for git-worktree is Documentation/doc-diff

[PATCH 7/9] worktree: teach 'move' to override lock when --force given twice

2018-08-28 Thread Eric Sunshine
For consistency with "add -f -f", which allows a missing but locked worktree path to be re-used, allow "move -f -f" to override a lock, as well, as a convenience. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 3 +++ builtin/worktree.c | 13 +

[PATCH 3/9] worktree: generalize delete_git_dir() to reduce code duplication

2018-08-28 Thread Eric Sunshine
prune_worktrees() and delete_git_dir() both remove worktree administrative entries from .git/worktrees, and their implementations are nearly identical. The only difference is that prune_worktrees() is also capable of removing a bogus non-worktree-related file from .git/worktrees. Simplify by

[PATCH 5/9] worktree: disallow adding same path multiple times

2018-08-28 Thread Eric Sunshine
A given path should only ever be associated with a single registered worktree. This invariant is enforced by refusing to create a new worktree at a given path if that path already exists. For example: $ git worktree add -q --detach foo $ git worktree add -q --detach foo fatal: 'foo'

[PATCH 4/9] worktree: prepare for more checks of whether path can become worktree

2018-08-28 Thread Eric Sunshine
Certain conditions must be met for a path to be a valid candidate as the location of a new worktree; for instance, the path must not exist or must be an empty directory. Although the number of conditions is small, new conditions will soon be added so factor out the existing checks into a separate

  1   2   >