Re: [PATCH v3 1/1] check-non-portable-shell.pl: Quoted `wc -l` is not portable

2017-12-22 Thread Torsten Bögershausen
On Fri, Dec 22, 2017 at 01:07:59PM -0800, Junio C Hamano wrote: > tbo...@web.de writes: > > > > > Reviewed-by: Johannes Schindelin > > Signed-off-by: Torsten Bögershausen > > I'll flip these and add a helped-by to credit Eric. ... > Don't try to

Bring together merge and rebase

2017-12-22 Thread Carl Baldwin
The big contention among git users is whether to rebase or to merge changes [2][3] while iterating. I used to firmly believe that merging was the way to go and rebase was harmful. More recently, I have worked in some environments where I saw rebase used very effectively while iterating on changes

Re: Usability outrage as far as I am concerned

2017-12-22 Thread Anatolii Borodin
Hi Jacob, On Sat, Dec 23, 2017 at 12:05 AM, Jacob Keller wrote: > If you wish to update it later, you can mount hte usb stick, and then > just run git pull from inside the new subfolder. Note that you do > *not* run "git pull home_subfolder", as git pull expects the name

Re: [PATCH 2/3] move index_has_changes() from builtin/am.c to merge.c for reuse

2017-12-22 Thread Elijah Newren
On Fri, Dec 22, 2017 at 12:46 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> On Thu, Dec 21, 2017 at 11:19 AM, Elijah Newren wrote: >>> index_has_changes() is a function we want to reuse outside of just am, >>> making it also

Re: [PATCH] Fix urlencode format string on signed char.

2017-12-22 Thread Johannes Schindelin
Hi Julien, On Sat, 23 Dec 2017, Julien Dusser wrote: > Thank you for review. I didn't find any other error. > Code in http.c:quote_ref_url() is almost the same but ch is a signed int, so > there's no issue. But that ch comes from a signed char *, so it actually *is* an issue: if you cast a

Re: [PATCH] oidmap: ensure map is initialized

2017-12-22 Thread Johannes Schindelin
Hi Brandon, On Fri, 22 Dec 2017, Brandon Williams wrote: > Ensure that an oidmap is initialized before attempting to add, remove, > or retrieve an entry by simply performing the initialization step > before accessing the underlying hashmap. > > Signed-off-by: Brandon Williams

Re: [PATCH] oidmap.h: strongly discourage using OIDMAP_INIT directly

2017-12-22 Thread Johannes Schindelin
Hi Junio, On Fri, 22 Dec 2017, Junio C Hamano wrote: > Brandon Williams writes: > > >> -#define OIDMAP_INIT { { NULL } } > >> +/* > >> + * This macro initializes the data structure only incompletely, just > >> enough > >> + * to call oidmap_get() on an empty map. Use

[PATCH 5/5] sequencer: do not invent whitespace when transforming OIDs

2017-12-22 Thread Johannes Schindelin
For commands that do not have an argument, there is no need to append a trailing space at the end of the line. Signed-off-by: Johannes Schindelin --- sequencer.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH 3/5] sequencer: remove superfluous conditional

2017-12-22 Thread Johannes Schindelin
In a conditional block that is only reached when handling a TODO_REWORD (as seen even from a 3-line context), there is absolutely no need to nest another block under the identical condition. Signed-off-by: Johannes Schindelin --- sequencer.c | 4 +--- 1 file changed,

[PATCH 4/5] sequencer: report when noop has an argument

2017-12-22 Thread Johannes Schindelin
The noop command cannot accept any argument, but we never told the user about any bogus argument. Fix that. while at it, mention clearly when an argument is required but missing (for commands *other* than noop). Signed-off-by: Johannes Schindelin --- sequencer.c |

[PATCH 2/5] sequencer: strip bogus LF at end of error messages

2017-12-22 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- sequencer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sequencer.c b/sequencer.c index 115085d39ca..8e6b6289be6 100644 --- a/sequencer.c +++ b/sequencer.c @@ -491,7 +491,7 @@ static int

[PATCH 0/5] A couple of sequencer cleanups

2017-12-22 Thread Johannes Schindelin
While working on patches to teach `git rebase -i` to recreate branch topology properly, i.e. replace the design of `--preserve-merges` by something much better, I stumbled across a couple of issues that I thought I should fix on the way. The patches are based on lb/rebase-i-short-command-names,

[PATCH 1/5] rebase: do not continue when the todo list generation failed

