[PATCH] t: make many tests depend less on the refs being files

2018-05-20 Thread Christian Couder
From: David Turner So that they work under alternate ref storage backends. This will be really needed when such alternate ref storage backends are developed. But this could already help by making clear to readers that some tests do not depend on which ref backend is

Re: [PATCH v3 01/15] commit-slab.h: code split

2018-05-20 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The struct declaration and implementation macros are moved to > commit-slab-hdr.h and commit-slab-impl.h respectively. s/hdr/decl/; > > This right now is not needed for current users but if we make a public > commit-slab type, we may want to

Re: [PATCH 00/18] Add `branch-diff`, a `tbdiff` lookalike

2018-05-20 Thread Junio C Hamano
I've been using both branch-diff and tbdiff while comparing rerolled topics before accepting them. One obvious difference between the two is that the speed to compute pairing is quite different but that is expected ;-) Another difference that is somewhat irritating is that a SP that leads a

Re: [PATCH 1/1] Inform about fast-forwarding of submodules during merge

2018-05-20 Thread Junio C Hamano
Elijah Newren writes: > Thanks for continuing to push on this. This looks good so far (to > me), but I was also hoping to see the analogy between these messages > and "Auto-merging $FILE" for regular files mentioned. Both Junio[1] > and I[2] pointed out this similarity, and I

Re: [PATCH 2/2] apply: add --intent-to-add

2018-05-20 Thread Junio C Hamano
Duy Nguyen writes: >> >if (state->check_index && is_not_gitdir) >> >return error(_("--index outside a repository")); >> > + if (state->set_ita && is_not_gitdir) >> > + state->set_ita = 0; >> >> I think this should error out, just like one line above

Re: Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Jeff King
On Mon, May 21, 2018 at 09:25:01AM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > I have a feeling that argv_array might be a better fit for the > > purpose of keeping track of to_free[] strings in the context of this > > series. Moving away from string_list

