Re: [PATCH 1/3] t2018: cleanup in current test

2019-04-25 Thread Eric Sunshine
On Thu, Apr 25, 2019 at 10:50 PM Junio C Hamano wrote: > Eric Sunshine writes: > > test_when_finished ' > > git checkout branch1 && > > test_might_fail git branch -D branch2 > > ' && > > Perhaps. Be careful in choosing the quotes between sq and dq, > though. Yep, thanks

Re: What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-04-25 Thread Junio C Hamano
Taylor Blau writes: > Ah, I _can_ see the merge in my local copy (fetched from > https://github.com/git/git) as c49927fca0 (Merge branch 'tb/unexpected' > into next, 2019-04-25). > > I looked for the commits themselves with: > > $ git log --author=Taylor > > on 'next', but only found the first

Re: What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-04-25 Thread Taylor Blau
On Fri, Apr 26, 2019 at 02:41:38PM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > On Thu, Apr 25, 2019 at 07:15:06PM +0900, Junio C Hamano wrote: > >> * tb/unexpected (2019-04-10) 7 commits > >> (merged to 'next' on 2019-04-25 at c49927fca0) > >> + rev-list: detect broken root trees >

Re: What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-04-25 Thread Junio C Hamano
Taylor Blau writes: > On Thu, Apr 25, 2019 at 07:15:06PM +0900, Junio C Hamano wrote: >> * tb/unexpected (2019-04-10) 7 commits >> (merged to 'next' on 2019-04-25 at c49927fca0) >> + rev-list: detect broken root trees >> + rev-list: let traversal die when --missing is not in use >> + get_com

Re: What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-04-25 Thread Taylor Blau
Hi Junio, On Thu, Apr 25, 2019 at 07:15:06PM +0900, Junio C Hamano wrote: > * tb/unexpected (2019-04-10) 7 commits > (merged to 'next' on 2019-04-25 at c49927fca0) > + rev-list: detect broken root trees > + rev-list: let traversal die when --missing is not in use > + get_commit_tree(): return

Re: [PATCH 3/3] checkout: allow -b/-B to work on a merge base

2019-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Denton Liu writes: > >> -new_branch_info->name = arg; >> +new_branch_info->name = strstr(arg, "...") ? >> +xstrdup(oid_to_hex(rev)) : >> +arg; > > Can we do better? > > I am not sure why we want to hardcode the knowledge of "..." syntax >

Re: [GSoC][PATCH v5 3/7] dir-iterator: add flags parameter to dir_iterator_begin

2019-04-25 Thread Matheus Tavares Bernardino
On Wed, Apr 24, 2019 at 3:36 PM Thomas Gummerer wrote: > > On 04/23, Matheus Tavares Bernardino wrote: > > On Thu, Apr 11, 2019 at 6:09 PM Thomas Gummerer > > wrote: > > > > > > On 04/10, Matheus Tavares Bernardino wrote: > > > > > > diff --git a/dir-iterator.h b/dir-iterator.h > > > > > > index

Re: [PATCH 3/3] checkout: allow -b/-B to work on a merge base

2019-04-25 Thread Junio C Hamano
Denton Liu writes: > - new_branch_info->name = arg; > + new_branch_info->name = strstr(arg, "...") ? > + xstrdup(oid_to_hex(rev)) : > + arg; Can we do better? I am not sure why we want to hardcode the knowledge of "..." syntax like this here. "git checkout A...B

Re: [PATCH 1/3] t2018: cleanup in current test

2019-04-25 Thread Junio C Hamano
Eric Sunshine writes: >> test_expect_success 'checkout -b to a new branch, set to HEAD' ' >> + test_when_finished test_might_fail git branch -D branch2 && >> + test_when_finished git checkout branch1 && > > I'm aware that when-finished actions fire in reverse order but the > inherent

Re: [PATCH] trace2: fix incorrect function pointer check

2019-04-25 Thread Junio C Hamano
Derrick Stolee writes: > On 4/25/2019 1:08 PM, Josh Steadmon wrote: >> Fix trace2_data_json_fl() to check for the presence of pfn_data_json_fl >> in its targets, rather than pfn_data_fl, which is not actually called. > > [snip] > >> for_each_wanted_builtin (j, tgt_j) >> -if (tgt_

Re: [PATCH 1/5] t9350: fix encoding test to actually test reencoding

2019-04-25 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Apr 25, 2019 at 11:51 AM Elijah Newren wrote: >> This test used an author with non-ascii characters in the name, but >> no special commit message. It then grep'ed for those non-ascii >> characters, but those are guaranteed to exist regardless of the >> reencoding

Re: [PATCH v2 0/5] Create commit-graph file format v2

2019-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Wed, Apr 24 2019, Derrick Stolee via GitGitGadget wrote: > >> NOTE: this series was rebased onto ab/commit-graph-fixes, as the conflicts >> were significant and subtle. > > Sorry, hopefully it helped more than it harmed :) > > A few unrelated things: Thanks a

Re: [PATCH v2 3/5] commit-graph: create new version flags

2019-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > It doesn't make sense to start saying "version A" here when we make it > to version 10, however unlikely that is :) ;-)

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > I'm confused. Isn't that bog-standard Git usage, not a custom hack? Depends on the definition of "hack". The only native provision at the config API level that lets the calling programs realize the "desired behaviour" you listed below without doing anything special is

Re: [PATCH 1/3] t2018: cleanup in current test

2019-04-25 Thread Denton Liu
On Thu, Apr 25, 2019 at 06:34:07PM -0400, Eric Sunshine wrote: > On Thu, Apr 25, 2019 at 5:10 PM Denton Liu wrote: > > Before, in t2018, if do_checkout failed to create `branch2`, the next > > test-case would run `git branch -D branch2` but then fail because it was > > expecting `branch2` to exist

Re: [PATCH 1/3] t2018: cleanup in current test

2019-04-25 Thread Eric Sunshine
On Thu, Apr 25, 2019 at 5:10 PM Denton Liu wrote: > Before, in t2018, if do_checkout failed to create `branch2`, the next > test-case would run `git branch -D branch2` but then fail because it was > expecting `branch2` to exist, even though it doesn't. As a result, an > early failure could cause a

js/partial-clone-connectivity-check (was: What's cooking in git.git (Apr 2019, #05; Thu, 25))

2019-04-25 Thread Josh Steadmon
On 2019.04.25 19:15, Junio C Hamano wrote: > * js/partial-clone-connectivity-check (2019-04-21) 1 commit > (merged to 'next' on 2019-04-25 at ebd8b4bffd) > + clone: do faster object check for partial clones > > During an initial "git clone --depth=..." partial clone, it is > pointless to spen

Re: [PATCH v2 0/5] Create commit-graph file format v2

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 24 2019, Derrick Stolee via GitGitGadget wrote: > NOTE: this series was rebased onto ab/commit-graph-fixes, as the conflicts > were significant and subtle. Sorry, hopefully it helped more than it harmed :) A few unrelated things: 1) First, before that series of mine applying this