2017-12-22 Thread Johannes Schindelin
This is a *really* long-standing bug. As a matter of fact, this bug has been with us from the very beginning of `rebase -i`: 1b1dce4bae7 (Teach rebase an interactive mode, 2007-06-25), where the output of `rev-list` was piped to `sed` (and any failure of the `rev-list` process would go completely

Re: [PATCH] Fix urlencode format string on signed char.

2017-12-22 Thread Julien Dusser
Thank you for review. I didn't find any other error. Code in http.c:quote_ref_url() is almost the same but ch is a signed int, so there's no issue. Le 22/12/2017 à 22:48, Junio C Hamano a écrit : Julien Dusser writes: Git credential fails with special char in

[PATCH] oidmap: ensure map is initialized

2017-12-22 Thread Brandon Williams
Ensure that an oidmap is initialized before attempting to add, remove, or retrieve an entry by simply performing the initialization step before accessing the underlying hashmap. Signed-off-by: Brandon Williams --- oidmap.c | 11 +++ 1 file changed, 11 insertions(+)

Re: [PATCHv5 7/7] builtin/describe.c: describe a blob

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Dec 19, 2017 at 11:22 AM, Junio C Hamano wrote: >> I had to squash in the following to make 'pu' pass under >> gettext-poison build. Is this ready for 'next' otherwise? > > I saw that in pu, thanks for squashing. I should

Re: Usability outrage as far as I am concerned

2017-12-22 Thread Jacob Keller
On Fri, Dec 22, 2017 at 7:57 AM, Cristian Achim wrote: >> Can you show the output of "git remote" > > # in usb_subfolder > $git remote > origin > $ > > #in home_subfolder > $git remote > $ > With the -v switch you can see where each remote points to (tho your home local

Re: [PATCH v2 2/2] commit: add support for --fixup -m""

2017-12-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I don't agree that git as a tool should be so opinionated. You can edit > these --fixup messages right now with --edit, and I do. That it doesn't > work with -m"" as it should is a longstanding UI wart. I think you missed the point. I was

Re: [PATCH v2 2/2] commit: add support for --fixup -m""

2017-12-22 Thread Ævar Arnfjörð Bjarmason
On Fri, Dec 22 2017, Junio C. Hamano jotted: > Ævar Arnfjörð Bjarmason writes: > >> Those options could also support combining with -m, but given what >> they do I can't think of a good use-case for doing that, so I have not >> made the more invasive change of splitting up

Re: [PATCH] Fix urlencode format string on signed char.

2017-12-22 Thread Junio C Hamano
Julien Dusser writes: > Git credential fails with special char in password. > remote: Invalid username or password. > fatal: Authentication failed for > > File ~/.git-credential contains badly urlencoded characters > %ffXX%ffYY instead of %XX%YY. > > Add a cast to

Re: [PATCH] sequencer: assign only free()able strings to gpg_sign

2017-12-22 Thread Junio C Hamano
"phillip.w...@talktalk.net" writes: >>Original Message >>From: johannes.schinde...@gmx.de >>Date: 22/12/2017 11:50 >>To: >>Cc: "Junio C Hamano", "Phillip Wood" w...@dunelm.org.uk>, "Kaartic

Re: [PATCH v2 2/2] commit: add support for --fixup -m""

2017-12-22 Thread Junio C Hamano
Junio C Hamano writes: > ... So "nobody immediately thought of it when it was added" is > certainly not a reason to later make the combination possible. Oops, not a reason to later "_not_ to" make an update, of course.

Re: [PATCH v2 2/2] commit: add support for --fixup -m""

2017-12-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Those options could also support combining with -m, but given what > they do I can't think of a good use-case for doing that, so I have not > made the more invasive change of splitting up the logic in commit.c to > first act on those, and then

Re: [PATCH v3 1/1] check-non-portable-shell.pl: Quoted `wc -l` is not portable

2017-12-22 Thread Junio C Hamano
tbo...@web.de writes: > > Reviewed-by: Johannes Schindelin > Signed-off-by: Torsten Bögershausen I'll flip these and add a helped-by to credit Eric. check-non-portable-shell.pl: `wc -l` may have leading WS Test scripts count number of

Re: [PATCH] config.txt: Document behavior of backslashes in subsections

2017-12-22 Thread Junio C Hamano
Dave Borowitz writes: > Unrecognized escape sequences are invalid in values: > > $ git config -f - --list < [foo] > bar = "\t\\\y\"\u" > EOF > fatal: bad config line 2 in standard input > > But in subsection names, the backslash is simply dropped if the >

Re: [PATCH 2/3] move index_has_changes() from builtin/am.c to merge.c for reuse

2017-12-22 Thread Junio C Hamano
Elijah Newren writes: > On Thu, Dec 21, 2017 at 11:19 AM, Elijah Newren wrote: >> index_has_changes() is a function we want to reuse outside of just am, >> making it also available for merge-recursive and merge-ort. >> >> Signed-off-by: Elijah Newren

Re: [PATCH v2 0/2] support -m"" combined with commit --fixup

2017-12-22 Thread Ævar Arnfjörð Bjarmason
On Fri, Dec 22 2017, Eric Sunshine jotted: > On Fri, Dec 22, 2017 at 11:00 AM, Ævar Arnfjörð Bjarmason > wrote: >> Here's a hopefully ready to apply v2 incorporating feedback from Eric >> (thanks!). A tbdiff with v1 follows below. >> >> Ævar Arnfjörð Bjarmason (2): >> commit

[PATCH v2 2/2] commit: add support for --fixup -m""

2017-12-22 Thread Ævar Arnfjörð Bjarmason
Add support for supplying the -m option with --fixup. Doing so has errored out ever since --fixup was introduced. Before this, the only way to amend the fixup message while committing was to use --edit and amend it in the editor. The use-case for this feature is one of: * Leaving a quick note

Re: [PATCH 3/3] merge-recursive: Avoid incorporating uncommitted changes in a merge

2017-12-22 Thread Junio C Hamano
Elijah Newren writes: > builtin/merge.c contains this important requirement for merge strategies: > /* >* At this point, we need a real merge. No matter what strategy >* we use, it would operate on the index, possibly affecting the >* working

Re: [PATCH] oidmap.h: strongly discourage using OIDMAP_INIT directly

2017-12-22 Thread Junio C Hamano
Brandon Williams writes: >> -#define OIDMAP_INIT { { NULL } } >> +/* >> + * This macro initializes the data structure only incompletely, just enough >> + * to call oidmap_get() on an empty map. Use oidmap_init() instead. >> + */ >> +#define OIDMAP_INIT_INCOMPLETELY { { NULL }

Re: [PATCH] send-pack: use internal argv_array of struct child_process

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: >> + argv_array_push(, "pack-objects"); >> + argv_array_push(, "--all-progress-implied"); >> + argv_array_push(, "--revs"); >> + argv_array_push(, "--stdout"); > > (useless nit of the day, no need to resend:) > These four

Re: [PATCH] t/helper/test-lazy-name-hash: fix compilation

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: >> Heh; I do not think there particularly is much difference between >> stricter flags and DEVELOPER flags, but I would rather not lose the >> removal of duplicated 'today' I did while I queued the previous one >> ;-) > > > I did not realize it was

