Re: [PATCH v4 04/11] replace: "libify" create_graft() and callees

2018-04-25 Thread Johannes Schindelin
Hi Stefan, On Tue, 24 Apr 2018, Stefan Beller wrote: > On Tue, Apr 24, 2018 at 11:51 AM, Johannes Schindelin > wrote: > > > > > Oy vey. How many more mistakes can I introduce in one commit... > > > > I ask this myself all the time, but Software is hard when not having > computer assisted check

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Michał Górny
W dniu śro, 25.04.2018 o godzinie 06∶58 +, użytkownik Robin H. Johnson napisał: > On Fri, Apr 13, 2018 at 07:01:29PM +0200, Michał Górny wrote: > > --- a/entry.c > > +++ b/entry.c > > @@ -411,6 +411,7 @@ int checkout_entry(struct cache_entry *ce, > > { > > static struct strbuf path = STRBU

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Robin H. Johnson
On Tue, Apr 24, 2018 at 08:41:07AM +0900, Junio C Hamano wrote: > "Robin H. Johnson" writes: > > > On Fri, Apr 13, 2018 at 07:01:29PM +0200, Michał Górny wrote: > >> Currently git does not control mtimes of files being checked out. This > >> means that the only assumption you could make is that

Re: [PATCH v3 09/11] technical/shallow: describe the relationship with replace refs

2018-04-25 Thread Johannes Schindelin
Hi Philip & Junio, On Wed, 25 Apr 2018, Junio C Hamano wrote: > "Philip Oakley" writes: > > > Perhaps something like: > > +$GIT_DIR/shallow, and handle its contents similar to replace > > +refs (with the difference that shallow does not actually > > +create those replace refs) with the differen

Re: [PATCH v3] Make running git under other debugger-like programs easy

2018-04-25 Thread Johannes Schindelin
Hi Elijah, On Tue, 24 Apr 2018, Elijah Newren wrote: > This allows us to run git, when using the script from bin-wrappers, under > other programs. A few examples for usage within testsuite scripts: > >debug git checkout master >debug --debugger=nemiver git $ARGS >debug -d "valgrind

Re: [PATCH] git: add -N as a short option for --no-pager

2018-04-25 Thread Johannes Schindelin
Hi Hannes, On Wed, 25 Apr 2018, Johannes Sixt wrote: > Am 25.04.2018 um 02:05 schrieb Junio C Hamano: > > Johannes Sixt writes: > > > It is not uncommon to request that the output remains visible in > > > the terminal. I ran `git log` and then hit `q`, and the latest screen contents were still

Re: [PATCH v2 0/3] Some add-on patches on top of dj/runtime-prefix

2018-04-25 Thread Johannes Schindelin
Hi Junio, On Wed, 25 Apr 2018, Junio C Hamano wrote: > I really want to see that the runtime prefix stuff mature enough during > this cycle, so these follow-up patches are all very much appreciated. FWIW I merged these patches (including my touch-ups) into Git for Windows' `master` branch early.

Re: [PATCH v1 1/2] merge: Add merge.renames config setting

2018-04-25 Thread Johannes Schindelin
Hi Elijah, On Tue, 24 Apr 2018, Elijah Newren wrote: > On Tue, Apr 24, 2018 at 4:58 AM, Johannes Schindelin > wrote: > > > > On Tue, 24 Apr 2018, Junio C Hamano wrote: > > > >> Yeah, but as opposed to passing "oh, let's see if we can get a > >> reasonable result without rename detection just thi

What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes described

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 23 2018, Junio C. Hamano wrote: > "Robin H. Johnson" writes: > >> On Fri, Apr 13, 2018 at 07:01:29PM +0200, Michał Górny wrote: >>> Currently git does not control mtimes of files being checked out. This >>> means that the only assumption you could make is that all files created >>>

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Junio C Hamano
"Robin H. Johnson" writes: > In the thread from 6 years ago, you asked about tar's behavior for > mtimes. 'tar xf' restores mtimes from the tar archive, so relative > ordering after restore would be the same, and would only rebuild if the > original source happened to be dirty. > > This behavior

Re: [PATCH] git: add -N as a short option for --no-pager

2018-04-25 Thread Phillip Wood
On 24/04/18 17:59, Johannes Sixt wrote: In modern setups, less, the pager, uses alternate screen to show the content. When it is closed, it switches back to the original screen, and all content is gone. Are you setting LESS explicitly in the environment? From the git config man page: When the

[PATCH v5 00/11] Deprecate .git/info/grafts

2018-04-25 Thread Johannes Schindelin
It is fragile, as there is no way for the revision machinery to say "but now I want to traverse the graph ignoring the graft file" e.g. when pushing commits to a remote repository (which, as a consequence, can miss commits). And we already have a better solution with `git replace --graft [...]`.

[PATCH v5 03/11] replace: avoid using die() to indicate a bug

2018-04-25 Thread Johannes Schindelin
We have the BUG() macro for that purpose. Signed-off-by: Johannes Schindelin --- builtin/replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/replace.c b/builtin/replace.c index 245d3f4164e..e345a5a0f1c 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -5

[PATCH v5 01/11] argv_array: offer to split a string by whitespace

2018-04-25 Thread Johannes Schindelin
This is a simple function that will interpret a string as a whitespace delimited list of values, and add those values into the array. Note: this function does not (yet) offer to split by arbitrary delimiters, or keep empty values in case of runs of whitespace, or de-quote Unix shell style. All fo

[PATCH v5 07/11] Deprecate support for .git/info/grafts

2018-04-25 Thread Johannes Schindelin
The grafts feature was a convenient way to "stitch together" ancient history to the fresh start of linux.git. Its implementation is, however, not up to Git's standards, as there are too many ways where it can lead to surprising and unwelcome behavior. For example, when pushing from a repository w

[PATCH v5 06/11] Add a test for `git replace --convert-graft-file`

2018-04-25 Thread Johannes Schindelin
The proof, as the saying goes, lies in the pudding. So here is a regression test that not only demonstrates what the option is supposed to accomplish, but also demonstrates that it does accomplish it. Signed-off-by: Johannes Schindelin --- builtin/replace.c | 1 - t/t6050-replace.sh | 20 +

[PATCH v5 08/11] filter-branch: stop suggesting to use grafts

2018-04-25 Thread Johannes Schindelin
The graft file is deprecated now, so let's use replace refs in the example in filter-branch's man page instead. Suggested-by: Eric Sunshine Signed-off-by: Johannes Schindelin --- Documentation/git-filter-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentatio

[PATCH v5 09/11] technical/shallow: stop referring to grafts

2018-04-25 Thread Johannes Schindelin
Now that grafts are deprecated, we should start to assume that readers have no idea what grafts are. So it makes more sense to make the description of the "shallow" feature stand on its own. Suggested-by: Eric Sunshine Helped-by: Junio Hamano Signed-off-by: Johannes Schindelin --- Documentatio

[PATCH v5 11/11] Remove obsolete script to convert grafts to replace refs

2018-04-25 Thread Johannes Schindelin
The functionality is now implemented as `git replace --convert-graft-file`. Signed-off-by: Johannes Schindelin --- contrib/convert-grafts-to-replace-refs.sh | 28 --- 1 file changed, 28 deletions(-) delete mode 100755 contrib/convert-grafts-to-replace-refs.sh diff --git a/c

[PATCH v5 02/11] commit: Let the callback of for_each_mergetag return on error

2018-04-25 Thread Johannes Schindelin
This is yet another patch to be filed under the keyword "libification". There is one subtle change in behavior here, where a `git log` that has been asked to show the mergetags would now stop reporting the mergetags upon the first failure, whereas previously, it would have continued to the next me

[PATCH v5 04/11] replace: "libify" create_graft() and callees

2018-04-25 Thread Johannes Schindelin
File this away as yet another patch in the "libification" category. As with all useful functions, in the next commit we want to use create_graft() from a higher-level function where it would be inconvenient if the called function simply die()s: if there is a problem, we want to let the user know h

[PATCH v5 05/11] replace: introduce --convert-graft-file

2018-04-25 Thread Johannes Schindelin
This option is intended to help with the transition away from the now-deprecated graft file. Signed-off-by: Johannes Schindelin --- Documentation/git-replace.txt | 11 ++--- builtin/replace.c | 45 ++- 2 files changed, 52 insertions(+), 4 deletions

[PATCH v5 10/11] technical/shallow: describe why shallow cannot use replace refs

2018-04-25 Thread Johannes Schindelin
It is tempting to do away with commit_graft altogether (in the long haul), now that grafts are deprecated. However, the shallow feature needs a couple of things that the replace refs cannot fulfill. Let's point that out in the documentation. Signed-off-by: Johannes Schindelin --- Documentation/

Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 25 2018, Junio C. Hamano wrote: > THe command line completion (in contrib/) has been taught that "git > * js/colored-push-errors (2018-04-24) 4 commits > - config: document the settings to colorize push errors/hints > - push: test to verify that push errors are colored > - push:

Re: [PATCH v5 09/11] technical/shallow: stop referring to grafts

2018-04-25 Thread Jakub Narębski
On 25 April 2018 at 11:54, Johannes Schindelin wrote: > Now that grafts are deprecated, we should start to assume that readers > have no idea what grafts are. So it makes more sense to make the > description of the "shallow" feature stand on its own. > > Suggested-by: Eric Sunshine > Helped-by: J

[PATCH v9 01/17] sequencer: avoid using errno clobbered by rollback_lock_file()

2018-04-25 Thread Johannes Schindelin
As pointed out in a review of the `--rebase-merges` patch series, `rollback_lock_file()` clobbers errno. Therefore, we have to report the error message that uses errno before calling said function. Signed-off-by: Johannes Schindelin --- sequencer.c | 10 ++ 1 file changed, 6 insertions(+

[PATCH v9 03/17] sequencer: refactor how original todo list lines are accessed

2018-04-25 Thread Johannes Schindelin
Previously, we did a lot of arithmetic gymnastics to get at the line in the todo list (as stored in todo_list.buf). This might have been fast, but only in terms of execution speed, not in terms of developer time. Let's refactor this to make it a lot easier to read, and hence to reason about the co

[PATCH v9 02/17] sequencer: make rearrange_squash() a bit more obvious

2018-04-25 Thread Johannes Schindelin
There are some commands that have to be skipped from rearranging by virtue of not handling any commits. However, the logic was not quite obvious: it skipped commands based on their position in the enum todo_command. Instead, let's make it explicit that we skip all commands that do not handle any

[PATCH v9 04/17] sequencer: offer helpful advice when a command was rescheduled

2018-04-25 Thread Johannes Schindelin
Previously, we did that just magically, and potentially left some users quite puzzled. Let's err on the safe side instead, telling the user what is happening, and how they are supposed to continue. Signed-off-by: Johannes Schindelin --- sequencer.c | 16 1 file changed, 16 inser

[PATCH v9 00/17] rebase -i: offer to recreate commit topology by rebasing merges

2018-04-25 Thread Johannes Schindelin
Junio, I think this is now ready for `next`. Thank you for your patience and help with this. Once upon a time, I dreamed of an interactive rebase that would not linearize all patches and drop all merge commits, but instead recreate the commit topology faithfully. My original attempt was --preserv

[PATCH v9 07/17] sequencer: introduce the `merge` command

2018-04-25 Thread Johannes Schindelin
This patch is part of the effort to reimplement `--preserve-merges` with a substantially improved design, a design that has been developed in the Git for Windows project to maintain the dozens of Windows-specific patch series on top of upstream Git. The previous patch implemented the `label` and `

[PATCH v9 06/17] sequencer: introduce new commands to reset the revision

2018-04-25 Thread Johannes Schindelin
In the upcoming commits, we will teach the sequencer to rebase merges. This will be done in a very different way from the unfortunate design of `git rebase --preserve-merges` (which does not allow for reordering commits, or changing the branch topology). The main idea is to introduce new todo list

[PATCH v9 09/17] rebase-helper --make-script: introduce a flag to rebase merges

2018-04-25 Thread Johannes Schindelin
The sequencer just learned new commands intended to recreate branch structure (similar in spirit to --preserve-merges, but with a substantially less-broken design). Let's allow the rebase--helper to generate todo lists making use of these commands, triggered by the new --rebase-merges option. For

[PATCH v9 05/17] git-rebase--interactive: clarify arguments

2018-04-25 Thread Johannes Schindelin
From: Stefan Beller Up to now each command took a commit as its first argument and ignored the rest of the line (usually the subject of the commit) Now that we are about to introduce commands that take different arguments, clarify each command by giving the argument list. Signed-off-by: Stefan

[PATCH v9 08/17] sequencer: fast-forward `merge` commands, if possible

2018-04-25 Thread Johannes Schindelin
Just like with regular `pick` commands, if we are trying to rebase a merge commit, we now test whether the parents of said commit match HEAD and the commits to be merged, and fast-forward if possible. This is not only faster, but also avoids unnecessary proliferation of new objects. Signed-off-by

[PATCH v9 11/17] rebase --rebase-merges: add test for --keep-empty

2018-04-25 Thread Johannes Schindelin
From: Phillip Wood If there are empty commits on the left hand side of $upstream...HEAD then the empty commits on the right hand side that we want to keep are being pruned. Signed-off-by: Phillip Wood --- t/t3421-rebase-topology-linear.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t

[PATCH v9 12/17] sequencer: make refs generated by the `label` command worktree-local

2018-04-25 Thread Johannes Schindelin
This allows for rebases to be run in parallel in separate worktrees (think: interrupted in the middle of one rebase, being asked to perform a different rebase, adding a separate worktree just for that job). Signed-off-by: Johannes Schindelin --- refs.c | 3 ++- t/t3430-rebase-

[PATCH v9 10/17] rebase: introduce the --rebase-merges option

2018-04-25 Thread Johannes Schindelin
Once upon a time, this here developer thought: wouldn't it be nice if, say, Git for Windows' patches on top of core Git could be represented as a thicket of branches, and be rebased on top of core Git in order to maintain a cherry-pick'able set of patch series? The original attempt to answer this

[PATCH v9 15/17] pull: accept --rebase=merges to recreate the branch topology

2018-04-25 Thread Johannes Schindelin
Similar to the `preserve` mode simply passing the `--preserve-merges` option to the `rebase` command, the `merges` mode simply passes the `--rebase-merges` option. This will allow users to conveniently rebase non-trivial commit topologies when pulling new commits, without flattening them. Signed-

[PATCH v9 13/17] sequencer: handle post-rewrite for merge commands

2018-04-25 Thread Johannes Schindelin
In the previous patches, we implemented the basic functionality of the `git rebase -i --rebase-merges` command, in particular the `merge` command to create merge commits in the sequencer. The interactive rebase is a lot more these days, though, than a simple cherry-pick in a loop. For example, it

[PATCH v9 16/17] rebase -i: introduce --rebase-merges=[no-]rebase-cousins

2018-04-25 Thread Johannes Schindelin
When running `git rebase --rebase-merges` non-interactively with an ancestor of HEAD as (or leaving the todo list unmodified), we would ideally recreate the exact same commits as before the rebase. However, if there are commits in the commit range .. that do not have as direct ancestor (i.e. if

[PATCH v9 14/17] rebase --rebase-merges: avoid "empty merges"

2018-04-25 Thread Johannes Schindelin
The `git merge` command does not allow merging commits that are already reachable from HEAD: `git merge HEAD^`, for example, will report that we are already up to date and not change a thing. In an interactive rebase, such a merge could occur previously, e.g. when competing (or slightly modified)

[PATCH v9 17/17] rebase -i --rebase-merges: add a section to the man page

2018-04-25 Thread Johannes Schindelin
The --rebase-merges mode is probably not half as intuitive to use as its inventor hopes, so let's document it some. Signed-off-by: Johannes Schindelin --- Documentation/git-rebase.txt | 135 +++ 1 file changed, 135 insertions(+) diff --git a/Documentation/git-reb

`iconv` should have the encoding `ISO646-SE2`

2018-04-25 Thread Abinsium
I installed from `Git-2.16.2-64-bit.exe` from git-scm.com. `iconv` is included in this package. I think `iconv` should have the encoding `ISO646-SE2`. Ubuntu 16.04 has this encoding. I use it to read old Swedish text files, which there are a lot of e.g.: `curl -s https://www.abc.se/programbanken

js/rebase-recreate-merge, was Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Johannes Schindelin
Hi Junio, On Wed, 25 Apr 2018, Junio C Hamano wrote: > * js/rebase-recreate-merge (2018-04-24) 16 commits > - rebase -i --rebase-merges: add a section to the man page > - rebase -i: introduce --rebase-merges=[no-]rebase-cousins > - pull: accept --rebase=merges to recreate the branch topology >

Re: [PATCH v3 0/4] rebase -i: avoid stale "# This is a combinationof" in commit messages

2018-04-25 Thread Johannes Schindelin
Hi Phillip, On Mon, 23 Apr 2018, Phillip Wood wrote: > On 23/04/18 19:11, Stefan Beller wrote: > > > > On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin > > wrote: > > > Eric Sunshine pointed out that I had such a commit message in > > > https://public-inbox.org/git/CAPig+cRrS0_nYJJY=o6cbov

Re: [PATCH v1] perf/aggregate: tighten option parsing

2018-04-25 Thread Christian Couder
On Sat, Apr 21, 2018 at 5:50 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> Not necessarily worth a re-roll. >> >> Not that it matters in this case, but just as a bit of Perl rx pedantry, >> yes his is tighter & more correct. You didn't consider how "." interacts >> with newlin

java diffs show no method context

2018-04-25 Thread Ulrich Windl
Hi! This is for git 2.13.6, and it may be an FAQ or frequent feature request. Anyway: I'm new to Java, and writing my first project using Git, I found that "git diff" only reports the class in the diff context, but not the method (as seen for C, for example). I'd wish to have the method where t

Re: [PATCH v3 4/6] git.c: implement --list-cmds=porcelain

2018-04-25 Thread SZEDER Gábor
On Sat, Apr 21, 2018 at 6:54 PM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/contrib/completion/git-completion.bash > b/contrib/completion/git-completion.bash > index a5f13ade20..7d17ca23f6 100644 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -8

Re: [PATCH v3 4/6] git.c: implement --list-cmds=porcelain

2018-04-25 Thread SZEDER Gábor
On Tue, Apr 24, 2018 at 6:17 PM, Duy Nguyen wrote: > On Tue, Apr 24, 2018 at 6:12 PM, Duy Nguyen wrote: >> git-completion.bash will be updated to ask git "give me the commands >> in the mainporcelain, completable or external category". This also >> addresses another thing that bugs me: I wanted a

Re: [PATCH v3 5/9] ref-filter: use generation number for --contains

2018-04-25 Thread Derrick Stolee
On 4/24/2018 2:56 PM, Jakub Narebski wrote: Derrick Stolee writes: One way to fix this is to call 'prepare_commit_graph()' directly and then test that 'commit_graph' is non-null before performing any parses. I'm not thrilled with how that couples the commit-graph implementation to this feature,

[PATCH v4 01/10] ref-filter: fix outdated comment on in_commit_list

2018-04-25 Thread Derrick Stolee
The in_commit_list() method does not check the parents of the candidate for containment in the list. Fix the comment that incorrectly states that it does. Reported-by: Jakub Narebski Signed-off-by: Derrick Stolee --- ref-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 00/10] Compute and consume generation numbers

2018-04-25 Thread Derrick Stolee
Thanks for the feedback on the previous version. I think this series is stabilizing nicely. I'll reply to this message with an inter-diff as it is not too large to share but would clutter this cover letter. Thanks, -Stolee -- >8 -- This is the one of several "small" patches that follow the seria

[PATCH v4 03/10] commit-graph: compute generation numbers

2018-04-25 Thread Derrick Stolee
While preparing commits to be written into a commit-graph file, compute the generation numbers using a depth-first strategy. The only commits that are walked in this depth-first search are those without a precomputed generation number. Thus, computation time will be relative to the number of new c

[PATCH v4 02/10] commit: add generation number to struct commmit

2018-04-25 Thread Derrick Stolee
The generation number of a commit is defined recursively as follows: * If a commit A has no parents, then the generation number of A is one. * If a commit A has parents, then the generation number of A is one more than the maximum generation number among the parents of A. Add a uint32_t generat

[PATCH v4 06/10] ref-filter: use generation number for --contains

2018-04-25 Thread Derrick Stolee
A commit A can reach a commit B only if the generation number of A is strictly larger than the generation number of B. This condition allows significantly short-circuiting commit-graph walks. Use generation number for '--contains' type queries. On a copy of the Linux repository where HEAD is cont

[PATCH v4 07/10] commit: use generation numbers for in_merge_bases()

2018-04-25 Thread Derrick Stolee
The containment algorithm for 'git branch --contains' is different from that for 'git tag --contains' in that it uses is_descendant_of() instead of contains_tag_algo(). The expensive portion of the branch algorithm is computing merge bases. When a commit-graph file exists with generation numbers c

[PATCH v4 05/10] commit-graph: always load commit-graph information

2018-04-25 Thread Derrick Stolee
Most code paths load commits using lookup_commit() and then parse_commit(). In some cases, including some branch lookups, the commit is parsed using parse_object_buffer() which side-steps parse_commit() in favor of parse_commit_buffer(). With generation numbers in the commit-graph, we need to ensu

[PATCH v4 08/10] commit: add short-circuit to paint_down_to_common()

2018-04-25 Thread Derrick Stolee
When running 'git branch --contains', the in_merge_bases_many() method calls paint_down_to_common() to discover if a specific commit is reachable from a set of branches. Commits with lower generation number are not needed to correctly answer the containment query of in_merge_bases_many(). Add a ne

[PATCH v4 04/10] commit: use generations in paint_down_to_common()

2018-04-25 Thread Derrick Stolee
Define compare_commits_by_gen_then_commit_date(), which uses generation numbers as a primary comparison and commit date to break ties (or as a comparison when both commits do not have computed generation numbers). Since the commit-graph file is closed under reachability, we know that all commits i

[PATCH v4 10/10] commit-graph.txt: update design document

2018-04-25 Thread Derrick Stolee
We now calculate generation numbers in the commit-graph file and use them in paint_down_to_common(). Expand the section on generation numbers to discuss how the three special generation numbers GENERATION_NUMBER_INFINITY, _ZERO, and _MAX interact with other generation numbers. Signed-off-by: Derr

[PATCH v4 09/10] merge: check config before loading commits

2018-04-25 Thread Derrick Stolee
Now that we use generation numbers from the commit-graph, we must ensure that all commits that exist in the commit-graph are loaded from that file instead of from the object database. Since the commit-graph file is only checked if core.commitGraph is true, we must check the default config before we

Re: [PATCH v4 00/10] Compute and consume generation numbers

2018-04-25 Thread Derrick Stolee
As promised, here is the diff from v3. Thanks, -Stolee -- >8 -- diff --git a/builtin/merge.c b/builtin/merge.c index 7e1da6c6ea..b819756946 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1148,6 +1148,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)     branch = b

Re: [PATCH v3 4/6] git.c: implement --list-cmds=porcelain

2018-04-25 Thread Duy Nguyen
On Wed, Apr 25, 2018 at 3:06 PM, SZEDER Gábor wrote: >> -__git_list_all_commands () > >> -__git_list_porcelain_commands () > > Users can have their own completion scriptlets for their own git > commands, and these should be able to rely on helper functions in > git-completion.bash to do things lik

Re: [PATCH v2 1/1] completion: load completion file for external subcommand

2018-04-25 Thread SZEDER Gábor
On Mon, Apr 23, 2018 at 5:12 PM, SZEDER Gábor wrote: > On Thu, Apr 19, 2018 at 9:07 PM, Florian Gamböck wrote: >> On 2018-04-18 21:51, SZEDER Gábor wrote: >>> I believe the main bash-completion repository can be found at: >>> >>> https://github.com/scop/bash-completion.git >>> >>> This repositor

Re: [PATCH v3 4/6] git.c: implement --list-cmds=porcelain

2018-04-25 Thread Duy Nguyen
On Wed, Apr 25, 2018 at 3:46 PM, SZEDER Gábor wrote: > On Tue, Apr 24, 2018 at 6:17 PM, Duy Nguyen wrote: >> On Tue, Apr 24, 2018 at 6:12 PM, Duy Nguyen wrote: >>> git-completion.bash will be updated to ask git "give me the commands >>> in the mainporcelain, completable or external category". Th

Re: [PATCH v1 2/2] merge: Add merge.aggressive config setting

2018-04-25 Thread Ben Peart
On 4/24/2018 7:57 PM, Junio C Hamano wrote: Ben Peart writes: That said, it makes sense to me to do this when rename detection is turned off. In fact, I think you'd automatically want to set aggressive to true whenever rename detection is turned off (whether by your merge.renames option or

Re: GSoC students and mentors in 2018

2018-04-25 Thread Alban Gruin
Le 23/04/2018 à 23:01, Stefan Beller a écrit : > Hi Git community, > > This year we'll participate once again in Google Summer or Code! > We'll have 3 students and 3 mentors, which is more than in recent years. > > Paul-Sebastian Ungureanu mentored by DScho, wants to convert git-stash > into a bu

Re: java diffs show no method context

2018-04-25 Thread Alban Gruin
Le 25/04/2018 à 14:53, Ulrich Windl a écrit : > Hi! > > This is for git 2.13.6, and it may be an FAQ or frequent feature request. > Anyway: > I'm new to Java, and writing my first project using Git, I found that "git > diff" only reports the class in the diff context, but not the method (as seen

Re: GSoC students and mentors in 2018

2018-04-25 Thread Pratik Karki
On Tue, Apr 24, 2018 at 2:46 AM, Stefan Beller wrote: > Hi Git community, > > This year we'll participate once again in Google Summer or Code! > We'll have 3 students and 3 mentors, which is more than in recent years. > > Paul-Sebastian Ungureanu mentored by DScho, wants to convert git-stash > int

Re: [RFC PATCH] checkout: Force matching mtime between files

2018-04-25 Thread Marc Branchaud
On 2018-04-25 04:48 AM, Junio C Hamano wrote: "Robin H. Johnson" writes: In the thread from 6 years ago, you asked about tar's behavior for mtimes. 'tar xf' restores mtimes from the tar archive, so relative ordering after restore would be the same, and would only rebuild if the original source

Re: [PATCH v2 0/2] add additional config settings for merge

2018-04-25 Thread Ben Peart
On 4/24/2018 8:13 PM, Junio C Hamano wrote: Ben Peart writes: diff.renameLimit:: The number of files to consider when performing the copy/rename - detection; equivalent to the 'git diff' option `-l`. + detection; equivalent to the 'git diff' option `-l`. This setting +

Re: [PATCH v2 1/2] merge: Add merge.renames config setting

2018-04-25 Thread Elijah Newren
On Tue, Apr 24, 2018 at 1:31 PM, Ben Peart wrote: > On 4/24/2018 2:59 PM, Elijah Newren wrote: >> On Tue, Apr 24, 2018 at 10:11 AM, Ben Peart >> wrote: >>> >>> diff --git a/builtin/merge.c b/builtin/merge.c >>> index 8746c5e3e8..3be52cd316 100644 >>> --- a/builtin/merge.c >>> +++ b/builtin/merge.

[PATCH v2] perf/aggregate: use Getopt::Long for option parsing

2018-04-25 Thread Christian Couder
When passing an option '--foo' that it does not recognize, the aggregate.perl script should die with an helpful error message like: Unknown option: foo ./aggregate.perl [options] [--] [...] [--] \ [...] > Options: --codespeed * Format output for Codespeed --reponame * Send

Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Elijah Newren
Hi Junio, On Wed, Apr 25, 2018 at 1:37 AM, Junio C Hamano wrote: > * en/unpack-trees-split-index-fix (2018-04-24) 1 commit > - unpack_trees: fix breakage when o->src_index != o->dst_index > > The split-index feature had a long-standing and dormant bug in > certain use of the in-core merge mac

[PATCH v4/wip 00/12] Keep all info in command-list.txt in git binary

2018-04-25 Thread Nguyễn Thái Ngọc Duy
This is not exactly v4 and likely broken. But I've made several debatable changes and would like your opinions before making even more changes in this direction. In 03/12 I made a format change in command-list.txt. The group description is no longer in this file but in help.c instead. This simplif

[PATCH v4/wip 01/12] generate-cmds.sh: factor out synopsis extract code

2018-04-25 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 | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index eeea4b67ea..17d6809ef5 1

[PATCH v4/wip 07/12] completion: implement and use --list-cmds=all

2018-04-25 Thread Nguyễn Thái Ngọc Duy
Instead of parsing "git help -a" output, which is tricky to get right, less elegant and also slow, make git provide the list in machine-friendly form. Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 2 +- git.c | 2 ++ help.c

[PATCH v4/wip 03/12] help: use command-list.h for common command list

2018-04-25 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 keeps

[PATCH v4/wip 02/12] generate-cmds.sh: export all commands to command-list.h

2018-04-25 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 hel

[PATCH v4/wip 08/12] git: support --list-cmds=

2018-04-25 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. S

[PATCH v4/wip 06/12] git: accept multiple --list-cmds options

2018-04-25 Thread Nguyễn Thái Ngọc Duy
Later on we may support non-overlapping command groups to --list-cmds. Allow the user to execute just one "git" process and get multiple groups. This may matter for git-completion.bash on Windows because we don't want the user to way for long when TAB-ing and Windows is slow on launching new proces

[PATCH v4/wip 04/12] Remove common-cmds.h

2018-04-25 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 ++--- generate-cmdlist.sh | 46 ++

[PATCH v4/wip 12/12] completion: let git provide the completable command list

2018-04-25 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. Note that the current completion script incorrectly classifies filter-branch as porcelain and t9902 tests this behavior. We keep it this way in t9902 be

[PATCH v4/wip 05/12] git.c: convert --list-*builtins to --list-cmds=*

2018-04-25 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. Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 2 +- git.c | 12 +++- t/t0012-help.sh

[PATCH v4/wip 09/12] help: add "-a --verbose" to list all commands with synopsis

2018-04-25 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 any

[PATCH v4/wip 11/12] command-list.txt: add new category "complete"

2018-04-25 Thread Nguyễn Thái Ngọc Duy
This category, combined with 'external' and 'mainporcelain', is intended to replace the "porcelain command list" in git-completion.bash. In other words, these are the commands that will show up by default when you type "git ". Compared to the current list in git-completion.bash (which is basically

[PATCH v4/wip 10/12] help: use command-list.txt for the source of guides

2018-04-25 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 lists guides in git.txt, but I'll leave that for now. Signed-off-by: Nguyễn Thái

Re: [PATCH v3 0/4] rebase -i: avoid stale "# This is a combinationof" in commit messages

2018-04-25 Thread Phillip Wood
On 25/04/18 13:48, Johannes Schindelin wrote: Hi Phillip, On Mon, 23 Apr 2018, Phillip Wood wrote: On 23/04/18 19:11, Stefan Beller wrote: On Sat, Apr 21, 2018 at 12:34 AM, Johannes Schindelin wrote: Eric Sunshine pointed out that I had such a commit message in https://public-inbox.org/git

Re: git https and github

2018-04-25 Thread Beat Bolli
On 25.04.18 02:32, Lev wrote: > Hi list, > > > I'm struggling with git connecting to Github. > > The problem might be SSL/TLS related. > > https://githubengineering.com/crypto-removal-notice/ > > I suspect that my setup still uses tlsv1 or tlsv1.1. > > I've tried to explicitly set git to use

Re: What's cooking in git.git (Apr 2018, #03; Wed, 25)

2018-04-25 Thread Brandon Williams
On 04/25, Ævar Arnfjörð Bjarmason wrote: > > * bw/protocol-v2 (2018-03-15) 35 commits > > (merged to 'next' on 2018-04-11 at 23ee234a2c) > > + remote-curl: don't request v2 when pushing > > + remote-curl: implement stateless-connect command > > + http: eliminate "# service" line when using pro

Re: [PATCH v4/wip 01/12] generate-cmds.sh: factor out synopsis extract code

2018-04-25 Thread Eric Sunshine
On Wed, Apr 25, 2018 at 12:30 PM, Nguyễn Thái Ngọc Duy wrote: > This makes it easier to reuse the same code in another place (very > soon). > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh > @@ -1,5 +1,17 @@ > +get_synopsis () { > + loca

Re: [PATCH v4/wip 02/12] generate-cmds.sh: export all commands to command-list.h

2018-04-25 Thread Eric Sunshine
On Wed, Apr 25, 2018 at 12:30 PM, Nguyễn Thái Ngọc Duy wrote: > 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 classific

Re: [PATCH v4/wip 01/12] generate-cmds.sh: factor out synopsis extract code

2018-04-25 Thread SZEDER Gábor
On Wed, Apr 25, 2018 at 7:59 PM Eric Sunshine wrote: > On Wed, Apr 25, 2018 at 12:30 PM, Nguyễn Thái Ngọc Duy > wrote: > > This makes it easier to reuse the same code in another place (very > > soon). > > > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > diff --git a/generate-cmdlist.sh b/gen

Re: [PATCH v4/wip 08/12] git: support --list-cmds=

2018-04-25 Thread Eric Sunshine
On Wed, Apr 25, 2018 at 12:31 PM, Nguyễn Thái Ngọc Duy wrote: > 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 b

[PATCHv3 0/9] object store: oid_object_info is the next contender

2018-04-25 Thread Stefan Beller
v3: * fixed and extended the commit message of last commit * fixed the last patch, as Jonathan Tan suggested, see interdiff: $ git diff remotes/origin/sb/oid-object-info (which is v2) diff --git c/sha1_file.c w/sha1_file.c index 94123e0299..dcd6b879ac 100644 --- c/sha1_file.c +

[PATCHv3 1/9] cache.h: add repository argument to oid_object_info_extended

2018-04-25 Thread Stefan Beller
Add a repository argument to allow oid_object_info_extended callers to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Signed-off-by: Stefan Beller --- builtin/cat-fil

[PATCHv3 3/9] packfile: add repository argument to retry_bad_packed_offset

2018-04-25 Thread Stefan Beller
Add a repository argument to allow the callers of retry_bad_packed_offset to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to

[PATCHv3 6/9] packfile: add repository argument to read_object

2018-04-25 Thread Stefan Beller
Add a repository argument to allow the callers of read_object to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the previous commits, use a macro to catch calle

  1   2   >