[PATCH v2 2/7] add--helper: create builtin helper for interactive add

2019-01-17 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Create a builtin helper for git-add--interactive, which right now is not able to do anything. This is the first step in an effort to convert git-add--interactive.perl to a C builtin, in search for better portability, expressibility and performance (specially on non-POSIX sy

[PATCH v2 0/7] Turn git add-i into built-in

2019-01-17 Thread Slavica Đukić via GitGitGadget
This is the first version of a patch series to start porting git-add--interactive from Perl to C. Daniel Ferreira's patch series used as a head start: https://public-inbox.org/git/1494907234-28903-1-git-send-email-bnm...@gmail.com/t/#u Changes since v1: * rename show_help() to add_i_show_help()

[PATCH v2 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. Signed-off-by: Slavica Djukic --- git-add--interactive.perl | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/git-add--interactive.perl b/git-a

[PATCH v2 3/7] add-interactive.c: implement status command

2019-01-17 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Add new files: add-interactive.c and add-interactive.h, which will be used for implementing "application logic" of git add -i, whereas add--helper.c will be used mostly for parsing the command line. We're a bit lax with the command-line parsing, as the command is intended to

[PATCH v2 5/7] add-interactive.c: implement show-help command

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH v2 6/7] t3701-add-interactive: test add_i_show_help()

2019-01-17 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Add test to t3701-add-interactive to verify that add_i_show_help() outputs expected content. Also, add it before changing git-add--interactive.perl's help_cmd to demonstrate that there are no changes introduced by the conversion to C. Prefix git add -i call with GIT_PAGER_IN_

[PATCH v2 1/7] diff: export diffstat interface

2019-01-17 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Make the diffstat interface (namely, the diffstat_t struct and compute_diffstat) no longer be internal to diff.c and allow it to be used by other parts of git. This is helpful for code that may want to easily extract information from files using the diff machinery, while fl

[PATCH v2 4/7] add--interactive.perl: use add--helper --status for status_cmd

2019-01-17 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Call the newly introduced add--helper builtin on status_cmd() instead of relying on add--interactive's Perl functions to build print the numstat. Signed-off-by: Daniel Ferreira Signed-off-by: Slavica Djukic --- git-add--interactive.perl | 4 +--- 1 file changed, 1 insert

Calculate packfile and idxfile checksums

2019-01-17 Thread Farhan Khan
Hi all, I am trying to understand how git's index-pack works, particularly how it calculates the packfile checksum and idxfile checksum. I traced back the packfile checksum in the source to the value char *sha1 that is utilized in write_idx_file() in pack_file.c:45. However, I cannot determine whe

Re: [PATCH] commit-tree: add missing --gpg-sign flag

2019-01-17 Thread Martin Ågren
Hi Brandon, On Fri, 18 Jan 2019 at 02:12, Brandon Richardson wrote: > > Add --gpg-sign option in commit-tree, which was documented, but not > implemented, in 55ca3f99ae. > > Signed-off-by: Brandon Richardson > --- Thank you for an updated version! > builtin/commit-tree.c| 8 +++- > t/

[PATCH v2 4/5] Add `human` format to test-tool

2019-01-17 Thread Stephen P. Smith
Add the human format support to the test tool so that TEST_DATE_NOW can be used to specify the current time. A static variable is used for passing the tool specified value to get_date. The get_date helper function eliminates the need to refactor up the show_date and show_date normal functions to

[PATCH v2 3/5] Add 'human' date format documentation

2019-01-17 Thread Stephen P. Smith
Display date and time information in a format similar to how people write dates in other contexts. If the year isn't specified then, the reader infers the date is given is in the current year. By not displaying the redundant information, the reader concentrates on the information that is different

[PATCH v2 0/5] Re-roll of 'human' date format patch set

2019-01-17 Thread Stephen P. Smith
Reworked documentation and tests for the previously submitted patch set. Linus Torvalds (1): Add 'human' date format Stephen P. Smith (4): Remove the proposed use of auto as secondary way to specify human Add 'human' date format documentation Add `human` format to test-tool Add `human

[PATCH v2 5/5] Add `human` date format tests.

2019-01-17 Thread Stephen P. Smith
When using `human` several fields are suppressed depending on the time difference between the reference date and the local computer date. In cases where the difference is less than a year, the year field is supppressed. If the time is less than a day; the month and year is suppressed. Use TEST_DAT

[PATCH v2 2/5] Remove the proposed use of auto as secondary way to specify human

2019-01-17 Thread Stephen P. Smith
In addition to adding the 'human' format, the patch added the auto keyword which could be used in the config file as an alternate way to specify the human format. Removing 'auto' cleans up the 'human' format interface. Instead add 'auto:human' date mode which defaults to human if we're using the

[PATCH v2 1/5] Add 'human' date format

2019-01-17 Thread Stephen P. Smith
From: Linus Torvalds This adds --date=human, which skips the timezone if it matches the current time-zone, and doesn't print the whole date if that matches (ie skip printing year for dates that are "this year", but also skip the whole date itself if it's in the last few days and we can just say w

Re: cat-file ambiguity prints "dangling"

2019-01-17 Thread David Turner
It appears that get_oid_with_context calls into get_short_oid for that case, and get_short_oid returns SHORT_NAME_AMBIGUOUS, which is -2. We treat that as DANGLING_SYMLINK, which also seems to have the value -2. So, it's an ambiguity in ambiguity resolution. Fix attached. On Fri, 2019-01-18 a

cat-file ambiguity prints "dangling"

2019-01-17 Thread Eric Wong
Hi David, Perhaps I'm confused, the cat-file manpage seems to indicate "dangling" only gets printed if I use "--follow-symlinks". However, I'm not using "--follow-symlinks" and I get "dangling" when passing ambiguous object IDs: Trying to check the ambiguous "dead" against git.git, I get:

Re: Are You Interested.,

2019-01-17 Thread adolf . buhl
:Do you need an loans to pay off bills or to start up a bussiness? If interested reply for more information: mrbrainja...@aol.com

[PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

2019-01-17 Thread Patrick Hogg
ac77d0c37 ("pack-objects: shrink size field in struct object_entry", 2018-04-14) added an extra usage of read_lock/read_unlock in the newly introduced oe_get_size_slow for thread safety in parallel calls to try_delta(). Unfortunately oe_get_size_slow is also used in serial code, some of which is ca

Re: [PATCH/RFC] fsck: complain when .gitignore and .gitattributes are symlinks

2019-01-17 Thread Ramsay Jones
On 17/01/2019 21:24, Jeff King wrote: > On Thu, Jan 17, 2019 at 12:13:12PM -0800, Junio C Hamano wrote: > >>> @@ -966,7 +968,9 @@ int verify_path(const char *path, unsigned mode) >>> if (is_hfs_dotgit(path)) >>> return 0; >>>

[PATCH] commit-tree: add missing --gpg-sign flag

2019-01-17 Thread Brandon Richardson
Add --gpg-sign option in commit-tree, which was documented, but not implemented, in 55ca3f99ae. Signed-off-by: Brandon Richardson --- Thanks Martin for the tips and suggestions! builtin/commit-tree.c| 8 +++- t/t7510-signed-commit.sh | 4 +++- 2 files changed, 10 insertions(+), 2 delet

Re: A seemingly wrong PR merge resolution.

2019-01-17 Thread Mark Kharitonov
Please, ignore - the developer used the Merge Conflict resolution plugin for VSTS to take the target of the merge, instead of the source. Please, accept my apologies for the noise. Le jeu. 17 janv. 2019 à 15:56, Mark Kharitonov a écrit : > > Hi, > > I have a very strange issue where a change has

Re: [PATCH 76/76] am: avoid diff_opt_parse()

2019-01-17 Thread Duy Nguyen
On Fri, Jan 18, 2019 at 3:10 AM Johannes Schindelin wrote: > > Hi Duy, > > the change itself looks good, but... > > On Thu, 17 Jan 2019, Nguyễn Thái Ngọc Duy wrote: > > > diff_opt_parse() is a heavy hammer to just set diff filter. But it's > > the only way because of the diff_status_letters[] mapp

[PATCH v2] ls-refs: filter refs using namespace-stripped name

2019-01-17 Thread Jonathan Tan
If a user fetches refs/heads/master from a repo with namespace "ns", the remote is expected to (1) not send the real refs/heads/master, and (2) send refs/namespaces/ns/refs/heads/master with the name refs/heads/master. (1) indeed happens now, but not (2) - Git only sends refs that have the user-giv

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-17 Thread Rob Herring
On Sun, Jan 13, 2019 at 3:26 PM Alban Gruin wrote: > > Hi Stephen, > > thank you for your patch. I left a few comments below. > > Le 11/01/2019 à 22:51, Stephen Boyd a écrit : > > The Linux kernel receives many patches to the devicetree files each > > release. The hunk header for those patches ty

Re: [PATCH] ls-refs: filter refs based on non-namespace name

2019-01-17 Thread Junio C Hamano
Jonathan Tan writes: > Protocol v2 allows for filtering of ref advertisement based on a > client-given name prefix, but inclusion/exclusion is determined based on > the non-namespace-stripped version (e.g. matching a ref prefix of > "refs/heads" against "refs/namespaces/my-namespace/refs/heads/ma

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-17 Thread Alban Gruin
Hi, sorry for the late answer. Le 14/01/2019 à 19:34, Stephen Boyd a écrit : > Quoting Alban Gruin (2019-01-13 13:26:21) >> Hi Stephen, >> >> thank you for your patch. I left a few comments below. >> >> Le 11/01/2019 à 22:51, Stephen Boyd a écrit : >>> diff --git a/userdiff.c b/userdiff.c >>> ind

Re: [PATCH] userdiff: Add a builtin pattern for dts files

2019-01-17 Thread Alban Gruin
Hi Junio, Le 14/01/2019 à 19:34, Junio C Hamano a écrit : > Alban Gruin writes: > >> thank you for your patch. I left a few comments below. >> >> Le 11/01/2019 à 22:51, Stephen Boyd a écrit: >>> The Linux kernel receives many patches to the devicetree files each >>> release. The hunk header for

Re: [PATCH/RFC] fsck: complain when .gitignore and .gitattributes are symlinks

2019-01-17 Thread Jeff King
On Thu, Jan 17, 2019 at 12:13:12PM -0800, Junio C Hamano wrote: > > @@ -966,7 +968,9 @@ int verify_path(const char *path, unsigned mode) > > if (is_hfs_dotgit(path)) > > return 0; > > if (S_ISLNK(mode)) { >

Re: [WIP 0/8] Trying to revive GIT_TEST_PROTOCOL_VERSION

2019-01-17 Thread Junio C Hamano
Jonathan Tan writes: >> I'm happy to have you pick that up as you've done here, especially since >> you're actually working on v2 and I'm not, so you can more easily know >> what it conflicts with etc. I just wanted to have it in one way or >> another, i.e. be able to deploy v2 and assert that "n

Re: [PATCH v2 00/13] Offer to run CI/PR builds in Azure Pipelines

2019-01-17 Thread Junio C Hamano
Johannes Schindelin writes: > ... > See the updated series: > https://public-inbox.org/git/pull.31.v3.git.gitgitgad...@gmail.com/ Thanks. I see that you are already planning for v4, but I'll find time to take a look at what is posted sometime this week anyway.

git commits unstaged files

2019-01-17 Thread Khurshid, Beenish
Hi, I frequently use 'git add -p' to filter changes before committing. This usually works, but on many occasions, the use of add and commit results in unstaged chunks and files being committed. Steps to reproduce: 1. Create unstaged changes 2. Use add -p to add some of those changes 3. Use git

Re: [PATCH v2 1/1] t6042: work around speed optimization on Windows

2019-01-17 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > When Git determines whether a file has changed, it looks at the mtime, > at the file size, ... > Functionally, we do not change anything because we replace two `git mv > ` calls (where `` is completely overwritten an

A seemingly wrong PR merge resolution.

2019-01-17 Thread Mark Kharitonov
Hi, I have a very strange issue where a change has disappeared from the PR merge commit. I described it in great detail on SO here - https://stackoverflow.com/questions/54244042/incorrect-pr-merge-in-vsts-the-new-change-disappeared-after-the-merge (Sorry for the spaces, did not want it to be rej

Re: [PATCH v3 01/21] travis: fix skipping tagged releases

2019-01-17 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > When building a PR, TRAVIS_BRANCH refers to the *target branch*. > Therefore, if a PR targets `master`, and `master` happened to be tagged, > we skipped the build by mistake. Good spotting. > > Fix this by using TRA

[PATCH v2 3/3] blame: add a config option to mark ignored lines

2019-01-17 Thread Barret Rhoden
When ignoring commits, the commit that is blamed might not be responsible for the change. Users might want to know when a particular line has a potentially inaccurate blame. By specifying blame.markIgnoredFiles, each blame line is marked with an '*'. For example: 278b6158d6fdb (Barret Rhoden 2

[PATCH v2 0/3] blame: add the ability to ignore commits

2019-01-17 Thread Barret Rhoden
Adds the ability to ignore a set of commits and their changes when blaming. This can be used to ignore a commit deemed 'not interesting,' such as reformatting. v1: https://public-inbox.org/git/20190107213013.231514-1-b...@google.com/ v1 -> v2 - extracted the skiplist from fsck to avoid duplicatin

[PATCH v2 1/3] Move init_skiplist() outside of fsck

2019-01-17 Thread Barret Rhoden
init_skiplist() took a file consisting of SHA-1s and comments and added the objects to an oidset. This functionality is useful for other commands. Signed-off-by: Barret Rhoden --- fsck.c | 37 + oidset.c | 35 +++ oidset.h |

[PATCH v2 2/3] blame: add the ability to ignore commits and their changes

2019-01-17 Thread Barret Rhoden
Commits that make formatting changes or function renames are often not interesting when blaming a file. A user may deem such a commit as 'not interesting' and want to ignore and its changes it when assigning blame. For example, say a file has the following git history / rev-list: ---O---A---X---

Re: [PATCH] Allow usage of --gpg-sign flag in commit-tree builtin.

2019-01-17 Thread Martin Ågren
Hi Brandon, Welcome to the list! :-) On Thu, 17 Jan 2019 at 20:30, Brandon Richardson wrote: > Subject: [PATCH] Allow usage of --gpg-sign flag in commit-tree builtin. Good find! Maybe "commit-tree: handle --gpg-sign" which looks more like what we see in `git log --oneline builtin/commit-tree.

[PATCH 1/2] mingw (t5580): document bug when cloning from backslashed UNC paths

2019-01-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Due to a quirk in Git's method to spawn git-upload-pack, there is a problem when passing paths with backslashes in them: Git will force the command-line through the shell, which has different quoting semantics in Git for Windows (being an MSYS2 program) than regular Win3

[PATCH 2/2] mingw: special-case arguments to `sh`

2019-01-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The MSYS2 runtime does its best to emulate the command-line wildcard expansion and de-quoting which would be performed by the calling Unix shell on Unix systems. Those Unix shell quoting rules differ from the quoting rules applying to Windows' cmd and Powershell, making

[PATCH 0/2] mingw: fix git clone \\server\share

2019-01-17 Thread Johannes Schindelin via GitGitGadget
Due to quirks in the MSYS2 runtime intended to help interpret a command-line as if it had been pre-processed by a shell, the backslashes would be misinterpreted as if they were escape characters. This showed most prominently when trying to clone from a network share, as the path would start with tw

Re: [PATCH/RFC] fsck: complain when .gitignore and .gitattributes are symlinks

2019-01-17 Thread Junio C Hamano
Jeff King writes: > Hmm. I think this commit message isn't quite right, because we also > skipped the patches to touch gitignore/gitattributes in verify_path(). > > Are you thinking we should resurrect that behavior[1], too, or just > protect at the fsck level? > >> It was omitted from that serie

Re: [PATCH 76/76] am: avoid diff_opt_parse()

2019-01-17 Thread Johannes Schindelin
Hi Duy, the change itself looks good, but... On Thu, 17 Jan 2019, Nguyễn Thái Ngọc Duy wrote: > diff_opt_parse() is a heavy hammer to just set diff filter. But it's > the only way because of the diff_status_letters[] mapping. Add a new > API to set diff filter and use it in git-am. diff_opt_pars

[PATCH] ls-refs: filter refs based on non-namespace name

2019-01-17 Thread Jonathan Tan
Protocol v2 allows for filtering of ref advertisement based on a client-given name prefix, but inclusion/exclusion is determined based on the non-namespace-stripped version (e.g. matching a ref prefix of "refs/heads" against "refs/namespaces/my-namespace/refs/heads/master") instead of the namespace

Re: [PATCH 00/76] Convert diff opt parser to parse_options()

2019-01-17 Thread Stefan Beller
On Thu, Jan 17, 2019 at 6:33 AM Ævar Arnfjörð Bjarmason wrote: > > I sent a sneak peek [1] last year and got two good comments. I take it > > people at least did not oppose to this. The most interesting parts are > > at the top and bottom. The middle is just boring conversion, usually > > one opt

Re: [PATCH 74/76] range-diff: use parse_options() instead of diff_opt_parse()

2019-01-17 Thread Stefan Beller
On Thu, Jan 17, 2019 at 5:12 AM Nguyễn Thái Ngọc Duy wrote: > > Diff's internal option parsing is now done with 'struct option', which > makes it possible to combine all diff options to range-diff and parse > everything all at once. Parsing code becomes simpler, Cool. I like the series up to here

Re: [PATCH v3 0/4] Sideband the whole fetch v2 response

2019-01-17 Thread Junio C Hamano
Jonathan Tan writes: > /* > + * Inspects a multiplexed packet read from the remote. If this packet is a > + * progress packet and thus should not be processed by the caller, returns 0. > + * Otherwise, returns 1, releases scratch, and sets sideband_type. > * > + * If this packet is SIDEBAND_PR

[PATCH] Allow usage of --gpg-sign flag in commit-tree builtin.

2019-01-17 Thread Brandon Richardson
Signed-off-by: Brandon Richardson --- Hi, This is my first contribution, so please bear with me. All feedback is appreciated. Ran into this issue while writing a signed commit object manually. Here are the steps I followed to replicate the issue: mkdir test && cd test git init echo 'test' > tes

Re: [PATCH] helper/test-ref-store: fix "new-sha1" vs "old-sha1" typo

2019-01-17 Thread Junio C Hamano
Christian Couder writes: > On Mon, Jan 7, 2019 at 1:53 PM Duy Nguyen wrote: >> >> On Sun, Jan 6, 2019 at 10:46 PM Christian Couder >> wrote: >> > >> > It looks like it is a copy-paste error made in 80f2a6097c >> > (t/helper: add test-ref-store to test ref-store functions, >> > 2017-03-26) to p

Re: [PATCH v3 0/2] support for filtering trees and blobs based on depth

2019-01-17 Thread Junio C Hamano
Matthew DeVore writes: > This seems like a easier problem to understand, but I'm not sure how > to avoid this issue in the future. Sorry---I was mostly venting and it was not productive. There isn't much individual contributors can do by themselves, other than choosing the right place to base t

Re: [WIP 0/8] Trying to revive GIT_TEST_PROTOCOL_VERSION

2019-01-17 Thread Jonathan Tan
> I'm happy to have you pick that up as you've done here, especially since > you're actually working on v2 and I'm not, so you can more easily know > what it conflicts with etc. I just wanted to have it in one way or > another, i.e. be able to deploy v2 and assert that "next + custom > patches" doe

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-17 Thread Junio C Hamano
Thomas Gummerer writes: > On 01/15, Junio C Hamano wrote: >> * ps/stash-in-c (2019-01-04) 27 commits >> - tests: add a special setup where stash.useBuiltin is off >> - stash: optionally use the scripted version again >> - stash: add back the original, scripted `git stash` >> - stash: convert

Re: [PATCH 03/76] parse-options: allow keep-unknown + stop-at-non-opt combination

2019-01-17 Thread Stefan Beller
On Thu, Jan 17, 2019 at 5:06 AM Nguyễn Thái Ngọc Duy wrote: > > These two are orthogonal. One is about unknown _option_ while the > other non-option. Though 0d260f9a09 ("parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together", 2009-03-09) seemed convincing to have this? M

Re: [RFC] submodule: munge paths to submodule git directories

2019-01-17 Thread Stefan Beller
On Thu, Jan 17, 2019 at 9:32 AM Jeff King wrote: > > On Mon, Jan 14, 2019 at 05:25:07PM -0800, Jonathan Nieder wrote: > > > I've put a summary in https://crbug.com/git/28 to make this easier to > > pick up where we left off. Summary from there of the upstream review: > > > > 1. Using urlencoding

Re: [RFC] submodule: munge paths to submodule git directories

2019-01-17 Thread Jeff King
On Mon, Jan 14, 2019 at 05:25:07PM -0800, Jonathan Nieder wrote: > I've put a summary in https://crbug.com/git/28 to make this easier to > pick up where we left off. Summary from there of the upstream review: > > 1. Using urlencoding to escape the slashes is fine, but what if we >want to esc

Re: [PATCH/RFC] fsck: complain when .gitignore and .gitattributes are symlinks

2019-01-17 Thread Jeff King
On Mon, Jan 14, 2019 at 03:09:02PM -0800, Jonathan Nieder wrote: > From: Jeff King > Date: Sun, 13 May 2018 14:14:34 -0400 > > This case is already forbidden by verify_path(), so let's > check it in fsck. It's easier to handle than .gitmodules, > because we don't care about checking the blob con

Re: [PATCH] repository.c: fix sparse warning

2019-01-17 Thread Ramsay Jones
On 17/01/2019 10:06, Duy Nguyen wrote: > On Thu, Jan 17, 2019 at 8:21 AM Ramsay Jones > wrote: >> >> >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Duy, >> >> If you need to re-roll your 'nd/the-index-final' branch, could you >> please squash this into the relevant patch (commit 4478671442, >>

Re: git add —ignore-errors causes --renormalize

2019-01-17 Thread Jeff King
On Thu, Jan 17, 2019 at 11:27:11AM -0500, Jeff King wrote: > -- >8 -- > Subject: [PATCH] add: use separate ADD_CACHE_RENORMALIZE flag > > Commit 9472935d81 (add: introduce "--renormalize", 2017-11-16) taught > git-add to pass HASH_RENORMALIZE to add_to_index(), which then passes > the flag along

Re: [PATCH] commit-graph write: use pack order when finding commits

2019-01-17 Thread Derrick Stolee
On 1/17/2019 10:09 AM, Derrick Stolee wrote: The code itself looks good, I just need to double-check the performance numbers. I tested this patch on our VFS-specific version using five "prefetch packs". Before: 22.61 s (avg) After: 22.18 s (avg) Improvement: 2% The error rate among the s

Re: git add —ignore-errors causes --renormalize

2019-01-17 Thread Jeff King
On Thu, Jan 17, 2019 at 06:22:05PM +0300, Dmitriy Smirnov wrote: > Calling `git add —ignore-errors` appears to be equal to calling `git add > —renormalize`: > > Main.java is saved with CRLF in repo > git config core.autocrlf = input > > $ src git:(master) echo line >> Main.java > $ src git:

Re: Change on check-attr behavior

2019-01-17 Thread Jeff King
On Thu, Jan 17, 2019 at 03:47:09PM +, Sérgio Peixoto wrote: > I think there is a bug on the check-attr behavior of git when asking > for the "allowed-ext" attribute. Check the logs below to see that > with version 2.20.1.windows.1 we get unspecified even the attribute > is there as you can s

Change on check-attr behavior

2019-01-17 Thread Sérgio Peixoto
Hi, I think there is a bug on the check-attr behavior of git when asking for the "allowed-ext" attribute. Check the logs below to see that with version 2.20.1.windows.1 we get unspecified even the attribute is there as you can see when asking for all the attributes. === OLD VERSION === > git ve

Re: [PATCH v3 0/9] Create 'expire' and 'repack' verbs for git-multi-pack-index

2019-01-17 Thread Derrick Stolee
I've seen comments about some leftover uses of the word 'verb' instead of 'subcommand'. I can definitely clean those up, but I'm hoping that more comments could be made on the technical aspects of this series. Thanks, -Stolee

git add —ignore-errors causes --renormalize

2019-01-17 Thread Dmitriy Smirnov
Hello, Calling `git add —ignore-errors` appears to be equal to calling `git add —renormalize`: Main.java is saved with CRLF in repo git config core.autocrlf = input $ src git:(master) echo line >> Main.java $ src git:(master) git add --ignore-errors Main.java $ src git:(master) git commi

Re: [PATCH] commit-graph write: use pack order when finding commits

2019-01-17 Thread Derrick Stolee
On 1/17/2019 8:23 AM, Ævar Arnfjörð Bjarmason wrote: Slightly optimize the "commit-graph write" step by using FOR_EACH_OBJECT_PACK_ORDER with for_each_object_in_pack(). See commit [1] and [2] for the facility and a similar optimization for "cat-file". On Linux it is around 5% slower to run:

Re: [PATCH v2 5/5] travis-ci: build with the right compiler

2019-01-17 Thread SZEDER Gábor
On Thu, Jan 17, 2019 at 02:44:59PM +0100, Johannes Schindelin wrote: > Hi Gábor, > > On Thu, 17 Jan 2019, SZEDER Gábor wrote: > > > Our 'Makefile' hardcodes the compiler to build Git as 'CC = cc'. This > > CC variable can be overridden from the command line, i.e. 'make > > CC=gcc-X.Y' will build

Re: [PATCH 00/76] Convert diff opt parser to parse_options()

2019-01-17 Thread Ævar Arnfjörð Bjarmason
On Thu, Jan 17 2019, Nguyễn Thái Ngọc Duy wrote: > This series converts diff option parsing to using parse-options. There > are a couple benefits of using parse-options, including "git -h" > output, completion and less duplicate work. > > This is the first half. The second one would be converti

Re: git-gui child windows are still blank

2019-01-17 Thread Kenn Sebesta
Good to know the upstream error has been fixed, thanks a lot Rob for investigating. https://discussions.apple.com/thread/8066794 suggests that we can never hope for 8.6.9 to be installed as part of the macOS framework. However, all is not lost as a commenter suggests a workaround of bundling Tk wi

[no subject]

2019-01-17 Thread Cody Kratzer
unsubscribe git

Re: [PATCH v2 5/5] travis-ci: build with the right compiler

2019-01-17 Thread Johannes Schindelin
Hi Gábor, On Thu, 17 Jan 2019, SZEDER Gábor wrote: > Our 'Makefile' hardcodes the compiler to build Git as 'CC = cc'. This > CC variable can be overridden from the command line, i.e. 'make > CC=gcc-X.Y' will build with that particular GCC version, but not from > the environment, i.e. 'CC=gcc-X.Y

Re: [PATCH v2 3/5] travis-ci: don't be '--quiet' when running the tests

2019-01-17 Thread Johannes Schindelin
Hi Gábor, On Thu, 17 Jan 2019, SZEDER Gábor wrote: > All Travis CI build jobs run the test suite with 'make --quiet test'. > > On one hand, being quiet doesn't save us from much clutter in the > output: > > $ make test |wc -l > 861 > $ make --quiet test |wc -l > 848 > > It only spares

[PATCH] commit-graph write: use pack order when finding commits

2019-01-17 Thread Ævar Arnfjörð Bjarmason
Slightly optimize the "commit-graph write" step by using FOR_EACH_OBJECT_PACK_ORDER with for_each_object_in_pack(). See commit [1] and [2] for the facility and a similar optimization for "cat-file". On Linux it is around 5% slower to run: echo 1 >/proc/sys/vm/drop_caches && cat .git/objec

[PATCH 74/76] range-diff: use parse_options() instead of diff_opt_parse()

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Diff's internal option parsing is now done with 'struct option', which makes it possible to combine all diff options to range-diff and parse everything all at once. Parsing code becomes simpler, and we get a looong 'git range-diff -h' Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/range-diff.c

[PATCH 76/76] am: avoid diff_opt_parse()

2019-01-17 Thread Nguyễn Thái Ngọc Duy
diff_opt_parse() is a heavy hammer to just set diff filter. But it's the only way because of the diff_status_letters[] mapping. Add a new API to set diff filter and use it in git-am. diff_opt_parse()'s only remaining call site in revision.c will be gone soon and having it here just because of git-a

[PATCH 70/76] diff.c: convert --inter-hunk-context

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 6 +++--- parse-options.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index 3e7c36524d..cc10b27df0 100644 --- a/diff.c +++ b/diff.c @@ -5311,6 +5311,9 @@ static void prep_parse_options(struct dif

[PATCH 72/76] diff.c: convert --color-moved-ws

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/diff.c b/diff.c index 5403351466..e79a72cde9 100644 --- a/diff.c +++ b/diff.c @@ -4926,6 +4926,20 @@ static int diff_opt_color_moved(const struc

[PATCH 75/76] diff --no-index: use parse_options() instead of diff_opt_parse()

2019-01-17 Thread Nguyễn Thái Ngọc Duy
While at there, move exit() back to the caller. It's easier to see the flow that way than burying it in diff-no-index.c Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/diff.c | 21 +++-- diff-no-index.c | 49 diff.h

[PATCH 73/76] diff.c: allow --no-color-moved-ws

2019-01-17 Thread Nguyễn Thái Ngọc Duy
This option is added in commit b73bcbac4a (diff: allow --no-color-moved-ws - 2018-11-23) in pw/diff-color-moved-ws-fix. To ease merge conflict resolution, re-implement the option handling here so that the conflict could be resolved by taking this side of change. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH 71/76] diff.c: convert --color-moved

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/diff.c b/diff.c index cc10b27df0..5403351466 100644 --- a/diff.c +++ b/diff.c @@ -4905,6 +4905,27 @@ static int diff_opt_char(const struct op

[PATCH 69/76] diff.c: convert --no-prefix

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 25c386b04c..3e7c36524d 100644 --- a/diff.c +++ b/diff.c @@ -5042,6 +5042,18 @@ static int diff_opt_line_prefix(const struct option *opt,

[PATCH 65/76] diff.c: convert --diff-filter

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index 2a943d47fd..fee45c5066 100644 --- a/diff.c +++ b/diff.c @@ -4756,10 +4756,13 @@ static unsigned filter_bit_tst(char status, const struct dif

[PATCH 66/76] diff.c: convert --[no-]abbrev

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 12 +--- parse-options-cb.c | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/diff.c b/diff.c index fee45c5066..f137b7f442 100644 --- a/diff.c +++ b/diff.c @@ -5274,6 +5274,7 @@ static void prep_parse_op

[PATCH 60/76] diff.c: convert -l

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index e4495194d3..00a56a25e0 100644 --- a/diff.c +++ b/diff.c @@ -5287,6 +5287,8 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 62/76] diff.c: convert --pickaxe-all|--pickaxe-regex

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index 832a5bcd31..ae993f5551 100644 --- a/diff.c +++ b/diff.c @@ -5395,6 +5395,12 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 59/76] diff.c: convert -z

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 0922937bab..e4495194d3 100644 --- a/diff.c +++ b/diff.c @@ -5242,6 +5242,9 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 67/76] diff.c: convert --[src|dst]-prefix

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 14 ++ parse-options.h | 3 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index f137b7f442..0d66497851 100644 --- a/diff.c +++ b/diff.c @@ -5275,6 +5275,12 @@ static void prep_parse_options

[PATCH 68/76] diff.c: convert --line-prefix

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index 0d66497851..25c386b04c 100644 --- a/diff.c +++ b/diff.c @@ -5030,6 +5030,18 @@ static int diff_opt_ignore_submodules(const struct opti

[PATCH 63/76] diff.c: convert -O

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index ae993f5551..4e004a2195 100644 --- a/diff.c +++ b/diff.c @@ -5401,6 +5401,8 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 64/76] diff.c: convert --find-object

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index 4e004a2195..2a943d47fd 100644 --- a/diff.c +++ b/diff.c @@ -4818,12 +4818,15 @@ static int diff_opt_ws_error_highlight(const struct option *opti

[PATCH 61/76] diff.c: convert -S|-G

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 37 - 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index 00a56a25e0..832a5bcd31 100644 --- a/diff.c +++ b/diff.c @@ -5060,6 +5060,28 @@ static int diff_opt_patience(const struct

[PATCH 57/76] diff.c: convert --ws-error-highlight

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index 4d3eababe3..c60cfc80a4 100644 --- a/diff.c +++ b/diff.c @@ -4804,17 +4804,18 @@ static void enable_patch_output(int *fmt) { *fm

[PATCH 58/76] diff.c: convert --ita-[in]visible-in-index

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index c60cfc80a4..0922937bab 100644 --- a/diff.c +++ b/diff.c @@ -5356,6 +5356,12 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 56/76] diff.c: convert --submodule

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/diff.c b/diff.c index bf7d2afcce..4d3eababe3 100644 --- a/diff.c +++ b/diff.c @@ -4725,14 +4725,6 @@ static int parse_dirstat_opt(struct diff_options

[PATCH 55/76] diff.c: convert --ignore-submodules

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 611b73d06a..bf7d2afcce 100644 --- a/diff.c +++ b/diff.c @@ -5017,6 +5017,19 @@ static int diff_opt_follow(const struct option *opt,

[PATCH 49/76] diff.c: convert --word-diff-regex

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/diff.c b/diff.c index b80eefe9bc..3e55c2fd1f 100644 --- a/diff.c +++ b/diff.c @@ -5096,6 +5096,18 @@ static int diff_opt_word_diff(const struct option *opt,

[PATCH 52/76] diff.c: convert --quiet

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 888a4a4975..eb81a95e89 100644 --- a/diff.c +++ b/diff.c @@ -5303,6 +5303,8 @@ static void prep_parse_options(struct diff_options *options)

[PATCH 51/76] diff.c: convert --exit-code

2019-01-17 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 49cbf14417..888a4a4975 100644 --- a/diff.c +++ b/diff.c @@ -5301,6 +5301,8 @@ static void prep_parse_options(struct diff_options *options)

  1   2   >