Re: [PATCH 4/4] submodule: submodule_move_head omits old argument in forced case

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: > When using hard reset or forced checkout with the option to recurse into > submodules, the submodules need to be reset, too. > > It turns out that we need to omit the duplicate old argument to read-tree > in all forced cases to omit the 2 way merge and

Re: [PATCH 3/4] unpack-trees: Fix same() for submodules

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: > The function same(a, b) is used to check if two entries a and b are the > same. As the index contains the staged files the same() function can be > used to check if files between a given revision and the index are the same. > > In case of submodules,

Re: [PATCH v2 0/2] support -m"" combined with commit --fixup

2017-12-22 Thread Eric Sunshine
On Fri, Dec 22, 2017 at 11:00 AM, Ævar Arnfjörð Bjarmason wrote: > Here's a hopefully ready to apply v2 incorporating feedback from Eric > (thanks!). A tbdiff with v1 follows below. > > Ævar Arnfjörð Bjarmason (2): > commit doc: document that -c, -C, -F and --fixup with -m

Re: [PATCH 2/5] t/lib-submodule-update.sh: Fix test ignoring ignored files in submodules

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: > It turns out that this buggy test passed due to the buggy implementation, > which will soon be corrected. Let's fix the test first. Please clarify "buggy test". Without the original discussion (I am imagining there is something that happened on the

Re: [PATCH v6] Makefile: replace perl/Makefile.PL with simple make rules

2017-12-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Signed-off-by: Ævar Arnfjörð Bjarmason > --- Thanks, but I thought the patch was already in 'next' for a week or more and it's time to refine incrementally. Here is the difference as I see between what we already have and