Re: Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Jeff King
On Mon, May 21, 2018 at 09:01:05AM +0900, Junio C Hamano wrote: > Jacob Keller writes: > > > On Sun, May 20, 2018 at 3:17 AM, Martin Ågren > > wrote: > >> +/** > >> + * Add formatted string to the end of `list`. This function ignores > >> + *

[PATCH v4 19/28] t4022: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4022-diff-rewrite.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t4022-diff-rewrite.sh

Re: git apply does not honor diff.noprefix config setting

2018-05-20 Thread Junio C Hamano
hIpPy writes: > If I disable mnemonic prefix, > > $ git config --global diff.noprefix true > > and do a round-trip of format-patch and apply, Setting diff.noprefix does not disable "mnemonic prefix". It asks "diff" family of commands to use no prefix, not even the normal,

[PATCH v4 20/28] t4029: fix test indentation

2018-05-20 Thread brian m. carlson
We typically indent our tests with a single tab, partially so that we can take advantage of indented heredocs. Make this change and move the quote marks to be in the typical position for our tests. Signed-off-by: brian m. carlson --- t/t4029-diff-trailing-space.sh

[PATCH v4 24/28] t4205: sort log output in a hash-independent way

2018-05-20 Thread brian m. carlson
This test enumerates log entries and then sorts them. For SHA-1, this produces results that happen to sort in the order specified in the test, but for other hash algorithms they sort differently. Ensure we sort the log entries in a hash-independent way by sorting on the ref name instead of the

[PATCH v4 22/28] t4030: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4030-diff-textconv.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t4030-diff-textconv.sh

[PATCH v4 28/28] t5300: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t5300-pack-object.sh | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t5300-pack-object.sh

[PATCH v4 26/28] t4045: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4045-diff-relative.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t4045-diff-relative.sh

[PATCH v4 12/28] t3103: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it uses variables and command substitution for trees instead of hard-coded hashes. This also has the benefit of making it more obvious how the test works. Signed-off-by: brian m. carlson --- t/t3103-ls-tree-misc.sh | 3 ++- 1 file changed,

[PATCH v4 25/28] t4042: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4042-diff-textconv-caching.sh | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git

[PATCH v4 16/28] t4008: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4008-diff-break-rewrite.sh | 59 +++ 1 file changed, 32 insertions(+), 27 deletions(-) diff --git

[PATCH v4 23/28] t/lib-diff-alternative: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test code so that it computes variables for blobs instead of using hard-coded hashes. This makes t4033 and t4050 (the patience and histogram tests) pass. Signed-off-by: brian m. carlson --- t/lib-diff-alternative.sh | 12 1 file changed, 8

[PATCH v4 21/28] t4029: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4029-diff-trailing-space.sh | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/t4029-diff-trailing-space.sh

[PATCH v4 27/28] t4208: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4208-log-magic-pathspec.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t4208-log-magic-pathspec.sh

[PATCH v4 15/28] t4007: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs and uses the ZERO_OID variable instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4007-rename-3.sh | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v4 14/28] t3905: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t3905-stash-include-untracked.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH v4 17/28] t4014: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes values for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4014-format-patch.sh | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/t4014-format-patch.sh

[PATCH v4 18/28] t4020: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4020-diff-external.sh | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/t4020-diff-external.sh

[PATCH v4 13/28] t3702: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Strip out the index lines in the diff before comparing them, as these will differ between hash algorithms. This leads to a smaller, simpler change than editing the index line. Signed-off-by: brian m. carlson --- t/t3702-add-edit.sh | 7 +++ 1 file changed, 3

[PATCH v4 10/28] t: skip pack tests if not using SHA-1

2018-05-20 Thread brian m. carlson
These tests rely on creating packs with specially named objects which are necessarily dependent on the hash used. Skip these tests if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t5308-pack-detect-duplicates.sh | 6 ++

[PATCH v4 08/28] t1512: skip test if not using SHA-1

2018-05-20 Thread brian m. carlson
This test relies on objects with colliding short names which are necessarily dependent on the hash used. Skip the test if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t1512-rev-parse-disambiguation.sh | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v4 00/28] Hash-independent tests

2018-05-20 Thread brian m. carlson
This is part 2 in the series to make tests hash independent. This series introduces an SHA1 prerequisite which checks if the hash in use is SHA-1, and can be used to skip the test if it is not. Additionally, because NewHash will be 256-bit, I introduced aliases for the test constants $_x40 and

[PATCH v4 09/28] t4044: skip test if not using SHA-1

2018-05-20 Thread brian m. carlson
This test relies on objects with colliding short names which are necessarily dependent on the hash used. Skip the test if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t4044-diff-index-unique-abbrev.sh | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v4 11/28] t2203: abstract away SHA-1-specific constants

2018-05-20 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t2203-add-intent.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t2203-add-intent.sh

[PATCH v4 06/28] t0000: annotate with SHA1 prerequisite

2018-05-20 Thread brian m. carlson
Since this is a core test that tests basic functionality, annotate the assertions that have dependencies on SHA-1 with the appropriate prerequisite. Signed-off-by: brian m. carlson --- t/t-basic.sh | 24 1 file changed, 12

[PATCH v4 01/28] t/test-lib: add an SHA1 prerequisite

2018-05-20 Thread brian m. carlson
There are some basic tests in our codebase that test that we get fixed SHA-1 values. These are valuable because they make sure that our SHA-1 implementation is free of bugs, but obviously these tests will fail with a different hash. There are also tests which intentionally produce objects that

[PATCH v4 05/28] t: switch $_x40 to $OID_REGEX

2018-05-20 Thread brian m. carlson
Switch all uses of $_x40 to $OID_REGEX so that they work correctly with larger hashes. This commit was created by using the following sed command to modify all files in the t directory except t/test-lib.sh: sed -i 's/\$_x40/$OID_REGEX/g' Signed-off-by: brian m. carlson

[PATCH v4 07/28] t1007: annotate with SHA1 prerequisite

2018-05-20 Thread brian m. carlson
Since this is a core test that tests basic functionality, annotate the assertions that have dependencies on SHA-1 with the appropriate prerequisite. Signed-off-by: brian m. carlson --- t/t1007-hash-object.sh | 16 1 file changed, 8 insertions(+), 8

[PATCH v4 04/28] t/test-lib: introduce OID_REGEX

2018-05-20 Thread brian m. carlson
Currently we have a variable, $_x40, which contains a regex that matches a full 40-character hex constant. However, with NewHash, we'll have object IDs that are longer than 40 characters. In such a case, $_x40 will be a confusing name. Create a $OID_REGEX variable which will always reflect a

[PATCH v4 03/28] t: switch $_z40 to $ZERO_OID

2018-05-20 Thread brian m. carlson
Switch all uses of $_z40 to $ZERO_OID so that they work correctly with larger hashes. This commit was created by using the following sed command to modify all files in the t directory except t/test-lib.sh: sed -i 's/\$_z40/$ZERO_OID/g' Signed-off-by: brian m. carlson

[PATCH v4 02/28] t/test-lib: introduce ZERO_OID

2018-05-20 Thread brian m. carlson
Currently we have a variable, $_z40, which contains the all-zero object ID. However, with NewHash, we'll have an all-zero object ID which is longer than 40 hex characters. In such a case, $_z40 will be a confusing name. Create a $ZERO_OID variable which will always reflect the all-zeros object

Re: What's cooking in git.git (May 2018, #02; Thu, 17)

2018-05-20 Thread brian m. carlson
On Thu, May 17, 2018 at 03:01:40PM +0900, Junio C Hamano wrote: > * bc/hash-independent-tests (2018-05-16) 28 commits > - t5300: abstract away SHA-1-specific constants > - t4208: abstract away SHA-1-specific constants > - t4045: abstract away SHA-1-specific constants > - t4042: abstract away

Re: [PATCH 13/14] completion: reduce completable command list

2018-05-20 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > The following commands are removed from the complete list: > > - interpreter-trailers not for interactive use Typo here. see below. > -git-interpret-trailers purehelpers > complete >

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-20 Thread Junio C Hamano
René Scharfe writes: > How about this instead? > > -- >8 -- > Subject: [PATCH] fsmonitor: use internal argv_array of struct child_process > > Avoid magic array sizes and indexes by constructing the fsmonitor > command line using the embedded argv_array of the child_process. The >

Re: Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Junio C Hamano
Junio C Hamano writes: > I have a feeling that argv_array might be a better fit for the > purpose of keeping track of to_free[] strings in the context of this > series. Moving away from string_list would allow us to sidestep the > storage ownership issues the API has, and we

Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Junio C Hamano
Jacob Keller writes: > On Sun, May 20, 2018 at 3:17 AM, Martin Ågren wrote: >> +/** >> + * Add formatted string to the end of `list`. This function ignores >> + * the value of `list->strdup_strings` and always appends a freshly >> + * allocated

Proposal

2018-05-20 Thread Miss Zeliha Omer Faruk
Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

Proposal

2018-05-20 Thread Zeliha Omer Faruk
-- Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

[RFC/PATCH 5/7] rerere: only return whether a path has conflicts or not

2018-05-20 Thread Thomas Gummerer
We currently return the exact number of conflict hunks a certain path has from the 'handle_paths' function. However all of its callers only care whether there are conflicts or not or if there is an error. Return only that information, and document that only that information is returned. This

[RFC/PATCH 6/7] rerere: factor out handle_conflict function

2018-05-20 Thread Thomas Gummerer
Factor out the handle_conflict function, which handles a single conflict in a path. This is a preparation for the next step, where this function will be re-used. No functional changes intended. Signed-off-by: Thomas Gummerer --- rerere.c | 143

[RFC/PATCH 4/7] rerere: fix crash when conflict goes unresolved

2018-05-20 Thread Thomas Gummerer
Currently when a user doesn't resolve a conflict in a file, but commits the file with the conflict markers, and later the file ends up in a state in which rerere can't handle it, subsequent rerere operations that are interested in that path, such as 'rerere clear' or 'rerere forget ' will fail, or

[RFC/PATCH 7/7] rerere: teach rerere to handle nested conflicts

2018-05-20 Thread Thomas Gummerer
Currently rerere can't handle nested conflicts and will error out when it encounters such conflicts. Do that by recursively calling the 'handle_conflict' function to normalize the conflict. The conflict ID calculation here deserves some explanation: As we are using the same handle_conflict

[RFC/PATCH 3/7] rerere: add some documentation

2018-05-20 Thread Thomas Gummerer
Add some documentation for the logic behind the conflict normalization in rerere. Also describe a bug that happens because we just linearly scan for conflict markers. Signed-off-by: Thomas Gummerer --- This documents my understanding of the rerere conflict normalization

[RFC/PATCH 2/7] rerere: mark strings for translation

2018-05-20 Thread Thomas Gummerer
'git rerere' is considered a plumbing command and as such its output should be translated. Its functionality is also only enabled through a config setting, so scripts really shouldn't rely on its output either way. Signed-off-by: Thomas Gummerer --- rerere.c | 68

[RFC/PATCH 0/7] rerere: handle nested conflicts

2018-05-20 Thread Thomas Gummerer
I started this whole patch series when I did a git rebase, and was too lazy to resolve a conflict and just added the file with the conflict markers and continued. Once I got nested conflicts in the file, I decided to abort the rebase with 'git rebase --abort' and got a segfault in 'git rerere

[RFC/PATCH 1/7] rerere: unify error message when read_cache fails

2018-05-20 Thread Thomas Gummerer
We have multiple different variants of the error message we show to the user if 'read_cache' fails. The "Could not read index" variant we are using in 'rerere.c' is currently not used anywhere in translated form. As a subsequent commit will mark all output that comes from 'rerere.c' for

Re: [PATCH v2 02/12] commit-graph: verify file header information

2018-05-20 Thread Jakub Narebski
Derrick Stolee writes: > During a run of 'git commit-graph verify', list the issues with the > header information in the commit-graph file. Some of this information > is inferred from the loaded 'struct commit_graph'. Some header > information is checked as part of

Re: [GSoC] A blog about 'git stash' project

2018-05-20 Thread Paul-Sebastian Ungureanu
Hi On 17.05.2018 13:29, Kaartic Sivaraam wrote: On Thursday 17 May 2018 02:39 PM, Johannes Schindelin wrote: I have great empathy for the desire to see these bugs fixed. The conversion must come first, though, and in the interest of making it easier on me and other reviewers, I must insist on

Re: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Jacob Keller
On Sun, May 20, 2018 at 3:17 AM, Martin Ågren wrote: > +/** > + * Add formatted string to the end of `list`. This function ignores > + * the value of `list->strdup_strings` and always appends a freshly > + * allocated string, so you will probably not want to use it with >

[GSoC] GSoC with git, week 3

2018-05-20 Thread Alban Gruin
Hi, I published a new post about this week. You can read it here: https://blog.pa1ch.fr/posts/2018/05/20/en/gsoc2018-week-3.html Feel free to give me your feedback! :) Cheers, Alban

[PATCH v2 17/17] completion: allow to customize the completable command list

2018-05-20 Thread Nguyễn Thái Ngọc Duy
By default we show porcelain, external commands and a couple others that are also popular. If you are not happy with this list, you can now customize it a new config variable. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 8 +++

[PATCH v2 12/17] completion: let git provide the completable command list

2018-05-20 Thread Nguyễn Thái Ngọc Duy
Instead of maintaining a separate list of command classification, which often could go out of date, let's centralize the information back in git. While the function in git-completion.bash implies "list porcelain commands", that's not exactly what it does. It gets all commands (aka

[PATCH v2 15/17] completion: add and use --list-cmds=nohelpers

2018-05-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git.txt | 3 ++- contrib/completion/git-completion.bash | 20 git.c | 14 ++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git

[PATCH v2 05/17] git.c: convert --list-* to --list-cmds=*

2018-05-20 Thread Nguyễn Thái Ngọc Duy
Even if these are hidden options, let's make them a bit more generic since we're introducing more listing types shortly. The code is structured to allow combining multiple listing types together because we will soon add more types the 'builtins'. 'parseopt' remains separate because it has

[PATCH v2 09/17] help: add "-a --verbose" to list all commands with synopsis

2018-05-20 Thread Nguyễn Thái Ngọc Duy
This lists all recognized commands [1] by category. The group order follows closely git.txt. [1] We may actually show commands that are not built (e.g. if you set NO_PERL you don't have git-instaweb but it's still listed here). I ignore the problem because on Linux a git package could be split

[PATCH v2 11/17] command-list.txt: documentation and guide line

2018-05-20 Thread Nguyễn Thái Ngọc Duy
This is intended to help anybody who needs to update command-list.txt. It gives a brief introduction of all attributes a command can take. Signed-off-by: Nguyễn Thái Ngọc Duy --- command-list.txt | 45 + 1 file changed, 45

[PATCH v2 10/17] help: use command-list.txt for the source of guides

2018-05-20 Thread Nguyễn Thái Ngọc Duy
The help command currently hard codes the list of guides and their summary in C. Let's move this list to command-list.txt. This lets us extract summary lines from Documentation/git*.txt. This also potentially lets us list guides in git.txt, but I'll leave that for now. Signed-off-by: Nguyễn Thái

[PATCH v2 16/17] completion: add and use --list-cmds=alias

2018-05-20 Thread Nguyễn Thái Ngọc Duy
By providing aliases via --list-cmds=, we could simplify command collection code in the script. We only issue one git command. Before this patch that is "git config", after it's "git --list-cmds=". In "git help" completion case we actually reduce one "git" process (for getting guides) but that

[PATCH v2 04/17] Remove common-cmds.h

2018-05-20 Thread Nguyễn Thái Ngọc Duy
After the last patch, common-cmds.h is no longer used (and it was actually broken). Remove all related code. command-list.h will take its place from now on. Signed-off-by: Nguyễn Thái Ngọc Duy --- .gitignore | 1 - Makefile| 17 ++---

[PATCH v2 08/17] git: support --list-cmds=list-

2018-05-20 Thread Nguyễn Thái Ngọc Duy
This allows us to select any group of commands by a category defined in command-list.txt. This is an internal/hidden option so we don't have to be picky about the category name or worried about exposing too much. This will be used later by git-completion.bash to retrieve certain command groups.

[PATCH v2 06/17] git --list-cmds: collect command list in a string_list

2018-05-20 Thread Nguyễn Thái Ngọc Duy
Instead of printing the command directly one by one, keep them in a list and print at the end. This allows more modification before we print out (e.g. sorting, removing duplicates or even excluding some items). Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 22

[PATCH v2 02/17] generate-cmds.sh: export all commands to command-list.h

2018-05-20 Thread Nguyễn Thái Ngọc Duy
The current generate-cmds.sh generates just enough to print "git help" output. That is, it only extracts help text for common commands. The script is now updated to extract help text for all commands and keep command classification a new file, command-list.h. This will be useful later: - "git

[PATCH v2 07/17] completion: implement and use --list-cmds=main,others

2018-05-20 Thread Nguyễn Thái Ngọc Duy
This is part of the effort to break down and provide commands by category in machine-readable form. This could be helpful later on when completion script switches to use --list-cmds for selecting completable commands. It would be much easier for the user to choose to complete _all_ commands

[PATCH v2 03/17] help: use command-list.h for common command list

2018-05-20 Thread Nguyễn Thái Ngọc Duy
The previous commit added code generation for all_cmd_desc[] which includes almost everything we need to generate common command list. Convert help code to use that array instead and drop common_cmds[] array. The description of each common command group is removed from command-list.txt. This

[PATCH v2 13/17] completion: reduce completable command list

2018-05-20 Thread Nguyễn Thái Ngọc Duy
The following commands are removed from the complete list: - annotate obsolete, discouraged to use - filter-branchnot often used - get-tar-commit-idnot often used - imap-sendnot often used - interpreter-trailers not for interactive use - name-rev

[PATCH v2 01/17] generate-cmds.sh: factor out synopsis extract code

2018-05-20 Thread Nguyễn Thái Ngọc Duy
This makes it easier to reuse the same code in another place (very soon). Signed-off-by: Nguyễn Thái Ngọc Duy --- generate-cmdlist.sh | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index

[PATCH v2 14/17] Move declaration for alias.c to alias.h

2018-05-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- alias.c | 1 + alias.h | 9 + builtin/help.c | 1 + builtin/merge.c | 1 + cache.h | 5 - connect.c | 1 + git.c | 1 + pager.c | 1 + sequencer.c | 1 + shell.c |

[PATCH v2 00/17] nd/command-list updates

2018-05-20 Thread Nguyễn Thái Ngọc Duy
It turns out this series is not done as I thought it was :) v2 makes it possible to write gitcomp "$(git --list-cmds=...)" which is really nice and very close to what gitcomp_builtin does. Other changes are - support --list-cmds=alias and --list-cmds=nohelpers so that we could do the

Re: [PATCH 07/11] rerere: use repo_read_index_or_die

2018-05-20 Thread Thomas Gummerer
On 05/16, Stefan Beller wrote: > By switching to repo_read_index_or_die, we'll get a slightly different > error message ("index file corrupt") as well as localization of it. Apart from the slightly different error message, and the localization (both of which I think are a good thing), I notice

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-20 Thread Jeff King
On Sat, May 19, 2018 at 10:27:46AM +0200, René Scharfe wrote: > Am 19.05.2018 um 03:57 schrieb Jeff King: > > These formatted integers should always fit into their > > 64-byte buffers. Let's use xsnprintf() to add an assertion > > that this is the case, which makes auditing for other > >

Re: [PATCH 8/9] completion: support case-insensitive config vars just a bit

2018-05-20 Thread SZEDER Gábor
> config variable names are technically case-insensitive while this case > construct is by default case-sensitive. Moving it to case-insensitive > could be a lot more work. Bash v4 supports the case modification expansion in the form of ${prev,,}. Alas OSX (or older LTS/Enterprise Linux

Re: [PATCH 7/9] completion: drop the hard coded list of config vars

2018-05-20 Thread SZEDER Gábor
> The new help option --config-for-completion is a machine friendlier > version of --config where all the placeholders and wildcards are > dropped, leaving only the good, completable prefixes for > git-completion.bash to consume. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- >

Re: [PATCH 12/14] completion: let git provide the completable command list

2018-05-20 Thread Duy Nguyen
On Sun, May 20, 2018 at 3:20 PM, SZEDER Gábor wrote: > On Sat, May 19, 2018 at 6:27 AM, Nguyễn Thái Ngọc Duy > wrote: >> Instead of maintaining a separate list of command classification, >> which often could go out of date, let's centralize the

Re: [PATCH 14/14] completion: allow to customize the completable command list

2018-05-20 Thread Duy Nguyen
On Sun, May 20, 2018 at 4:27 PM, SZEDER Gábor wrote: > On Sat, May 19, 2018 at 6:27 AM, Nguyễn Thái Ngọc Duy > wrote: >> By default we show porcelain, external commands and a couple others >> that are also popular. If you are not happy with this list,

[PATCH v2] Use OPT_SET_INT_F() for cmdline option specification

2018-05-20 Thread Nguyễn Thái Ngọc Duy
The only thing these commands need is extra parseopt flag which can be passed in by OPT_SET_INT_F() and it is a bit more compact than full struct initialization. Signed-off-by: Nguyễn Thái Ngọc Duy --- Changes from v1 diff --git a/builtin/am.c b/builtin/am.c index

Re: [PATCH] Use OPT_SET_INT_F() for cmdline option specification

2018-05-20 Thread Duy Nguyen
On Sun, May 20, 2018 at 11:15 AM, Martin Ågren wrote: > On 20 May 2018 at 10:12, Nguyễn Thái Ngọc Duy wrote: >> The only thing these commands need is extra parseopt flags which can be >> passed in by OPT_SET_INT_F() and it is a bit more compact than

git push => git: 'credential-winstore' is not a git command.

2018-05-20 Thread Chris
Hi, Windows 10 git version 2.17.0.windows.1 I'm having a problem very similar to this one: https://stackoverflow.com/questions/11693074/git-credential-cache-is-not-a-git-command One of the comments on the question suggests this command: git config --global --unset credential.helper This did

Re: [PATCHv4 1/1] git-p4: add unshelve command

2018-05-20 Thread SZEDER Gábor
> diff --git a/t/t9832-unshelve.sh b/t/t9832-unshelve.sh > new file mode 100755 > index 00..cca2dec536 > --- /dev/null > +++ b/t/t9832-unshelve.sh > @@ -0,0 +1,153 @@ > +#!/bin/sh > + > +last_shelved_change() { Style nit: space between function name and () > + p4 changes -s shelved

Re: [PATCH 14/14] completion: allow to customize the completable command list

2018-05-20 Thread SZEDER Gábor
On Sat, May 19, 2018 at 6:27 AM, Nguyễn Thái Ngọc Duy wrote: > By default we show porcelain, external commands and a couple others > that are also popular. If you are not happy with this list, you can > now customize it. See the big comment block for details. > > PS. perhaps I

Re: [PATCH 13/14] completion: reduce completable command list

2018-05-20 Thread SZEDER Gábor
On Sat, May 19, 2018 at 6:27 AM, Nguyễn Thái Ngọc Duy wrote: > The following commands are removed from the complete list: > > - annotate obsolete, discouraged to use > - filter-branchnot often used > - get-tar-commit-idnot often used > - imap-send

Re: [PATCH 12/14] completion: let git provide the completable command list

2018-05-20 Thread SZEDER Gábor
On Sat, May 19, 2018 at 6:27 AM, Nguyễn Thái Ngọc Duy wrote: > Instead of maintaining a separate list of command classification, > which often could go out of date, let's centralize the information > back in git. > > While the function in git-completion.bash implies "list

Re: [PATCH v2 01/12] commit-graph: add 'verify' subcommand

2018-05-20 Thread Jakub Narebski
Derrick Stolee writes: > If the commit-graph file becomes corrupt, we need a way to verify > that its contents match the object database. In the manner of > 'git fsck' we will implement a 'git commit-graph verify' subcommand > to report all issues with the file. > > Add

Re:Second Email Notification!!

2018-05-20 Thread E Charity Grant
Hello Lucky Beneficiary, You have been selected to receive (€950,000.00) as a donation from the Emirates Foundation Award 2018. Kindly reply back for more details; Best Regards, Abdullah bin Zayed Al Nahyan. Contact E-mail: emiratesfor...@asia.com President of the Emirates Foundation.

[PATCH] regex: do not call `regfree()` if compilation fails

2018-05-20 Thread Martin Ågren
It is apparently undefined behavior to call `regfree()` on a regex where `regcomp()` failed. The language in [1] is a bit muddy, at least to me, but the clearest hint is this (`preg` is the `regex_t *`): Upon successful completion, the regcomp() function shall return 0. Otherwise, it

[PATCH v2 3/3] config: let `config_store_data_clear()` handle `key`

2018-05-20 Thread Martin Ågren
Instead of remembering to free `key` in each code path, let `config_store_data_clear()` handle that. We still need to free it before replacing it, though. Move that freeing closer to the replacing to be safe. Note that in that same part of the code, we can no longer set `key` to the original

[PATCH v2 2/3] config: let `config_store_data_clear()` handle `value_regex`

2018-05-20 Thread Martin Ågren
Instead of duplicating the logic for clearing up `value_regex`, let `config_store_data_clear()` handle that. When `regcomp()` fails, the current code does not call `regfree()`. Make sure we do the same by immediately invalidating `value_regex`. Some implementations are able to handle such an

[PATCH v2 1/3] config: free resources of `struct config_store_data`

2018-05-20 Thread Martin Ågren
Commit fee8572c6d (config: avoid using the global variable `store`, 2018-04-09) dropped the staticness of a certain struct, instead letting the users create an instance on the stack and pass around a pointer. We do not free all the memory that the struct tracks. When the struct was static, the

[PATCH v2 0/3] config: free resources of `struct config_store_data`

2018-05-20 Thread Martin Ågren
On 14 May 2018 at 05:03, Eric Sunshine wrote: > On Sun, May 13, 2018 at 5:58 AM, Martin Ågren wrote: >> >> How about the following two patches as patches 2/3 and 3/3? I would also >> need to mention in the commit message of this patch (1/3) that

[PATCH v4 2/4] merge-recursive: provide pair of `unpack_trees_{start,finish}()`

2018-05-20 Thread Martin Ågren
From: Elijah Newren Rename `git_merge_trees()` to `unpack_trees_start()` and extract the call to `discard_index()` into a new function `unpack_trees_finish()`. As a result, these are called early resp. late in `merge_trees()`, making the resource handling clearer. A later

[PATCH v4 3/4] string-list: provide `string_list_appendf()`

2018-05-20 Thread Martin Ågren
Add a function `string_list_appendf(list, fmt, ...)` to the string-list API. The next commit will add a user. This function naturally ignores the `strdup_strings`-setting and always appends a freshly allocated string. Thus, using this function with `strdup_strings = 0` risks making ownership

[PATCH v4 0/4] unpack_trees_options: free messages when done

2018-05-20 Thread Martin Ågren
This is v4 of my series for taking care of the memory allocated by `setup_unpack_trees_porcelain()`. As before, this is based on bp/merge-rename-config. On 19 May 2018 at 08:13, Martin Ågren wrote: > On 19 May 2018 at 03:02, Jeff King wrote: >> >>> > would

[PATCH v4 1/4] merge: setup `opts` later in `checkout_fast_forward()`

2018-05-20 Thread Martin Ågren
After we initialize the various fields in `opts` but before we actually use them, we might return early. Move the initialization further down, to immediately before we use `opts`. This limits the scope of `opts` and will help a later commit fix a memory leak without having to worry about those

[PATCH v4 4/4] unpack_trees_options: free messages when done

2018-05-20 Thread Martin Ågren
The strings allocated in `setup_unpack_trees_porcelain()` are never freed. Provide a function `clear_unpack_trees_porcelain()` to do so and call it where we use `setup_unpack_trees_porcelain()`. The only non-trivial user is `unpack_trees_start()`, where we should place the new call in

Re: [RFC 00/14] Allow fetch-pack to send ref names (globs allowed)

2018-05-20 Thread Apinan Ponchan
ส่งจาก iPhone ของฉัน

  1   2   >