Re: [GSoC][PATCH v2 0/3] rebase -i: rewrite reflog operations in C

2018-06-21 Thread Johannes Schindelin
Hi Alban, On Tue, 19 Jun 2018, Alban Gruin wrote: > -- > 2.16.4 You might want to update ;-) https://github.com/git-for-windows/git/wiki/FAQ#should-i-upgrade-to-a-newer-git-for-windows-version Ciao, Johannes

Re: Hash algorithm analysis

2018-06-21 Thread Johannes Schindelin
Hi Ævar, On Mon, 11 Jun 2018, Ævar Arnfjörð Bjarmason wrote: > On Sat, Jun 09 2018, brian m. carlson wrote: > > [Expanding the CC list to what we had in the last "what hash" thread[1] > last year]. > > > == Discussion of Candidates > > > > I've implemented and tested the following algorithms,

Re: [PATCH 2/2] sequencer.c: plug mem leak in git_sequencer_config

2018-06-21 Thread Johannes Schindelin
Hi Peff, On Mon, 4 Jun 2018, Jeff King wrote: > On Mon, Jun 04, 2018 at 01:26:57PM +0900, Junio C Hamano wrote: > > > And at that point, maybe > > > > char *some_var = xstrdup("default"); > > git_config_string(_var, ...); > > > > that takes "char **" and frees the current storage