Re: Fetching commit instead of ref

2017-12-22 Thread Junio C Hamano
"Carlsson, Magnus" writes: > $ git fetch subrepo > 50f730db793e0733b159326c5a3e78fd48cedfec:refs/remote/subrepo/foo-commit > remote: Counting objects: 2311, done. > remote: Total 2311 (delta 0), reused 0 (delta 0), pack-reused 2311 > -- >>> Receiving objects: 100%

Re: [PATCH] sequencer: assign only free()able strings to gpg_sign

2017-12-22 Thread Junio C Hamano
Johannes Schindelin writes: >> I thought the bug could be triggered when commit.gpgsign was true and >> it was not overriden on the commandline, is it worth adding a test for >> that? > > ... If we want to verify that the > gpg_sign is correctly allocated before it

Re: [PATCH v2 1/5] core.aheadbehind: add new config setting

2017-12-22 Thread Junio C Hamano
Jonathan Nieder writes: >> Created core.aheadbehind config setting and core_ahead_behind >> global variable. This value defaults to true. >> >> This value will be used in the next few commits as the default value >> for the --ahead-behind parameter. >> >> Signed-off-by: Jeff

Re: [PATCH] t/helper/test-lazy-name-hash: fix compilation

2017-12-22 Thread Stefan Beller
> Heh; I do not think there particularly is much difference between > stricter flags and DEVELOPER flags, but I would rather not lose the > removal of duplicated 'today' I did while I queued the previous one > ;-) I did not realize it was queued anywhere, please ignore then.

Re: [PATCH] t/helper/test-lazy-name-hash: fix compilation

2017-12-22 Thread Junio C Hamano
Stefan Beller writes: > I was compiling origin/master today with the DEVELOPER compiler flags > today and was greeted by > > t/helper/test-lazy-init-name-hash.c: In function ‘cmd_main’: > t/helper/test-lazy-init-name-hash.c:172:5: error: ‘nr_threads_used’ may be > used

Re: [PATCH] send-pack: use internal argv_array of struct child_process

2017-12-22 Thread Stefan Beller
On Fri, Dec 22, 2017 at 12:14 AM, René Scharfe wrote: > Avoid a magic number of NULL placeholder values and a magic index by > constructing the command line for pack-objects using the embedded > argv_array of the child_process. The resulting code is shorter and > easier to extend.

[PATCH] Fix urlencode format string on signed char.

2017-12-22 Thread Julien Dusser
Git credential fails with special char in password. remote: Invalid username or password. fatal: Authentication failed for File ~/.git-credential contains badly urlencoded characters %ffXX%ffYY instead of %XX%YY. Add a cast to an unsigned char to fix urlencode use of %02x on a char.

Re: [PATCH] sequencer: assign only free()able strings to gpg_sign

2017-12-22 Thread Johannes Schindelin
Hi Phillip, On Fri, 22 Dec 2017, phillip.w...@talktalk.net wrote: > I thought the bug could be triggered when commit.gpgsign was true and > it was not overriden on the commandline, is it worth adding a test for > that? Everybody working with extensive test suites seems to write/blog these

Re: [PATCH] oidmap.h: strongly discourage using OIDMAP_INIT directly

2017-12-22 Thread Brandon Williams
On 12/22, Johannes Schindelin wrote: > In Git's source code, we have this convention that quite a few data > structures can be initialized using a macro *_INIT while defining an > instance (instead of having to call a function to initialize the data > structure). You will see that idiom quite a

[PATCH v2 1/2] commit doc: document that -c, -C, -F and --fixup with -m error

2017-12-22 Thread Ævar Arnfjörð Bjarmason
Document that providing any of -c, -C, -F and --fixup along with -m will result in an error. Some variant of this has been errored about explicitly since 0c091296c0 ("git-commit: log parameter updates.", 2005-08-08), but the documentation was never updated to reflect this. Wording-by: Eric

[PATCH v2 0/2] support -m"" combined with commit --fixup

2017-12-22 Thread Ævar Arnfjörð Bjarmason
Here's a hopefully ready to apply v2 incorporating feedback from Eric (thanks!). A tbdiff with v1 follows below. Ævar Arnfjörð Bjarmason (2): commit doc: document that -c, -C, -F and --fixup with -m error commit: add support for --fixup -m"" Documentation/git-commit.txt | 2 ++

Re: Usability outrage as far as I am concerned