Re: [PATCH v2 3/5] commit-graph: create new version flags

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 24 2019, Derrick Stolee via GitGitGadget wrote: > - hash_version = *(unsigned char*)(data + 5); > - if (hash_version != oid_version()) { > - error(_("commit-graph hash version %X does not match version > %X"), > - hash_version, oid_version()); >

[PATCH 0/3] checkout: allow -b/-B to work on a merge base

2019-04-25 Thread Denton Liu
I noticed earlier that running $ git checkout -b test master... would result in the following failure message: fatal: Not a valid object name: 'master...'. I believe that this is a bug, so this patchset will allow this to succeed. Denton Liu (3): t2018: cleanup in current tes

[PATCH 1/3] t2018: cleanup in current test

2019-04-25 Thread Denton Liu
Before, in t2018, if do_checkout failed to create `branch2`, the next test-case would run `git branch -D branch2` but then fail because it was expecting `branch2` to exist, even though it doesn't. As a result, an early failure could cause a cascading failure of tests. Make test-case responsible fo

[PATCH 2/3] t2018: demonstrate checkout -b merge base bug

2019-04-25 Thread Denton Liu
In git-checkout.txt, it states As a special case, you may use `"A...B"` as a shortcut for the merge base of `A` and `B` if there is exactly one merge base. You can leave out at most one of `A` and `B`, in which case it defaults to `HEAD`. However, there exists a bug where

[PATCH 3/3] checkout: allow -b/-B to work on a merge base

2019-04-25 Thread Denton Liu
When we ran something like $ git checkout -b test master... it would fail with the message fatal: Not a valid object name: 'master...'. This was caused by the call to `create_branch` where `start_name` is expected to be a valid rev. However, git-checkout allows the branch to not be a va

Re: [PATCH 1/5] run-command: add preliminary support for multiple hooks

2019-04-25 Thread Johannes Sixt
Am 25.04.19 um 02:55 schrieb Junio C Hamano: > Johannes Sixt writes: > >> Furthermore, basing a decision on whether a file is executable won't >> work on Windows as intended. So, it is better to aim for an existence check. > > That is a good point. > > So it may be OK for "do we have a single h

Re: [PATCH 2/5] fast-import: support 'encoding' commit header

2019-04-25 Thread Eric Sunshine
On Thu, Apr 25, 2019 at 11:51 AM Elijah Newren wrote: > Since git supports commit messages with an encoding other than utf-8, > allow fast-import to import such commits. This may be useful for folks > who do not want to reencode commit messages from an external system, and > may also be useful to

Re: [PATCH v4 2/4] *.[ch]: remove extern from function declarations using sed

2019-04-25 Thread Denton Liu
On Wed, Apr 24, 2019 at 01:56:33PM +0900, Junio C Hamano wrote: > Denton Liu writes: > > > There has been a push to remove extern from function declarations. > > Finish the job by removing all instances of "extern" for function > > declarations in headers using sed. > > > > This was done by runni

Re: [PATCH] trace2: fix incorrect function pointer check

2019-04-25 Thread Derrick Stolee
On 4/25/2019 1:08 PM, Josh Steadmon wrote: > Fix trace2_data_json_fl() to check for the presence of pfn_data_json_fl > in its targets, rather than pfn_data_fl, which is not actually called. [snip] > for_each_wanted_builtin (j, tgt_j) > - if (tgt_j->pfn_data_fl) > + i

Re: [PATCH v3 0/4] remove extern from function declarations

2019-04-25 Thread Denton Liu
On Thu, Apr 25, 2019 at 02:07:58PM +0200, SZEDER Gábor wrote: > On Mon, Apr 22, 2019 at 05:49:01PM -0400, Jeff King wrote: > > On Wed, Apr 17, 2019 at 12:58:31AM -0700, Denton Liu wrote: > > > > compat/mingw.c| 2 +- > > > compat/mingw.h| 6 +- > > > c

Re: [PATCH 1/5] t9350: fix encoding test to actually test reencoding

2019-04-25 Thread Eric Sunshine
On Thu, Apr 25, 2019 at 11:51 AM Elijah Newren wrote: > This test used an author with non-ascii characters in the name, but > no special commit message. It then grep'ed for those non-ascii > characters, but those are guaranteed to exist regardless of the > reencoding process since the reencoding

Re: [PATCH v1 02/12] rebase: don't translate trace strings

2019-04-25 Thread Phillip Wood
On 19/04/2019 06:53, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> commit b3a5d5a80c ("trace2:data: add subverb for rebase", 2019-02-22) >> mistakenly marked the subverb names for translation and unnecessarily >> NULL terminated the array. >> >> Signed-off-by: Philli

hello dear

2019-04-25 Thread Aisha Gadafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for, investme

hello dear

2019-04-25 Thread Aisha Gadafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for, investme

hello dear

2019-04-25 Thread Aisha Gadafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for, investme

Git Test Coverage Report (April 25)

2019-04-25 Thread Derrick Stolee
Here is today's test coverage report. You can view it in HTML [1] or in plain-text [2]. Thanks, -Stolee [1] https://derrickstolee.github.io/git-test-coverage/reports/2019-04-25.htm [2] https://derrickstolee.github.io/git-test-coverage/reports/2019-04-25.txt --- pu 762cccf710b8bb10da04b42e3

[PATCH] trace2: fix incorrect function pointer check

2019-04-25 Thread Josh Steadmon
Fix trace2_data_json_fl() to check for the presence of pfn_data_json_fl in its targets, rather than pfn_data_fl, which is not actually called. Signed-off-by: Josh Steadmon --- trace2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace2.c b/trace2.c index 8bbad56887..a73cf

Re: [PATCH] Documentation/merge-options: clarify --squash behavior

2019-04-25 Thread Vishal Verma
On Thu, 2019-04-25 at 13:16 +0900, Junio C Hamano wrote: > > I think it is bad to silently ignore the option. With or without > this documentation update, I think it is sensible to update the code > so that it errors out when "--squash --commit" are both given at the > same time, just like when

Re: [PATCH 0/5] Fix and extend encoding handling in fast export/import

2019-04-25 Thread Elijah Newren
On Thu, Apr 25, 2019 at 9:55 AM Elijah Newren wrote: > > On Thu, Apr 25, 2019 at 9:51 AM Elijah Newren wrote: > > > > While stress testing `git filter-repo`, I noticed an issue with > > encoding; further digging led to the fixes and features in this series. > > See the individual commit messages

Re: [PATCH 0/5] Fix and extend encoding handling in fast export/import

2019-04-25 Thread Elijah Newren
On Thu, Apr 25, 2019 at 9:51 AM Elijah Newren wrote: > > While stress testing `git filter-repo`, I noticed an issue with > encoding; further digging led to the fixes and features in this series. > See the individual commit messages for details. Whoops, forgot to cc Brian; I'm curious if my unders

[PATCH 0/5] Fix and extend encoding handling in fast export/import

2019-04-25 Thread Elijah Newren
While stress testing `git filter-repo`, I noticed an issue with encoding; further digging led to the fixes and features in this series. See the individual commit messages for details. Elijah Newren (5): t9350: fix encoding test to actually test reencoding fast-import: support 'encoding' commit

[PATCH 5/5] fast-export: do automatic reencoding of commit messages only if requested

2019-04-25 Thread Elijah Newren
Automatic re-encoding of commit messages (and dropping of the encoding header) hurts attempts to do reversible history rewrites (e.g. sha1sum <-> sha256sum transitions, some subtree rewrites), and seems inconsistent with the general principle followed elsewhere in fast-export of requiring explicit

[PATCH 1/5] t9350: fix encoding test to actually test reencoding

2019-04-25 Thread Elijah Newren
This test used an author with non-ascii characters in the name, but no special commit message. It then grep'ed for those non-ascii characters, but those are guaranteed to exist regardless of the reencoding process since the reencoding only affects the commit message, not the author or committer na

[PATCH 2/5] fast-import: support 'encoding' commit header

2019-04-25 Thread Elijah Newren
Since git supports commit messages with an encoding other than utf-8, allow fast-import to import such commits. This may be useful for folks who do not want to reencode commit messages from an external system, and may also be useful to achieve reversible history rewrites (e.g. sha1sum <-> sha256su

[PATCH 4/5] fast-export: differentiate between explicitly utf-8 and implicitly utf-8

2019-04-25 Thread Elijah Newren
The find_encoding() function returned the encoding used by a commit message, returning a default of git_commit_encoding (usually utf-8). Although the current code does not differentiate between a commit which explicitly requested utf-8 and one where we just assume utf-8 because no encoding is set,

[PATCH 3/5] fast-export: avoid stripping encoding header if we cannot reencode

2019-04-25 Thread Elijah Newren
When fast-export encounters a commit with an 'encoding' header, it tries to reencode in utf-8 and then drops the encoding header. However, if it fails to reencode in utf-8 because e.g. one of the characters in the commit message was invalid in the old encoding, then we need to retain the original

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Barret Rhoden wrote: > Hi - > > On 4/25/19 10:36 AM, Jonathan Nieder wrote: >> Hi, >> >> Ævar Arnfjörð Bjarmason wrote: >> >>> Because we don't have some general config facility for this it keeps >>> coming up, and various existing/proposed options have their own little >>>

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Jonathan Nieder wrote: > Ævar Arnfjörð Bjarmason wrote: > >> Because we don't have some general config facility for this it keeps >> coming up, and various existing/proposed options have their own little >> custom hacks for doing it, e.g. this for Barret Rhoden's proposed "b

Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-04-25 Thread git
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

Re: [PATCH 3/5] sequencer: add support for multiple hooks

2019-04-25 Thread Phillip Wood
On 24/04/2019 23:46, brian m. carlson wrote: On Wed, Apr 24, 2019 at 10:51:56AM +0100, Phillip Wood wrote: On 24/04/2019 01:49, brian m. carlson wrote: Add support for multiple post-rewrite hooks, both for "git commit --amend" and "git rebase". Additionally add support for multiple prepare-com

[PATCH v2] Honor core.precomposeUnicode in more places

2019-04-25 Thread Elijah Newren
On Mac's HFS where git sets core.precomposeUnicode to true automatically by git init/clone, when a user creates a simple unicode refname (in NFC format) such as españa: $ git branch españa different commands would display the branch name differently. For example, git branch, git log --decorate

Re: What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-04-25 Thread Elijah Newren
On Thu, Apr 25, 2019 at 7:16 AM Junio C Hamano wrote > * en/unicode-in-refnames (2019-04-24) 1 commit > - Honor core.precomposeUnicode in more places > > The names of the refs stored as filesystem entities may become > different from what the end-user expects, just like files in the > working

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Barret Rhoden
Hi - On 4/25/19 10:36 AM, Jonathan Nieder wrote: Hi, Ævar Arnfjörð Bjarmason wrote: Because we don't have some general config facility for this it keeps coming up, and various existing/proposed options have their own little custom hacks for doing it, e.g. this for Barret Rhoden's proposed "bl

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Jonathan Nieder
Hi, Ævar Arnfjörð Bjarmason wrote: > Because we don't have some general config facility for this it keeps > coming up, and various existing/proposed options have their own little > custom hacks for doing it, e.g. this for Barret Rhoden's proposed "blame > skip commits" feature > https://public-in

Request to add option to interactive rebase to preserve latest commit date

2019-04-25 Thread Jeff Schwartz
Using interactive rebase has one flaw IMHO and that is the way it handles dating its commit. Can you add an option to interactive rebase that would make it use the date from the commit that is most recent and not the date from the commit that is the oldest? - *Jeff*

Hallo

2019-04-25 Thread xuatnv_skhcn
Get back for more infor

Re: [PATCH 2/2] diffcore-pickaxe: add --pickaxe-raw-diff for use with -G

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> I agree. I am a bit bothered by the fact that >>> `git log --oneline -Ux -G --pickaxe-raw-diff` outputs the >>> contents/patch of a commit. My expectation is that we have the >>> `log -p` knob for that? >> >> Thi

Re: [PATCH 2/2] diffcore-pickaxe: add --pickaxe-raw-diff for use with -G

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Eugeniu Rosca wrote: > On Thu, Apr 25, 2019 at 01:24:56AM +0200, Ævar Arnfjörð Bjarmason wrote: >> >> On Thu, Apr 25 2019, Eugeniu Rosca wrote: >> >> > Hi Ævar, >> > >> > Thanks for the amazingly fast reply and for the useful feature (yay!). >> > >> > On Wed, Apr 24, 2019 at

Re: [PATCH v3 0/4] remove extern from function declarations

2019-04-25 Thread SZEDER Gábor
On Mon, Apr 22, 2019 at 05:49:01PM -0400, Jeff King wrote: > On Wed, Apr 17, 2019 at 12:58:31AM -0700, Denton Liu wrote: > > compat/mingw.c| 2 +- > > compat/mingw.h| 6 +- > > compat/nedmalloc/malloc.c.h | 6 +- > > compat/obstack.h

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Duy Nguyen wrote: > On Thu, Apr 25, 2019 at 5:08 PM Ævar Arnfjörð Bjarmason > wrote: >> >> Solving (1) without (2) feels like a bit of a missed opportunity to >> >> me. Ideally, what I would like is >> >> >> >>i. A central registry of trustworthy Git hooks that can be

Re: [PATCH v2 3/5] commit-graph: create new version flags

2019-04-25 Thread Derrick Stolee
On 4/25/2019 1:29 AM, Junio C Hamano wrote: > "Derrick Stolee via GitGitGadget" writes: > >> +int version = 0; >> ... >> +if (flags & COMMIT_GRAPH_VERSION_1) >> +version = 1; >> +if (!version) >> +version = 1; >> +if (version != 1) { >> +error(_

Re: [PATCH v5 00/11] Create 'expire' and 'repack' verbs for git-multi-pack-index

2019-04-25 Thread Derrick Stolee
On 4/25/2019 1:38 AM, Junio C Hamano wrote: > Derrick Stolee writes: > >> Updates in V5: >> >> * Fixed the error in PATCH 7 due to a missing line that existed in PATCH 8. >> Thanks, Josh Steadmon! >> >> * The 'repack' subcommand now computes the "expected size" of a pack instead >> of >> rely

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 5:08 PM Ævar Arnfjörð Bjarmason wrote: > >> Solving (1) without (2) feels like a bit of a missed opportunity to > >> me. Ideally, what I would like is > >> > >>i. A central registry of trustworthy Git hooks that can be upgraded > >> using the system package manag

Re: [PATCH v6 23/27] switch: reject if some operation is in progress

2019-04-25 Thread Phillip Wood
On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > Unless you know what you're doing, switching to another branch to do > something then switching back could be confusing. Worse, you may even > forget that you're in the middle of something. By the time you realize, > you may have done a ton of work

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-04-25 Thread Phillip Wood
Hi Elijah Sorry it's taken me so long to reply to this - I'm not sure where the last few weeks have gone. On 29/03/2019 15:35, Elijah Newren wrote: > Hi Phillip, > > On Fri, Mar 29, 2019 at 4:04 AM Phillip Wood > wrote: >> On 28/03/2019 17:39, Elijah Newren wrote: >>> On Thu, Mar 28, 2019 at 9

What's cooking in git.git (Apr 2019, #05; Thu, 25)

2019-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: [PATCH v6 15/27] switch: add --discard-changes

2019-04-25 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 5:02 PM Phillip Wood wrote: > > On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > > --discard-changes is a better name than --force for this option since > > it's what really happens. > > I didn't realize when I suggested the name that --force overwrites > untracked files

How to undo previously set configuration? (again)

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, brian m. carlson wrote: > On Tue, Apr 23, 2019 at 07:34:38PM -0700, Jonathan Nieder wrote: >> Hi, >> >> brian m. carlson wrote: >> >> > I've talked with some people about this approach, and they've indicated >> > they would prefer a configuration-based approach. >> >> I woul

Re: [PATCH 1/5] run-command: add preliminary support for multiple hooks

2019-04-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > To me this is another point in favor of bypassing this problem entirely > and adopting the semantics GitLab (and it seems others) use. I.e. in > order execute: > > .git/hooks/pre-receive .git/hooks/pre-receive.d/* But isn't that exactly what Brian wanted to

Re: [PATCH v6 15/27] switch: add --discard-changes

2019-04-25 Thread Phillip Wood
On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > --discard-changes is a better name than --force for this option since > it's what really happens. I didn't realize when I suggested the name that --force overwrites untracked files as well as discarding changes from tracked files. I think we shoul

[PATCH v4 2/6] t7610: add mergetool --gui tests

2019-04-25 Thread Denton Liu
In 063f2bdbf7 (mergetool: accept -g/--[no-]gui as arguments, 2018-10-24), mergetool was taught the --gui option but no tests were added to ensure that it was working properly. Add a test to ensure that it works. Signed-off-by: Denton Liu --- t/t7610-mergetool.sh | 22 ++ 1 fi

[PATCH v4 5/6] difftool: make --gui, --tool and --extcmd mutually exclusive

2019-04-25 Thread Denton Liu
In git-difftool, these options specify which tool to ultimately run. As a result, they are logically conflicting. Explicitly disallow these options from being used together. Signed-off-by: Denton Liu --- builtin/difftool.c | 3 +++ t/t7800-difftool.sh | 8 2 files changed, 11 insertion

[PATCH v4 0/6] difftool and mergetool improvements

2019-04-25 Thread Denton Liu
Thanks for another review, Junio. This should basically be the same as v3 except I've moved the IFS assignment into a subshell so its value does not leak out. I'd like the change in 4/6 to be reviewed carefully. t7610 and t7800 run properly with dash on My Machineة, but I couldn't find a referenc

[PATCH v4 4/6] mergetool: fallback to tool when guitool unavailable

2019-04-25 Thread Denton Liu
In git-difftool, if the tool is called with --gui but `diff.guitool` is not set, it falls back to `diff.tool`. Make git-mergetool also fallback from `merge.guitool` to `merge.tool` if the former is undefined. If git-difftool, when called with `--gui`, were to use `get_configured_mergetool` in a fu

[PATCH v4 3/6] mergetool: use get_merge_tool function

2019-04-25 Thread Denton Liu
In git-mergetool, the logic for getting which merge tool to use is duplicated in git-mergetool--lib, except for the fact that it needs to know whether the tool was guessed or not. Rewrite `get_merge_tool` to return whether or not the tool was guessed through the return code and make git-mergetool

[PATCH v4 1/6] t7610: unsuppress output

2019-04-25 Thread Denton Liu
The output for commands used to be suppressed by redirecting both stdout and stderr to /dev/null. However, this should not happen since the output is useful for debugging and, without the "-v" flag, test scripts don't output anyway. Unsuppress the output by removing the redirections to /dev/null.

[PATCH v4 6/6] difftool: fallback on merge.guitool

2019-04-25 Thread Denton Liu
In git-difftool.txt, it says 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. However, when `diff.guitool` is missing, it doesn't fallback to anything. Make git-difftool fallback to `merge.guitool` when `diff.guitoo

[PATCH v3 15/16] help: move git-diff and git-reset to different groups

2019-04-25 Thread Nguyễn Thái Ngọc Duy
The third column in command-list.txt determines what group a common command is printed in 'git help'. "git reset" is currently in the "work on the current change (see also: git help everyday)" group. While it's true that "git reset" can manipulate the index and can be in this group, its unique fun

[PATCH v3 14/16] doc: promote "git restore"

2019-04-25 Thread Nguyễn Thái Ngọc Duy
The new command "git restore" (together with "git switch") are added to avoid the confusion of one-command-do-all "git checkout" for new users. They are also helpful to avoid ambiguous context. For these reasons, promote it everywhere possible. This includes documentation, suggestions/advice from

[PATCH v3 16/16] Declare both git-switch and git-restore experimental

2019-04-25 Thread Nguyễn Thái Ngọc Duy
These two commands are basically redesigned git-checkout. We will not have that many opportunities to redo (because we run out of verbs, and that would also increase maintenance cost). To play it safe, let's declare the two commands experimental in one or two releases. If there is a serious flaw i

[PATCH v3 11/16] t: add tests for restore

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/lib-patch-mode.sh | 12 t/t2070-restore.sh (new +x) | 99 +++ t/t2071-restore-patch.sh (new +x) | 110 ++ 3 files changed, 221 insertions(+) diff --git a/t/lib-patch-mode.sh b

[PATCH v3 09/16] restore: replace --force with --ignore-unmerged

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Use a more specific option name to express its purpose. --force may come back as an alias of --ignore-unmerged and possibly more. But since this is a destructive operation, I don't see why we need to "force" anything more. We already don't hold back. When 'checkout --force' or 'restore --ignore-un

[PATCH v3 07/16] restore: reject invalid combinations with --staged

2019-04-25 Thread Nguyễn Thái Ngọc Duy
git-checkout rejects plenty of invalid option combinations. Since git-checkout is equivalent of either git restore --source --staged --worktree or git restore --worktree that still leaves the new mode 'git restore --index' unprotected. Reject some more invalid option combinations. The

[PATCH v3 08/16] restore: default to --source=HEAD when only --staged is specified

2019-04-25 Thread Nguyễn Thái Ngọc Duy
"git restore --staged" without --source does not make much sense since by default we restore from the index. Instead of copying the index to itself, set the default source to HEAD in this case, yielding behavior that matches "git reset -- ". Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/check

[PATCH v3 05/16] checkout: factor out worktree checkout code

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 108 + 1 file changed, 59 insertions(+), 49 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 9c5abe170e..1753c8c5ed 100644 --- a/builtin/checkout.c +++ b/builtin/checko

[PATCH v3 13/16] user-manual.txt: prefer 'merge --abort' over 'reset --hard'

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Since the operation in progress is merge, stick to the 'git merge' variant of aborting. 'git reset --hard' does not really tell you about aborting the merge by just looking, longer to type, and even though I know by heart what --hard do, I still dislike it when I need to consider whether --hard, --

[PATCH v3 06/16] restore: add --worktree and --staged

2019-04-25 Thread Nguyễn Thái Ngọc Duy
'git checkout ' updates both index and worktree. But updating the index when you want to restore worktree files is non-intuitive. The index contains the data ready for the next commit, and there's no indication that the user will want to commit the restored versions. 'git restore' therefore by de

[PATCH v3 10/16] restore: support --patch

2019-04-25 Thread Nguyễn Thái Ngọc Duy
git-restore is different from git-checkout that it only restores the worktree by default, not both worktree and index. add--interactive needs some update to support this mode. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c| 6 +++-- git-add--interactive.perl | 52 +++

[PATCH v3 12/16] completion: support restore

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Completion for restore is straightforward. We could still do better though by giving the list of just tracked files instead of all present ones. But let's leave it for later. Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 15 +++ 1 file changed, 15 i

[PATCH v3 02/16] restore: take tree-ish from --source option instead

2019-04-25 Thread Nguyễn Thái Ngọc Duy
This is another departure from 'git checkout' syntax, which uses -- to separate ref and pathspec. The observation is restore (or "git checkout -- ") is most often used to restore some files from the index. If this is correct, we can simplify it by taking away the ref, so that we can write git

[PATCH v3 04/16] restore: disable overlay mode by default

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Overlay mode is considered confusing when the command is about restoring files on worktree. Disable it by default. The user can still turn it on, or use 'git checkout' which still has overlay mode on by default. While at it, make the check in checkout_branch() stricter. Neither --overlay or --no-o

[PATCH v3 03/16] restore: make pathspec mandatory

2019-04-25 Thread Nguyễn Thái Ngọc Duy
"git restore" without arguments does not make much sense when it's about restoring files (what files now?). We could default to either git restore . or git restore :/ Neither is intuitive. Make the user always give pathspec, force the user to think the scope of restore they want because

[PATCH v3 00/16] Add new command 'restore'

2019-04-25 Thread Nguyễn Thái Ngọc Duy
v3 changes are really small - gitcli.txt is updated to mention the --staged/--worktree pair, in comparison to --cached/--index which is also mention there. - The patch 'rm --staged' is dropped. It could come back. But if it does, it should be in a series where commands that take --cached/--

[PATCH v3 01/16] checkout: split part of it to new command 'restore'

2019-04-25 Thread Nguyễn Thái Ngọc Duy
Previously the switching branch business of 'git checkout' becomes a new command 'switch'. This adds the restore command for the checking out paths path. Similar to git-switch, a new man page is added to describe what the command will become. The implementation will be updated shortly to match the

Re: [PATCH 1/5] run-command: add preliminary support for multiple hooks

2019-04-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 25 2019, Junio C Hamano wrote: > Johannes Sixt writes: > >> Furthermore, basing a decision on whether a file is executable won't >> work on Windows as intended. So, it is better to aim for an existence check. > > That is a good point. > > So it may be OK for "do we have a single hoo

Re: [PATCH v3] repack: enable bitmaps by default on bare repos

2019-04-25 Thread Junio C Hamano
Jeff King writes: > On Tue, Apr 09, 2019 at 05:10:43PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> I've found a case where turning bitmaps on does horrible things for >> bitmap "push" performance. >> [...] >> I can't share the repo, but I had a report where just a "git push" of a >> topic branch t

[PATCH v3] git-compat-util: work around for access(X_OK) under root

2019-04-25 Thread CHIGOT, CLEMENT
On AIX, access(X_OK) may succeed when run as root even if the execution isn't possible. This behavior is allowed by POSIX which says: ... for a process with appropriate privileges, an implementation may indicate success for X_OK even if execute permission is not granted to any user. It can