Re: [RFC PATCH 2/2] grep: fallback to interpreter if JIT fails with pcre2

2018-12-09 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > starting with 10.23, and as a side effect of the work for bug1749[1] (grep > -P crash with seLinux), pcre2grep was modified to ignore any errors from > pcre2_jit_compile so the interpreter could be used as a fallback That may (or may not---I do not know and

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> @@ -32,14 +32,14 @@ all:: >> # USE_LIBPCRE is a synonym for USE_LIBPCRE2, define USE_LIBPCRE1 >> # instead if you'd like to use the legacy version 1 of the PCRE >> # library. Support for version 1 will likely be removed in some future >> -# release of Git, as

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > JIT support was added to 8.20 but the interface we rely on is only > enabled after 8.32 so try to make the message clearer. Could you add some word before 8.20 and 8.32 (e.g. "pcre library version 8.20", if that is what you are referring to, and if 8.32 is a

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Junio C Hamano
"brian m. carlson" writes: > Considering that some Linux users use PaX kernels with standard > distributions and that most BSD kernels can be custom-compiled with a > variety of options enabled or disabled, I think this is something we > should detect dynamically. > ... > My view is that JIT is a

Re: [PATCH] parse-options: fix SunCC compiler warning

2018-12-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The compiler reports this because show_gitcomp() never actually > returns a value: > > "parse-options.c", line 520: warning: Function has no return > statement : show_gitcomp > > The function calls exit() and will never return. Update and mark it > NORETURN

Re: [PATCH v3 2/3] commit-graph: fix buffer read-overflow

2018-12-09 Thread SZEDER Gábor
On Sun, Dec 09, 2018 at 01:01:29PM +0900, Junio C Hamano wrote: > Josh Steadmon writes: > > > diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh > > index 5fe21db99f..5b6b44b78e 100755 > > --- a/t/t5318-commit-graph.sh > > +++ b/t/t5318-commit-graph.sh > > @@ -366,24 +366,30 @@ > > G

Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-09 Thread Denton Liu
On Mon, Dec 10, 2018 at 12:21:05PM +0900, Junio C Hamano wrote: > I think v3 (which we see above) describes what it wants to do > clearly enough and implements what it wants to do cleanly. I do not > think the patch itself has much room for further improvement. > > When I re-read the final patch

Re: [PATCH 1/8] move worktree tests to t24*

2018-12-09 Thread Junio C Hamano
Thomas Gummerer writes: > The 'git worktree' command used to be just another mode in 'git > checkout', namely 'git checkout --to'. When the tests for the latter > were retrofitted for the former, the test name was adjusted, but the > test number was kept, even though the test is testing a differ

Re: [PATCH 0/8] introduce no-overlay and cached mode in git checkout

2018-12-09 Thread Junio C Hamano
Thomas Gummerer writes: > Basically the idea is to also delete files when the match > in 'git checkout -- ' in the current tree, but > don't match in . I cannot quite parse it, but perhaps. "git checkout --no-overlay -- " can remove paths in the index and in the working tree

Re: [PATCH] rebase docs: drop stray word in merge command description

2018-12-09 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Kyle, > > On Sat, 8 Dec 2018, Kyle Meyer wrote: > >> Delete a misplaced word introduced by caafecfcf1 (rebase >> --rebase-merges: adjust man page for octopus support, 2018-03-09). >> >> Signed-off-by: Kyle Meyer > > ACK. Thanks. > Too bad this did not make it

Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-09 Thread Junio C Hamano
Denton Liu writes: > On Sun, Dec 09, 2018 at 05:42:27PM +0900, Junio C Hamano wrote: >> * dl/merge-cleanup-scissors-fix (2018-11-21) 2 commits >> (merged to 'next' on 2018-11-21 at 217be06acb) >> + merge: add scissors line on merge conflict >> + t7600: clean up 'merge --squash c3 with c7' tes

[PATCH] fixup! test-lib: add the '--stress' option to run a test repeatedly under load

2018-12-09 Thread SZEDER Gábor
--- Erm. 'trace=t' must be set before checking whether the shell supports BASH_XTRACEFD. t/test-lib.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index e405191164..3e9916b39b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Carlo Arenas
On Sun, Dec 9, 2018 at 4:42 PM brian m. carlson wrote: > > On Mon, Dec 10, 2018 at 12:51:01AM +0100, Ævar Arnfjörð Bjarmason wrote: > > Obviously this & what you have in 2/2 needs to be fixed in some way. > > > > Is the issue on SELinux, OpenBSD, NetBSD etc. *how* PCRE is creating the > > the JIT'

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread brian m. carlson
On Mon, Dec 10, 2018 at 12:51:01AM +0100, Ævar Arnfjörð Bjarmason wrote: > Obviously this & what you have in 2/2 needs to be fixed in some way. > > Is the issue on SELinux, OpenBSD, NetBSD etc. *how* PCRE is creating the > the JIT'd code? I.e. presumably Google Chrome's JIT engine, Java JIT and >

Re: [RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 09 2018, Carlo Marcelo Arenas Belón wrote: [+CC pcre-dev] > JIT support was added to 8.20 but the interface we rely on is only > enabled after 8.32 so try to make the message clearer. > > in systems where there are restrictions against creating executable > pages programatically (li

[RFC PATCH 2/2] grep: fallback to interpreter if JIT fails with pcre2

2018-12-09 Thread Carlo Marcelo Arenas Belón
starting with 10.23, and as a side effect of the work for bug1749[1] (grep -P crash with seLinux), pcre2grep was modified to ignore any errors from pcre2_jit_compile so the interpreter could be used as a fallback [1] https://bugs.exim.org/show_bug.cgi?id=1749 Signed-off-by: Carlo Marcelo Arenas B

[RFC PATCH 1/2] grep: fallback to interpreter if JIT fails with pcre1

2018-12-09 Thread Carlo Marcelo Arenas Belón
JIT support was added to 8.20 but the interface we rely on is only enabled after 8.32 so try to make the message clearer. in systems where there are restrictions against creating executable pages programatically (like OpenBSD, NetBSD, macOS or seLinux) JIT will fail, resulting in a error message t

[RFC PATCH 0/2] fallback to interpreter if JIT fails with pcre

2018-12-09 Thread Carlo Marcelo Arenas Belón
while testing in NetBSD 8, was surprised to find that most test cases using PCRE2 where failing with some cryptic error from git : fatal: Couldn't JIT the PCRE2 pattern '$PATTERN', got '-48' interestingly enough, using a JIT enabled PCRE1 library (not the default) will show a similar error but

[PATCH v2 6/7] test-lib-functions: introduce the 'test_set_port' helper function

2018-12-09 Thread SZEDER Gábor
Several test scripts run daemons like 'git-daemon' or Apache, and communicate with them through TCP sockets. To have unique ports where these daemons are accessible, the ports are usually the number of the corresponding test scripts, unless the user overrides them via environment variables, and th

[PATCH v2 7/7] test-lib: add the '--stress' option to run a test repeatedly under load

2018-12-09 Thread SZEDER Gábor
Unfortunately, we have a few flaky tests, whose failures tend to be hard to reproduce. We've found that the best we can do to reproduce such a failure is to run the test repeatedly while the machine is under load, and wait in the hope that the load creates enough variance in the timing of the test

[PATCH v2 3/7] test-lib: consolidate naming of test-results paths

2018-12-09 Thread SZEDER Gábor
There are two places where we strip off any leading path components and the '.sh' suffix from the test script's pathname, and there are four places where we construct the name of the 't/test-results' directory or the name of various test-specific files in there. The last patch in this series will

[PATCH v2 5/7] test-lib: extract Bash version check for '-x' tracing

2018-12-09 Thread SZEDER Gábor
Some of our test scripts can't be reliably run with '-x' tracing enabled unless executed with a Bash version supporting BASH_XTRACEFD (since v4.1), and we have a lengthy condition to disable tracing if such a test script is not executed with a suitable Bash version. Move this check out from the op

[PATCH v2 4/7] test-lib: set $TRASH_DIRECTORY earlier

2018-12-09 Thread SZEDER Gábor
A later patch in this series will need to know the path to the trash directory early in 'test-lib.sh', but $TRASH_DIRECTORY is set much later. Furthermore, the path to the trash directory depends on the '--root=' option, which, too, is parsed too late. Move parsing '--root=...' to the early optio

[PATCH v2 1/7] test-lib: translate SIGTERM and SIGHUP to an exit

2018-12-09 Thread SZEDER Gábor
Right now if a test script receives SIGTERM or SIGHUP (e.g., because a test was hanging and the user 'kill'-ed it or simply closed the terminal window the test was running in), the shell exits immediately. This can be annoying if the test script did any global setup, like starting apache or git-dae

[PATCH v2 2/7] test-lib: parse some --options earlier

2018-12-09 Thread SZEDER Gábor
'test-lib.sh' looks for the presence of certain options like '--tee' and '--verbose-log', so it can execute the test script again to save its standard output and error. This happens way before the actual option parsing loop, and the condition looking for these options looks a bit odd, too. This p

[PATCH v2 0/7] test-lib: add the '--stress' option to help reproduce occasional failures in flaky tests

2018-12-09 Thread SZEDER Gábor
This patch series tries to make reproducing rare failures in flaky tests easier: it adds the '--stress' option to our test library to run the test script repeatedly in multiple parallel jobs, in the hope that the increased load creates enough variance in the timing of the test's commands that suc

Hospital message

2018-12-09 Thread Judith Chemla
Hello, I am Mrs. Judith Chemla I suffer from a Terminal Throat Cancer. I wish to make a donation of 4.700.000 € to help the poor. Answer me so that I give you more details. Very serious message. cordially Mrs. Judith Chemla

pw/add-p-select, was Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-09 Thread Johannes Schindelin
Hi Junio, On Sun, 9 Dec 2018, Junio C Hamano wrote: > * pw/add-p-select (2018-07-26) 4 commits > - add -p: optimize line selection for short hunks > - add -p: allow line selection to be inverted > - add -p: select modified lines correctly > - add -p: select individual hunk lines > > "git ad

[PATCH 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-09 Thread Thomas Gummerer
When marking cache entries for removal, and later removing them all at once using 'remove_marked_cache_entries()', cache entries currently have to be invalidated manually in the cache tree and in the untracked cache. Add an invalidate flag to the function. With the flag set, the function will tak

[PATCH 7/8] checkout: allow ignoring unmatched pathspec

2018-12-09 Thread Thomas Gummerer
Currently when 'git checkout -- ...' is invoked with multiple pathspecs, where one or more of the pathspecs don't match anything, checkout errors out. This can be inconvenient in some cases, such as when using git checkout from a script. Introduce a new --ignore-unmatched option, which which allo

[PATCH 2/8] entry: factor out unlink_entry function

2018-12-09 Thread Thomas Gummerer
Factor out the 'unlink_entry()' function from unpack-trees.c to entry.c. It will be used in other places as well in subsequent steps. As it's no longer a static function, also move the documentation to the header file to make it more discoverable. Signed-off-by: Thomas Gummerer --- cache.h

[PATCH 3/8] entry: support CE_WT_REMOVE flag in checkout_entry

2018-12-09 Thread Thomas Gummerer
'checkout_entry()' currently only supports creating new entries in the working tree, but not deleting them. Add the ability to remove entries at the same time if the entry is marked with the CE_WT_REMOVE flag. Currently this doesn't have any effect, as the CE_WT_REMOVE flag is only used in unpack

[PATCH 5/8] checkout: introduce --{,no-}overlay option

2018-12-09 Thread Thomas Gummerer
Currently 'git checkout' is defined as an overlay operation, which means that if in 'git checkout -- []' we have an entry in the index that matches , but that doesn't exist in , that entry will not be removed from the index or the working tree. Introduce a new --{,no-}overlay option, which allows

[PATCH 6/8] checkout: add --cached option

2018-12-09 Thread Thomas Gummerer
Add a new --cached option to git checkout, which works only on the index, but not the working tree, similar to what 'git reset -- ... does. Indeed the tests are adapted from the 'git reset' tests. In the longer term the idea is to potentially deprecate 'git reset -- ...', so the 'git reset' com

[PATCH 8/8] stash: use git checkout --no-overlay

2018-12-09 Thread Thomas Gummerer
Now that we have 'git checkout --no-overlay', we can use it in git stash, making the codepaths for 'git stash push' with and without pathspec more similar, and thus easier to follow. Signed-off-by: Thomas Gummerer --- As mentioned in the cover letter, not sure if we want to apply this now. Ther

[PATCH 0/8] introduce no-overlay and cached mode in git checkout

2018-12-09 Thread Thomas Gummerer
Here's the series I mentioned a couple of times on the list already, introducing a no-overlay mode in 'git checkout'. The inspiration for this came from Junios message in [*1*]. Basically the idea is to also delete files when the match in 'git checkout -- ' in the current tree, but don't match

[PATCH 1/8] move worktree tests to t24*

2018-12-09 Thread Thomas Gummerer
The 'git worktree' command used to be just another mode in 'git checkout', namely 'git checkout --to'. When the tests for the latter were retrofitted for the former, the test name was adjusted, but the test number was kept, even though the test is testing a different command now. t/README states:

Re: [PATCH] rebase docs: drop stray word in merge command description

2018-12-09 Thread Johannes Schindelin
Hi Kyle, On Sat, 8 Dec 2018, Kyle Meyer wrote: > Delete a misplaced word introduced by caafecfcf1 (rebase > --rebase-merges: adjust man page for octopus support, 2018-03-09). > > Signed-off-by: Kyle Meyer ACK. Too bad this did not make it into v2.20.0, but at least it can make it into a futur

Announcing Pro Git Second Edition Reedited

2018-12-09 Thread Jon Forrest
Several years ago I released what I called Pro Git Reedited. This was an attempt to tighten up the text of the excellent Pro Git book written by Scott Chacon. Since then, Scott and Ben Straub released the second edition of Pro Git so once again I'm releasing a reedited version of what they wrote.

Git Test Coverage Report (Sunday, Dec 9)

2018-12-09 Thread Derrick Stolee
Here is today's coverage report. Thanks, -Stolee [1] https://dev.azure.com/git/git/_build/results?buildId=287 --- pu: dfcf84ebfa17eb0bb3b57806fa530e87d8c8f1b8 jch: dd824ca506dbdf198282714b0bd21665c5825b4d next: bc1bbc6f855c3b5ef7fcbd0f688f647c4e5b208b master: 5d826e972970a784bd7a7bdf587512510

[PATCH 08/24] add--interactive: support backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- git-add--interactive.perl | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 20eb81cc92..730133f57e 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive

[PATCH 06/24] commit: support backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 16 +++- t/t2080-backup-log.sh | 24 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index c021b119bb..2bdbeff4a2 100644 --- a/builtin/commit.c

[PATCH 10/24] backup-log: add cat command

2018-12-09 Thread Nguyễn Thái Ngọc Duy
This command introduces a new concept, "change id". This is similar to "n" in reflog sha-1 extended syntax @{n}. I'm trying to group changes of the same second together, and this timestamp becomes "change id", so you view roughly a snapshot of changes. Of course it's not 100% accurate. But it works

[PATCH 22/24] am: keep backup of overwritten files on --skip or --abort

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/am.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/am.c b/builtin/am.c index 8f27f3375b..098bbaab39 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1886,6 +1886,9 @@ static int fast_forward_to(struct tree *head, struct tree *remot

[PATCH 17/24] config --edit: support backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/config.c | 27 ++- t/t2080-backup-log.sh | 14 ++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/builtin/config.c b/builtin/config.c index 84385ef165..a42044d03e 100644 --- a/builtin/config.c

[PATCH 18/24] refs: keep backup of deleted reflog

2018-12-09 Thread Nguyễn Thái Ngọc Duy
As noted in git-backup-log.txt a long time ago, this is mostly meant for recovering a branch immediately after an accidental deletion. References from the deleted reflog will not be included in reachability tests and they will be deleted at the next gc. At that point, this deleted reflog becomes u

[PATCH 21/24] checkout -f: keep backup of overwritten files

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/checkout.c b/builtin/checkout.c index b5e27a5f6d..3ae001ae35 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -438,6 +438,8 @@ static int reset_tree(struct tree *tre

[PATCH 20/24] reset --hard: keep backup of overwritten files

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reset.c | 2 ++ merge-recursive.c | 2 +- t/t2080-backup-log.sh | 14 + unpack-trees.c| 70 +-- unpack-trees.h| 3 +- 5 files changed, 74 insertions(+), 17 deletions(-) di

[PATCH 09/24] backup-log.c: add API for walking backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- backup-log.c | 173 +++ backup-log.h | 21 ++- 2 files changed, 193 insertions(+), 1 deletion(-) diff --git a/backup-log.c b/backup-log.c index c1e805b09e..49f2ce68fe 100644 --- a/backup-log.c +++ b/back

[PATCH 07/24] apply: support backup log with --keep-backup

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Normally changes from git-apply are not worth logging because they come from a file and can be recovered from there. This option will mostly be used by add--interactive.pl where patches are generated during an interactive add session and are very much worth logging. The logging is a bit more compl

[PATCH 14/24] gc: prune backup logs

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- backup-log.c | 33 + backup-log.h | 1 + builtin/gc.c | 3 +++ 3 files changed, 37 insertions(+) diff --git a/backup-log.c b/backup-log.c index 5e38725981..dbb6d5487e 100644 --- a/backup-log.c +++ b/backup-log.c @@ -4,6 +4

[PATCH 24/24] FIXME

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-backup-log.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/git-backup-log.txt b/Documentation/git-backup-log.txt index 98998156c1..fe03726337 100644 --- a/Documentation/git-backup-log.txt +++ b/Documentation/git-bac

[PATCH 13/24] backup-log: add prune command

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- backup-log.c | 71 backup-log.h | 3 ++ builtin/backup-log.c | 17 +++ 3 files changed, 91 insertions(+) diff --git a/backup-log.c b/backup-log.c index 49f2ce68fe..5e38725981 100644 ---

[PATCH 12/24] backup-log: add log command

2018-12-09 Thread Nguyễn Thái Ngọc Duy
One note about the default relative mode. Since this is mostly used after a panic moment "oops I did it again!". The user would most likely look for latest changes of a certain path and relative dates make it easier to spot if the change is within a time frame. Default to --patch too because the o

[PATCH 19/24] unpack-trees.c: keep backup of ignored files being overwritten

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Ignored files are usually machine generated (e.g. *.o) and not worth keeping, so when a merge or branch switch happens and need to overwrite them, we just go ahead and do it. Occasionally though ignored files _can_ have valuable content. We will likely have a separate mechanism to protect these "p

[PATCH 23/24] rebase: keep backup of overwritten files on --skip or --abort

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rebase.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index b5c99ec10c..5c7b223843 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -573,8 +573,12 @@ static int reset_head(struct

[PATCH 11/24] backup-log: add diff command

2018-12-09 Thread Nguyễn Thái Ngọc Duy
This gives you a patch so you can apply if you want. FIXME pathspec support? PS. the file list in diff queue is not sorted like a normal "git diff". If this is a big deal, we probably can sort it later. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/backup-log.c | 100 +++

[PATCH 16/24] sha1-file.c: let index_path() accept NULL istate

2018-12-09 Thread Nguyễn Thái Ngọc Duy
istate is needed for content conversion. Allow to pass NULL istate (which implies that the caller does not care at all about file content conversion). Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1-file.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sha1-file.c b/sha

[PATCH 15/24] backup-log: keep all blob references around

2018-12-09 Thread Nguyễn Thái Ngọc Duy
The four commands prune, rev-list, pack-objects and repack are updated to not consider backup-log's blobs as unreachable and either delete them outright or not repack them. Signed-off-by: Nguyễn Thái Ngọc Duy --- backup-log.c | 65 ++ backup-log.

[PATCH 04/24] add: support backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
There is not much to say about the actual change in this patch, which is straightforward. There is something to say about the lack of change though. The definition of "interesting" changes to keep in backup log previously is "file modification, except file removal". It is further refined: only cha

[PATCH 03/24] read-cache.c: new flag for add_index_entry() to write to backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Index update API is updated to write to backup log if requested. The entry deletion API is not updated because file removal is not "interesting" from the undo point of view. Note, we do double locking when writing $GIT_DIR/index now: - $GIT_DIR/index.lock is created - then $GIT_DIR/index.bkl.lock

[PATCH 01/24] doc: introduce new "backup log" concept

2018-12-09 Thread Nguyễn Thái Ngọc Duy
A reflog file records changes of a certain ref over time. A backup log file does a similar job, but it records changes of some files over time. This is the main idea of it. This is added so that we can support undoing certain changes. For example, if you have carefully prepared your index with "gi

[PATCH 05/24] update-index: support backup log with --keep-backup

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Since this is a plumbing command, backup log support remains off by default and only active when both --keep-backup and core.backupLog=true are specified. The check of core.backupLog is mostly for convenient, the calling script does not have to explicitly check core.backupLog every time it execute

[RFC PATCH 00/24] Add backup log

2018-12-09 Thread Nguyễn Thái Ngọc Duy
"Backup log" is similar to reflog. But instead of keeping track of ref changes, it keeps track of file content changes. These could be from the index (e.g. "git add" replacing something in the index), worktree ("git reset --hard" deleting everything) or in gitdir ("git config --edit", or deleted re

[PATCH 02/24] backup-log: add "update" subcommand

2018-12-09 Thread Nguyễn Thái Ngọc Duy
This defines backup log file format and adds basic support for writing new entries to backup log files. The format is the same as reflog except that "message" field becomes "path". Similar to reflog, updating is done by appending to the end of the file instead of creating a branch new file and do

[PATCH] parse-options: fix SunCC compiler warning

2018-12-09 Thread Nguyễn Thái Ngọc Duy
The compiler reports this because show_gitcomp() never actually returns a value: "parse-options.c", line 520: warning: Function has no return statement : show_gitcomp The function calls exit() and will never return. Update and mark it NORETURN. Reported-by: Ævar Arnfjörð Bjarmason Signe

[PATCH] style: the opening '{' of a function is in a separate line

2018-12-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- bisect.c | 3 ++- builtin/config.c | 3 ++- builtin/push.c | 4 +++- convert.c | 3 ++- credential-cache--daemon.c | 3 ++- diff.c | 6 -- git.c | 3 ++- i

Re: What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-09 Thread Denton Liu
On Sun, Dec 09, 2018 at 05:42:27PM +0900, Junio C Hamano wrote: > * dl/merge-cleanup-scissors-fix (2018-11-21) 2 commits > (merged to 'next' on 2018-11-21 at 217be06acb) > + merge: add scissors line on merge conflict > + t7600: clean up 'merge --squash c3 with c7' test > > The list of conflic

[ANNOUNCE] Git v2.20.0

2018-12-09 Thread Junio C Hamano
The latest feature release Git v2.20.0 is now available at the usual places. It is comprised of 962 non-merge commits since v2.19.0 (this is by far the largest release in v2.x.x series), contributed by 83 people, 26 of which are new faces. The tarballs are found at: https://www.kernel.org/pu

What's cooking in git.git (Dec 2018, #01; Sun, 9)

2018-12-09 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. Git 2.20 has been tagged. I'd exp