2017-12-22 Thread Cristian Achim
> Can you show the output of "git remote" # in usb_subfolder $git remote origin $ #in home_subfolder $git remote $ > and also > clearly explain with details the layout of what the folders are and > what is or is not a repository? Take the following update into consideration and then reread my

[PATCH] status: add a failing test showing a core.untrackedCache bug

2017-12-22 Thread Ævar Arnfjörð Bjarmason
The untracked cache gets confused when a directory is swapped out for a symlink to another directory. Whatever files are inside the target of the symlink will be incorrectly shown as untracked. This issue does not happen if the symlink links to another file, only if it links to another directory.

Re: [PATCH] sequencer: assign only free()able strings to gpg_sign

2017-12-22 Thread phillip.w...@talktalk.net
>Original Message >From: johannes.schinde...@gmx.de >Date: 22/12/2017 11:50 >To: >Cc: "Junio C Hamano", "Phillip Wood", "Kaartic Sivaraam" >Subj: [PATCH] sequencer: assign only free()able strings to gpg_sign > >The

[PATCH v2] http: use internal argv_array of struct child_process

2017-12-22 Thread René Scharfe
Avoid a strangely magic array size (it's slightly too big) and explicit index numbers by building the command line for index-pack using the embedded argv_array of the child_process. Add the flag -o and its argument with argv_array_pushl() to make it obvious that they belong together. The

[PATCH] sequencer: assign only free()able strings to gpg_sign

2017-12-22 Thread Johannes Schindelin
The gpg_sign member of the replay_opts structure is of type `char *`, meaning that the sequencer deems the string to which gpg_sign points to be under its custody, i.e. it needs to be free()d by the sequencer. Therefore, let's only assign malloc()ed buffers to it. Reported-by: Kaartic Sivaraam

Re: Error in `git': free(): invalid pointer (was Re: [PATCH] sequencer: improve config handling)

2017-12-22 Thread Johannes Schindelin
Hi Kaartic, On Thu, 21 Dec 2017, Kaartic Sivaraam wrote: > Speaking of trace, (thanks to Dscho!) the one I got using 'valgrind' > (with `--leak-check=full` option) can be found below. I've kept only > relevant parts of it to avoid unwanted noise of `set -x`. Let me know > if that's needed too. >

[PATCH] oidmap.h: strongly discourage using OIDMAP_INIT directly

2017-12-22 Thread Johannes Schindelin
In Git's source code, we have this convention that quite a few data structures can be initialized using a macro *_INIT while defining an instance (instead of having to call a function to initialize the data structure). You will see that idiom quite a bit, e.g. `struct strbuf buf = STRBUF_INIT;`

Re: Error in `git': free(): invalid pointer (was Re: [PATCH] sequencer: improve config handling)

2017-12-22 Thread phillip.w...@talktalk.net
>Original Message >From: kaartic.sivar...@gmail.com >Date: 21/12/2017 17:14 >To: "phillip.w...@talktalk.net", "Phillip Wood", "Git Mailing List" >Cc: "Johannes Schindelin" >Subj: Re:

Re: [PATCH] http: use internal argv_array of struct child_process

2017-12-22 Thread Eric Sunshine
On Fri, Dec 22, 2017 at 3:14 AM, René Scharfe wrote: > Avoid a strangely magic array size (it's slightly too big) and explicit > index numbers by building the command line for index-pack using the > embedded argv_array of the child_process. The resulting code is shorter > and

Assalamu`Alaikum.

2017-12-22 Thread Mohammad Ouattara
Greetings from Dr. mohammad ouattara. Assalamu`Alaikum. My Name is Dr. mohammad ouattara, I am a banker by profession. I'm from Ouagadougou, Burkina Faso, West Africa. My reason for contacting you is to transfer an abandoned $14.6M to your account. The owner of this fund died since 2004

[PATCH] send-pack: use internal argv_array of struct child_process

2017-12-22 Thread René Scharfe
Avoid a magic number of NULL placeholder values and a magic index by constructing the command line for pack-objects using the embedded argv_array of the child_process. The resulting code is shorter and easier to extend. Signed-off-by: Rene Scharfe --- send-pack.c | 28

[PATCH] http: use internal argv_array of struct child_process

2017-12-22 Thread René Scharfe
Avoid a strangely magic array size (it's slightly too big) and explicit index numbers by building the command line for index-pack using the embedded argv_array of the child_process. The resulting code is shorter and easier to extend. Signed-off-by: Rene Scharfe --- http.c | 12