Re: [GSoC][PATCH v2 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-21 Thread Johannes Schindelin
Hi Alban, On Tue, 19 Jun 2018, Alban Gruin wrote: > diff --git a/sequencer.c b/sequencer.c > index a7a73e3ef..9165bf96c 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -3161,6 +3161,25 @@ int checkout_base_commit(struct replay_opts *opts, > const char *commit, > return 0; > } > >

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-21 Thread Antonio Ospite
On Wed, 20 Jun 2018 12:10:42 -0700 Stefan Beller wrote: > Hi Antonio! > > On Wed, Jun 20, 2018 at 11:06 AM Antonio Ospite wrote: > > I get that the _content_ of .gitmodules is not meant to be generic > > config, but I still see some value in having a single point when its > > _location_ is

Re: [PATCH v2 0/7] grep.c: teach --column to 'git-grep(1)'

2018-06-21 Thread Jeff King
On Thu, Jun 21, 2018 at 07:53:02AM -0400, Jeff King wrote: > > @@ -1429,7 +1447,7 @@ static void show_line(struct grep_opt *opt, char > > *bol, char *eol, > > */ > > if (opt->columnnum && cno) { > > char buf[32]; > > - xsnprintf(buf, sizeof(buf), "%d", cno); > > +

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-21 Thread Johannes Schindelin
Hi Elijah, On Wed, 20 Jun 2018, Elijah Newren wrote: > On Sun, Jun 17, 2018 at 2:44 PM, Johannes Schindelin > wrote: > > > I was really referring to speed. But I have to admit that I do not have > > any current numbers. > > > > Another issue just hit me, though: rebase --am does not need to

Re: [GSoC][PATCH v2 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-21 Thread Johannes Schindelin
Hi Alban, On Tue, 19 Jun 2018, Alban Gruin wrote: > This rewrites setup_reflog_action() from shell to C. The new version is > called checkout_base_commit(). This sounds like a serious mistake. How is it that a function that sets up a reflog action all of a sudden checks out a base commit? But

Re: [GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Johannes Schindelin
Hi Alban, On Tue, 19 Jun 2018, Alban Gruin wrote: > diff --git a/sequencer.c b/sequencer.c > index 7cc76332e..9aa7ddb33 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -766,6 +766,29 @@ N_("you have staged changes in your working tree\n" > #define VERIFY_MSG (1<<4) > #define

I will wait for positive answer

2018-06-21 Thread Pan Yuehan
Good day, My name is Mr. Pan Yuehan, working as head of risk in Bank of China. I'm looking for an investment manager / partner in those volore It represents me in mutual business. Please contact me in my private email for more details. e-mail ( yuehanpa...@gmail.com) Waiting for your news.

After rebasing and reset I am on unexpected commit

2018-06-21 Thread KES
Hi. I am on my current branch: $ git log --graph --decorate --pretty=oneline --abbrev-commit * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9

Re: [PATCH 2/2] sequencer.c: plug mem leak in git_sequencer_config

2018-06-21 Thread Jeff King
On Thu, Jun 21, 2018 at 09:03:05AM +0200, Johannes Schindelin wrote: > > > And at that point, maybe > > > > > > char *some_var = xstrdup("default"); > > > git_config_string(_var, ...); > > > > > > that takes "char **" and frees the current storage before assigning to > > > it may be simpler

[PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-06-21 Thread Sergey Organov
When cherry-picking multiple commits, it's impossible to have both merge- and non-merge commits on the same command-line. Not specifying '-m 1' results in cherry-pick refusing to handle merge commits, while specifying '-m 1' fails on non-merge commits. This patch allows '-m 1' for non-merge

After merging and reset I am on unexpected commit

2018-06-21 Thread KES
Hi. I am on my current branch. $ git log --graph --decorate --pretty=oneline --abbrev-commit * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS * f45a919 Create SCTT for Contractor * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement * 7e4cac9

Re: After rebasing and reset I am on unexpected commit

2018-06-21 Thread KES
ah, sorry. I understand why. The merge was on remote side. 21.06.2018, 12:37, "KES" : > Hi. > > I am on my current branch: > > $ git log --graph --decorate --pretty=oneline --abbrev-commit > * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS > * f45a919 Create SCTT for

Re: [GSoC][PATCH v2 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Alban Gruin
Hi Johannes, Le 21/06/2018 à 11:37, Johannes Schindelin a écrit : > Hi Alban, > > On Tue, 19 Jun 2018, Alban Gruin wrote: > >> diff --git a/sequencer.c b/sequencer.c >> index 7cc76332e..9aa7ddb33 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -766,6 +766,29 @@ N_("you have staged

Re: [PATCH v2 0/7] grep.c: teach --column to 'git-grep(1)'

2018-06-21 Thread Jeff King
On Wed, Jun 20, 2018 at 03:05:30PM -0500, Taylor Blau wrote: > Hi, > > Here is a re-roll of my series to add --column to 'git-grep(1)'. Since > last time, not much has changed other than the following: > > - Fix a typo where 'col', 'icol' were spelled as 'match', 'imatch' > [1]. > > -

[PATCH] Sanitize escape char sequences coming from server

2018-06-21 Thread Sebastian Kisela
From: Sebastian Kisela Fix volnurability against MITM attacks on client side by replacing non printable and non white space characters by "?". Fixes: CVE-2018-121 Signed-off-by: Sebastian Kisela --- sideband.c | 20 t/t5401-update-hooks.sh | 23

[PATCH 1/2] l10n: fr: fix a message seen in git bisect

2018-06-21 Thread Raphaël Hertzog
"cette" can be only be used before a word (like in "cette bouteille" for "this bottle"), but here "this" refers to the current step and we have to use "ceci" in French. Signed-off-by: Raphaël Hertzog --- po/fr.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/fr.po

Two small l10n/i18n patches

2018-06-21 Thread Raphaël Hertzog
(I'm not subscribed, please keep me in CC) Hello, I was reviewing the output of "git bisect" with my French locale and I saw a clear mistake in the French translation (fixed in the first commit) and I also noticed that the last message was still in English. After review of the code, it's not a

[PATCH 2/2] i18n: bisect: mark two supplementary strings for translation

2018-06-21 Thread Raphaël Hertzog
The whole bisect procedure is translated but the last message that the user will see in the process is not translated. Let's fix this. Signed-off-by: Raphaël Hertzog --- bisect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bisect.c b/bisect.c index

Re: [PATCH 2/2] i18n: bisect: mark two supplementary strings for translation

2018-06-21 Thread Duy Nguyen
On Thu, Jun 21, 2018 at 4:39 PM Raphaël Hertzog wrote: > > The whole bisect procedure is translated but the last message > that the user will see in the process is not translated. Let's fix this. Nice. There's another string in bisect_common() that should also be translated: "revision walk setup

gitk selection color not persistent

2018-06-21 Thread MJANES
Dear git community, Is it possible please for the gitk selection color setting to be persistent? Since 2015 the below approach has been working for me. Thank you for considering! Mychael --- a/gitk +++ b/gitk @@ -2409,6 +2409,7 @@ proc makewindow {} { text $ctext -background $bgcolor

[GSoC][PATCH v3 3/3] rebase -i: rewrite checkout_onto() in C

2018-06-21 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 --- builtin/rebase--helper.c | 7 ++- git-rebase--interactive.sh | 25 - sequencer.c

[GSoC][PATCH v3 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 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 v3 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-21 Thread Alban Gruin
This rewrites (the misnamed) setup_reflog_action() from shell to C. The new version is called checkout_base_commit(). 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 v3 0/3] rebase -i: rewrite reflog operations in C

2018-06-21 Thread Alban Gruin
Thes patch series rewrites the reflog operations from shell to C. This is part of the effort to rewrite interactive rebase in C. The first commit is dedicated to creating a function to silence a command, as the sequencer will do in several places with these patches. This branch is based on

Re: [PATCH] ewah: delete unused 'rlwit_discharge_empty()'

2018-06-21 Thread Junio C Hamano
Derrick Stolee writes: > On 6/19/2018 5:51 PM, Ramsay Jones wrote: >> From: Junio C Hamano >> >> Complete the removal of unused 'ewah bitmap' code by removing the now >> unused 'rlwit_discharge_empty()' function. Also, the 'ewah_clear()' >> function can now be made a file-scope static symbol.

Re: [PATCH v2 2/8] upload-pack: implement ref-in-want

2018-06-21 Thread Junio C Hamano
Brandon Williams writes: > On 06/19, Junio C Hamano wrote: >> Brandon Williams writes: >> >> > I also think that we should keep this first implementation of >> > ref-in-want simple and *not* include patterns, even if that's what we >> > may want someday down the road. Adding a new capability

Re: [PATCH 10/23] midx: write a lookup into the pack names chunk

2018-06-21 Thread Derrick Stolee
On 6/9/2018 12:43 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: Signed-off-by: Derrick Stolee --- Documentation/technical/pack-format.txt | 5 +++ builtin/midx.c | 7 midx.c | 56

[PATCH v3 0/7] Document/fix/warn about rebase incompatibilities and inconsistencies

2018-06-21 Thread Elijah Newren
git-rebase has lots of options that are mutually incompatible. Even among aspects of its behavior that is common to all rebase types, it has a number of inconsistencies. This series tries to document, fix, and/or warn users about many of these. I have left patch 7 in RFC state. We probably

Re: [PATCH] cherry-pick: do not error on non-merge commits when '-m 1' is specified

2018-06-21 Thread Junio C Hamano
Sergey Organov writes: > When cherry-picking multiple commits, it's impossible to have both > merge- and non-merge commits on the same command-line. Not specifying > '-m 1' results in cherry-pick refusing to handle merge commits, while > specifying '-m 1' fails on non-merge commits. Allowing

Git not creating new directory when cloning

2018-06-21 Thread Jack Adrian Zappa
Hi, I was trying to clone a repo into a non-existent directory. but it gave me a failure: $ git clone https://github.com/jelera/vim-javascript-syntax.git ~/.vim/bundle/vim-javascript-syntax fatal: destination path '/home/username/.vim/bundle/vim-javascript-syntax' already exists and is not an

Re: Git not creating new directory when cloning

2018-06-21 Thread Jeff King
On Thu, Jun 21, 2018 at 12:04:11PM -0400, Jack Adrian Zappa wrote: > Hi, I was trying to clone a repo into a non-existent directory. but it > gave me a failure: > > $ git clone https://github.com/jelera/vim-javascript-syntax.git > ~/.vim/bundle/vim-javascript-syntax > fatal: destination path >

Re: [PATCH 09/23] midx: write pack names in chunk

2018-06-21 Thread Derrick Stolee
On 6/7/2018 2:26 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: @@ -74,6 +80,31 @@ struct midxed_git *load_midxed_git(const char *object_dir) m->num_chunks = *(m->data + 6); m->num_packs = get_be32(m->data + 8); + for (i = 0; i <

Re: [PATCH 09/23] midx: write pack names in chunk

2018-06-21 Thread Junio C Hamano
Derrick Stolee writes: > On 6/7/2018 2:26 PM, Duy Nguyen wrote: >> On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: >>> @@ -74,6 +80,31 @@ struct midxed_git *load_midxed_git(const char >>> *object_dir) >>> m->num_chunks = *(m->data + 6); >>> m->num_packs =

Re: [PATCH 11/23] midx: sort and deduplicate objects from packfiles

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:07 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee wrote: Before writing a list of objects and their offsets to a multi-pack-index (MIDX), we need to collect the list of objects contained in the packfiles. There may be multiple copies of some objects, so this

Re: [PATCH] Sanitize escape char sequences coming from server

2018-06-21 Thread Jeff King
On Thu, Jun 21, 2018 at 02:10:30PM +0200, Sebastian Kisela wrote: > From: Sebastian Kisela > > Fix volnurability against MITM attacks on client side > by replacing non printable and non white space characters > by "?". > > Fixes: CVE-2018-121 I'm not sure if this is a productive direction

[PATCH v3 4/7] git-rebase: error out when incompatible options passed

2018-06-21 Thread Elijah Newren
git rebase has three different types: am, merge, and interactive, all of which are implemented in terms of separate scripts. am builds on git-am, merge builds on git-merge-recursive, and interactive builds on git-cherry-pick. We make use of features in those lower-level commands in the different

[RFC PATCH v3 7/7] git-rebase: make --allow-empty-message the default

2018-06-21 Thread Elijah Newren
All rebase backends should behave the same with empty commit messages, but currently do not. am-based rebases already apply commits with an empty commit message without stopping or requiring the user to specify an extra flag. Since am-based rebases are the default rebase type, and since it

[PATCH v3 2/7] git-rebase.sh: update help messages a bit

2018-06-21 Thread Elijah Newren
signoff is not specific to the am-backend. Also, re-order a few options to make like things (e.g. strategy and strategy-option) be near each other. --- git-rebase.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-rebase.sh b/git-rebase.sh index

[PATCH v3 5/7] git-rebase.txt: document behavioral inconsistencies between modes

2018-06-21 Thread Elijah Newren
There are a variety of aspects that are common to all rebases regardless of which backend is in use; however, the behavior for these different aspects varies in ways that could surprise users. (In fact, it's not clear -- to me at least -- that these differences were even desirable or

[PATCH v3 1/7] git-rebase.txt: document incompatible options

2018-06-21 Thread Elijah Newren
git rebase has many options that only work with one of its three backends. It also has a few other pairs of incompatible options. Document these. Signed-off-by: Elijah Newren --- Documentation/git-rebase.txt | 85 1 file changed, 77 insertions(+), 8

[PATCH v3 6/7] git-rebase.txt: address confusion between --no-ff vs --force-rebase

2018-06-21 Thread Elijah Newren
rebase was taught the --force-rebase option in commit b2f82e05de ("Teach rebase to rebase even if upstream is up to date", 2009-02-13). This flag worked for the am and merge backends, but wasn't a valid option for the interactive backend. rebase was taught the --no-ff option for interactive

[PATCH v3 3/7] t3422: new testcases for checking when incompatible options passed

2018-06-21 Thread Elijah Newren
git rebase is split into three types: am, merge, and interactive. Various options imply different types, and which mode we are using determine which sub-script (git-rebase--$type) is executed to finish the work. Not all options work with all types, so add tests for combinations where we expect

Re: [PATCH 2/2] i18n: bisect: mark two supplementary strings for translation

2018-06-21 Thread Raphael Hertzog
Hi, On Thu, 21 Jun 2018, Duy Nguyen wrote: > Nice. There's another string in bisect_common() that should also be > translated: "revision walk setup failed". Maybe you can mark it too? Sure. A new version of the second patch is attached. Cheers, -- Raphaël Hertzog ◈ Debian Developer Support

Re: [RFC PATCH 3/3] git-rebase.sh: make git-rebase--interactive the default

2018-06-21 Thread Elijah Newren
Hi Dscho, Thanks for all the food for thought. This is awesome. On Thu, Jun 21, 2018 at 3:57 AM, Johannes Schindelin wrote: > On Wed, 20 Jun 2018, Elijah Newren wrote: >> On Sun, Jun 17, 2018 at 2:44 PM, Johannes Schindelin >> wrote: >> >> > I was really referring to speed. But I have to

Re: [PATCH v3 1/7] git-rebase.txt: document incompatible options

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > @@ -280,8 +286,10 @@ other words, the sides are swapped. > + > Because 'git rebase' replays each commit from the working branch > on top of the branch using the given strategy, using > -the 'ours' strategy simply discards all patches from the , > +the 'ours' strategy

Re: [PATCH v3 4/7] git-rebase: error out when incompatible options passed

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > +if test -n "$git_am_opt"; then > + incompatible_opts=$(echo "$git_am_opt" | sed -e 's/ -q//') This is probably just a taste-thing, but I'd probably prefer to see the "sed" filter out "-q" alone, and make an effort to leave future things like "-qx" alone, e.g.

Re: [PATCH v3 2/7] git-rebase.sh: update help messages a bit

2018-06-21 Thread Elijah Newren
On Thu, Jun 21, 2018 at 12:58 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> signoff is not specific to the am-backend. Also, re-order a few options >> to make like things (e.g. strategy and strategy-option) be near each >> other. >> --- >> git-rebase.sh | 6 +++--- >> 1 file changed,

Re: [PATCH v3 1/7] git-rebase.txt: document incompatible options

2018-06-21 Thread Elijah Newren
On Thu, Jun 21, 2018 at 12:47 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> @@ -280,8 +286,10 @@ other words, the sides are swapped. >> + >> Because 'git rebase' replays each commit from the working branch >> on top of the branch using the given strategy, using >> -the 'ours'

Re: [PATCH v3 6/7] git-rebase.txt: address confusion between --no-ff vs --force-rebase

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > rebase was taught the --force-rebase option in commit b2f82e05de ("Teach > rebase to rebase even if upstream is up to date", 2009-02-13). This flag > worked for the am and merge backends, but wasn't a valid option for the > interactive backend. > ... > INCOMPATIBLE

Re: [PATCH v4 2/8] block alloc: add lifecycle APIs for cache_entry structs

2018-06-21 Thread Stefan Beller
> --- a/cache.h > +++ b/cache.h > @@ -339,6 +339,29 @@ extern void remove_name_hash(struct index_state *istate, > struct cache_entry *ce) > extern void free_name_hash(struct index_state *istate); > > > +/* Cache entry creation and cleanup */ > + > +/* > + * Create cache_entry intended for use in

Re: [PATCH v3 3/7] t3422: new testcases for checking when incompatible options passed

2018-06-21 Thread Eric Sunshine
On Thu, Jun 21, 2018 at 4:05 PM Junio C Hamano wrote: > Elijah Newren writes: > > + # This is indented with HT SP HT. > > + echo " foo();" >>foo && > > I often wonder, whenever I see a need for a comment like this, if > saying the same thing in code to make it visible is cleaner

[PATCH 4/5] commit-graph: store graph in struct object_store

2018-06-21 Thread Jonathan Tan
Instead of storing commit graphs in static variables, store them in struct object_store. There are no changes to the signatures of existing functions - they all still only support the_repository, and support for other instances of struct repository will be added in a subsequent commit.

[PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Jonathan Tan
Add a struct repository argument to the functions in commit-graph.h that read the commit graph. (This commit does not affect functions that write commit graphs.) Because the commit graph functions can now read the commit graph of any repository, the global variable core_commit_graph has been

Re: [GSoC][PATCH v3 1/3] sequencer: add a new function to silence a command, except if it fails.

2018-06-21 Thread Junio C Hamano
Alban Gruin writes: > 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. > >

Re: [PATCH] Sanitize escape char sequences coming from server

2018-06-21 Thread Jeff King
On Thu, Jun 21, 2018 at 08:09:43PM +0200, Pavel Cahyna wrote: > > > + int len = mbstowcs(wcstring, outbuf->buf, outbuf->len); > > > > I don't think mbstowcs() is always going to do the right thing there. > > We're looking at a string that was sent from the remote server. What > > encoding is it

Re: [PATCH v3 5/7] git-rebase.txt: document behavioral inconsistencies between modes

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > +BEHAVIORAL INCONSISTENCIES > +-- > + > + * --no-ff vs. --force-rebase Do we want to `--quote` these? > +These options are actually identical, though their description > +leads people to believe they might not be. Perhaps the same

Re: [PATCH v2 0/7] grep.c: teach --column to 'git-grep(1)'

2018-06-21 Thread Taylor Blau
On Thu, Jun 21, 2018 at 07:53:02AM -0400, Jeff King wrote: > On Wed, Jun 20, 2018 at 03:05:30PM -0500, Taylor Blau wrote: > > > Hi, > > > > Here is a re-roll of my series to add --column to 'git-grep(1)'. Since > > last time, not much has changed other than the following: > > > > - Fix a typo

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-21 Thread Stefan Beller
> OK, the fact I was overlooking was that the "config_fn_t" argument > passed to config_from_gitmodules is what we are actually worried about, > it's the config callback which could allow generic config in .gitmodules > to sneak in. That is the precise point that I was trying to communicate. :)

Re: [PATCH v3 3/7] t3422: new testcases for checking when incompatible options passed

2018-06-21 Thread Elijah Newren
On Thu, Jun 21, 2018 at 1:04 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> + git checkout B && >> + # This is indented with HT SP HT. >> + echo " foo();" >>foo && > > I often wonder, whenever I see a need for a comment like this, if > saying the same thing in code

Re: [PATCH v2 0/7] grep.c: teach --column to 'git-grep(1)'

2018-06-21 Thread Junio C Hamano
Jeff King writes: > I wasn't sure where we landed in the discussion on "how much crazy stuff > to support". But AFAIK, the code in this iteration handles every crazy > case already except this one. If we're going to care about OR, maybe we > should just cover all cases. I think I was the only

Re: [PATCH 13/23] midx: write object id fanout chunk

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:28 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee wrote: @@ -117,9 +123,13 @@ struct midxed_git *load_midxed_git(const char *object_dir) die("MIDX missing required pack lookup chunk"); if (!m->chunk_pack_names)

Re: [PATCH v2] docs: link to gitsubmodules

2018-06-21 Thread Junio C Hamano
Brandon Williams writes: > Add a link to gitsubmodules(7) under the `submodule.active` entry in > git-config(1). > > Signed-off-by: Brandon Williams > --- > Documentation/config.txt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Thanks. > > diff --git a/Documentation/config.txt

Re: [PATCH v3 6/7] git-rebase.txt: address confusion between --no-ff vs --force-rebase

2018-06-21 Thread Elijah Newren
On Thu, Jun 21, 2018 at 1:46 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> rebase was taught the --force-rebase option in commit b2f82e05de ("Teach >> rebase to rebase even if upstream is up to date", 2009-02-13). This flag >> worked for the am and merge backends, but wasn't a valid

[PATCH 0/5] Object store refactoring: commit graph

2018-06-21 Thread Jonathan Tan
This continues the object store refactoring effort by making commit graphs of any repository be readable, not just the commit graph of the_repository. This enables the conversion of other functions in the future, functions like parse_commit (which first tries to parse from the commit graph). I

[PATCH 3/5] commit-graph: add free_commit_graph

2018-06-21 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/commit-graph.c | 2 ++ commit-graph.c | 24 ++-- commit-graph.h | 2 ++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c index 37420ae0fd..9c2d55221c

[PATCH 1/5] object-store: add missing include

2018-06-21 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- object-store.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/object-store.h b/object-store.h index d683112fd7..f0b77146e4 100644 --- a/object-store.h +++ b/object-store.h @@ -2,6 +2,9 @@ #define OBJECT_STORE_H #include "oidmap.h" +#include "list.h"

[PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- commit-graph.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commit-graph.h b/commit-graph.h index 260a468e73..7004dfdca9 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -3,6 +3,8 @@ #include "git-compat-util.h" +struct commit; + char

Re: [PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Stefan Beller
Hi Jonathan, On Thu, Jun 21, 2018 at 2:29 PM Jonathan Tan wrote: > > Signed-off-by: Jonathan Tan Both this and the previous patch look good to me; you seem to have better (stricter) checking for missing includes/forward declarations, am I missing a compile option? (I have DEVELOPER=1 in

Re: [PATCH] submodule.c: report the submodule that an error occurs in

2018-06-21 Thread Junio C Hamano
Stefan Beller writes: > When an error occurs in updating the working tree of a submodule in > submodule_move_head, tell the user which submodule the error occurred in. > > The call to read-tree contains a super-prefix, such that the read-tree > will correctly report any path related issues, but

Re: [PATCH 17/23] midx: read objects from multi-pack-index

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:56 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 6:55 PM Derrick Stolee wrote: Signed-off-by: Derrick Stolee --- midx.c | 96 -- midx.h | 2 ++ object-store.h | 1 + packfile.c | 8 - 4 files

Re: [PATCH v3 3/7] t3422: new testcases for checking when incompatible options passed

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > + git checkout B && > + # This is indented with HT SP HT. > + echo " foo();" >>foo && I often wonder, whenever I see a need for a comment like this, if saying the same thing in code to make it visible is cleaner and less error prone way to do so,

Re: [PATCH v3 4/7] git-rebase: error out when incompatible options passed

2018-06-21 Thread Elijah Newren
On Thu, Jun 21, 2018 at 1:29 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> +if test -n "$git_am_opt"; then >> + incompatible_opts=$(echo "$git_am_opt" | sed -e 's/ -q//') > > This is probably just a taste-thing, but I'd probably prefer to see > the "sed" filter out "-q" alone, and

Re: [PATCH v4 3/8] mem-pool: only search head block for available space

2018-06-21 Thread Stefan Beller
On Wed, Jun 20, 2018 at 1:17 PM Jameson Miller wrote: > > Instead of searching all memory blocks for available space to fulfill > a memory request, only search the head block. If the head block does > not have space, assume that previous block would most likely not be > able to fulfill request

Re: [PATCH] Sanitize escape char sequences coming from server

2018-06-21 Thread Pavel Cahyna
Hello, On Thu, Jun 21, 2018 at 01:41:22PM -0400, Jeff King wrote: > On Thu, Jun 21, 2018 at 02:10:30PM +0200, Sebastian Kisela wrote: > > > From: Sebastian Kisela > > + int len = mbstowcs(wcstring, outbuf->buf, outbuf->len); > > I don't think mbstowcs() is always going to do the right thing

Re: [PATCH v3 2/7] git-rebase.sh: update help messages a bit

2018-06-21 Thread Junio C Hamano
Elijah Newren writes: > signoff is not specific to the am-backend. Also, re-order a few options > to make like things (e.g. strategy and strategy-option) be near each > other. > --- > git-rebase.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Missing sign-off, but otherwise

Re: [PATCH v3 5/7] git-rebase.txt: document behavioral inconsistencies between modes

2018-06-21 Thread Elijah Newren
Hi Junio, On Thu, Jun 21, 2018 at 1:44 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> +BEHAVIORAL INCONSISTENCIES >> +-- >> + >> + * --no-ff vs. --force-rebase > > Do we want to `--quote` these? Ah, good point. >> + * empty commits: >> + >> +am-based

Re: [PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Derrick Stolee
On 6/21/2018 6:39 PM, Jonathan Tan wrote: Both this and the previous patch look good to me; you seem to have better (stricter) checking for missing includes/forward declarations, am I missing a compile option? (I have DEVELOPER=1 in config.mak) Thanks. No I don't - I discovered that these were

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Derrick Stolee
On 6/21/2018 8:33 PM, Derrick Stolee wrote: On 6/21/2018 7:06 PM, Jonathan Tan wrote: diff --git a/commit.c b/commit.c index 0030e79940..38c12b002f 100644 --- a/commit.c +++ b/commit.c @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) if (commit->graph_pos

Re: [PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Jonathan Tan
> Both this and the previous patch look good to me; > you seem to have better (stricter) checking for > missing includes/forward declarations, am I missing > a compile option? (I have DEVELOPER=1 in config.mak) Thanks. No I don't - I discovered that these were missing as I was including these

Re: Hash algorithm analysis

2018-06-21 Thread brian m. carlson
On Mon, Jun 11, 2018 at 11:19:10PM +0200, Ævar Arnfjörð Bjarmason wrote: > This is a great summary. Thanks. > > In case it's not apparent from what follows, I have a bias towards > SHA-256. Reasons for that, to summarize some of the discussion the last > time around[1], and to add more details:

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Stefan Beller
> diff --git a/commit.c b/commit.c > index 0030e79940..38c12b002f 100644 > --- a/commit.c > +++ b/commit.c > @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) > if (commit->graph_pos == COMMIT_NOT_FROM_GRAPH) > BUG("commit has NULL tree, but was

[PATCH v3 6/8] diff.c: decouple white space treatment from move detection algorithm

2018-06-21 Thread Stefan Beller
In the original implementation of the move detection logic the choice for ignoring white space changes is the same for the move detection as it is for the regular diff. Some cases came up where different treatment would have been nice. Allow the user to specify that white space should be ignored

[PATCH v3 7/8] diff.c: factor advance_or_nullify out of mark_color_as_moved

2018-06-21 Thread Stefan Beller
This moves the part of code that checks if we're still in a block into its own function. We'll need a different approach on advancing the blocks in a later patch, so having it as a separate function will prove useful. While at it rename the variable `p` to `prev` to indicate that it refers to

[PATCH v3 5/8] diff.c: add a blocks mode for moved code detection

2018-06-21 Thread Stefan Beller
The new "blocks" mode provides a middle ground between plain and zebra. It is as intuitive (few colors) as plain, but still has the requirement for a minimum of lines/characters to count a block as moved. Suggested-by: Ævar Arnfjörð Bjarmason

[PATCH v3 4/8] diff.c: adjust hash function signature to match hashmap expectation

2018-06-21 Thread Stefan Beller
This makes the follow up patch easier. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index 112e6af2cc8..2a1a21d3b7a 100644 --- a/diff.c +++ b/diff.c @@ -707,11 +707,15

[PATCH v3 8/8] diff.c: add white space mode to move detection that allows indent changes

2018-06-21 Thread Stefan Beller
The option of --color-moved has proven to be useful as observed on the mailing list. However when refactoring sometimes the indentation changes, for example when partitioning a functions into smaller helper functions the code usually mostly moved around except for a decrease in indentation. To

[PATCH v3 3/8] diff.c: do not pass diff options as keydata to hashmap

2018-06-21 Thread Stefan Beller
When we initialize the hashmap, we give it a pointer to the diff_options, which it then passes along to each call of the hashmap_cmp_fn function. There's no need to pass it a second time as the "keydata" parameter, and our comparison functions never look at keydata. This was a mistake left over

[PATCH v3 0/8] Moved code detection: ignore space on uniform indentation

2018-06-21 Thread Stefan Beller
This replaces sb/diff-color-move-more and is also available at https://github.com/stefanbeller/git/tree/color-moved-only It applies on v2.18.0. Move detection is a nice feature, but doesn't work well with indentation or dedentation. Make it possible to indent/dedent code and still have it

[PATCH v3 1/8] xdiff/xdiff.h: remove unused flags

2018-06-21 Thread Stefan Beller
These flags were there since the beginning (3443546f6e (Use a *real* built-in diff generator, 2006-03-24), but were never used. Remove them. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- xdiff/xdiff.h | 8 1 file changed, 8 deletions(-) diff --git a/xdiff/xdiff.h

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Derrick Stolee
On 6/21/2018 7:06 PM, Jonathan Tan wrote: diff --git a/commit.c b/commit.c index 0030e79940..38c12b002f 100644 --- a/commit.c +++ b/commit.c @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) if (commit->graph_pos == COMMIT_NOT_FROM_GRAPH)

BUG: sub-git files getting cleaned when using --exclude in the top git

2018-06-21 Thread Jehan Bing
Hi, I have a setup with tree of 250+ git repositories. Every now and then, I want to clean everything except for files generated by my IDE. So for all the git repos, I run “git clean -dfx --exclude ”. What happens then is, if a sub-git as that file, all its files are deleted (except for that ide

Re: The state of the object store series

2018-06-21 Thread Derrick Stolee
[My email client says I sent this two days ago, but it doesn't appear on public-inbox.org, so somehow it didn't land on-list (Stefan pointed out that the message was in HTML). Repeating the message now so I can reference it in another discussion. -Stolee] On 6/19/2018 6:07 PM, Stefan Beller

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Jonathan Tan
> > diff --git a/commit.c b/commit.c > > index 0030e79940..38c12b002f 100644 > > --- a/commit.c > > +++ b/commit.c > > @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit > > *commit) > > if (commit->graph_pos == COMMIT_NOT_FROM_GRAPH) > > BUG("commit has

Re: [PATCH] git-stash.txt: document show options

2018-06-21 Thread Johannes Schindelin
Hi Mike, there is a GSoC project going on to make `git stash` a builtin, and I think that this change makes sense and at the same time needs to be coordinated with Paul, who is performing that builtin work, so I Cc:ed him for visibility. Ciao, Johannes On Wed, 20 Jun 2018, Mike Frysinger wrote: