Re: [PATCH v2 09/17] Add watchman support to reduce index refresh cost

2016-03-24 Thread Jeff Hostetler
I'm seeing wm->name have value ".git" rather than ".git/" on Linux. On 03/18/2016 09:04 PM, David Turner wrote: + if (!strncmp(wm->name, ".git/", 5) || + strstr(wm->name, "/.git/")) + continue; thanks, Jeff -- To unsubscribe from this

Re: [PATCH v2 7/8] status: update git-status.txt for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 06:43 PM, Jakub Narębski wrote: W dniu 2016-07-25 o 21:25, Jeff Hostetler pisze: +Porcelain Format Version 2 +~~ + +Version 2 format adds more detailed information about the state of +the worktree and the changed items. I think it should

[PATCH v3 0/8] status: V2 porcelain status

2016-07-26 Thread Jeff Hostetler
, but silently also allow --porcelain=2. Jeff Hostetler (8): status: rename long-format print routines status: cleanup API to wt_status_print status: support --porcelain[=] status: per-file data collection for --porcelain=v2 status: print per-file porcelain v2 status data status: print branch info

[PATCH v3 3/8] status: support --porcelain[=]

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

[PATCH v3 1/8] status: rename long-format print routines

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Renamed the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output. This will hopefully reduce confusion as other status formats are

[PATCH v3 5/8] status: print per-file porcelain v2 status data

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- wt-status.c | 283 +

[PATCH v3 7/8] status: update git-status.txt for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- Documentation/g

[PATCH v3 8/8] status: tests for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Unit tests for porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- t/t7064-wtstatus-pv2.sh | 585 ++

[PATCH v3 6/8] status: print branch info with --porcelain=v2 --branch

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit SHA, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-

[PATCH v3 4/8] status: per-file data collection for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to launch secondary commands (and try to match the logic with

[PATCH v3 2/8] status: cleanup API to wt_status_print

2016-07-26 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Refactor the API between builtin/commit.c and wt-status.[ch]. Hide details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine and eliminate the switch statements from builtin/co

Re: [PATCH v1 4/6] Expanded branch header for Porcelain Status V2

2016-07-21 Thread Jeff Hostetler
On 07/21/2016 11:46 AM, Johannes Schindelin wrote: On Wed, 20 Jul 2016, Jeff King wrote: On Wed, Jul 20, 2016 at 02:20:24PM -0400, Jeff Hostetler wrote: IIRC, it happens when HEAD points to a broken ref. So something like: git init echo broken >.git/refs/heads/master would ca

[PATCH v2 2/8] status: cleanup API to wt_status_print

2016-07-25 Thread Jeff Hostetler
formats and isolate that within wt-status.c Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- builtin/commit.c | 51 +-- wt-status.c | 25 ++--- wt-status.h | 16 3 files changed, 43 inse

[PATCH v2 3/8] status: support --porcelain[=]

2016-07-25 Thread Jeff Hostetler
Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- D

[PATCH v2 8/8] status: tests for --porcelain=v2

2016-07-25 Thread Jeff Hostetler
Unit tests for porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 542 1 file changed, 542 insertions(+) create mode 100755 t/t7064-wtstatus-pv2.sh diff --git a/t/t7064-wtstat

[PATCH v2 5/8] status: print per-file porcelain v2 status data

2016-07-25 Thread Jeff Hostetler
Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- wt-status.c | 285 +++- 1 file changed, 284 insertions(+), 1 deletion(-) diff --git a/wt-status.c b/wt-status.c index 5

[PATCH v2 1/8] status: rename long-format print routines

2016-07-25 Thread Jeff Hostetler
Renamed the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output. This will hopefully reduce confusion as other status formats are added in the future. Signed-off-by: Jeff Hostetler <je

[PATCH v2 6/8] status: print branch info with --porcelain=v2 --branch

2016-07-25 Thread Jeff Hostetler
Expand porcelain v2 output to include branch and tracking branch information. This includes the commit SHA, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- builtin/commit.c | 5 wt-status.c

[PATCH v2 4/8] status: per-file data collection for --porcelain=v2

2016-07-25 Thread Jeff Hostetler
, a GUI IDE might need the file mode to display the correct icon for a changed item. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- builtin/commit.c | 3 ++ wt-status.c | 114 ++- wt-status.h | 17 + 3

[PATCH v2 0/8] status: V2 porcelain status

2016-07-25 Thread Jeff Hostetler
es are now completely separate and have a unique prefix key (and are grouped by type). The unit tests have been converted to use heredoc's. I removed the v2 argument from git commit --porcelain since it didn't really fit here. Jeff Hostetler (8): status: rename long-format print routines status: c

[PATCH v2 7/8] status: update git-status.txt for --porcelain=v2

2016-07-25 Thread Jeff Hostetler
Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 83 ++-- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/Documentati

Re: [PATCH v1 3/6] Per-file output for Porcelain Status V2

2016-07-21 Thread Jeff Hostetler
On 07/20/2016 05:31 PM, Junio C Hamano wrote: The code seems to assume that d->porcelain_v2.* fields are initialized earlier in the callchain to reasonable values (e.g. STATUS_ADDED case does not clear .mode_head to "missing"); I am not sure if that is easier to read or fill in all the values

Re: [PATCH v3 7/8] status: update git-status.txt for --porcelain=v2

2016-08-01 Thread Jeff Hostetler
On 07/30/2016 01:22 PM, Jakub Narębski wrote: W dniu 26.07.2016 o 23:11, Jeff Hostetler pisze: This is a nice change, available because of lack of backward compatibility with v1. The porcelain v2 format branch-related information could be enhanced without risk of breaking parsers, or having

Re: [PATCH v2 4/8] status: per-file data collection for --porcelain=v2

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 04:14 PM, Junio C Hamano wrote: Jeff Hostetler <jeffh...@microsoft.com> writes: +static void aux_updated_entry_porcelain_v2( + struct wt_status *s, + struct wt_status_change_data *d, + struct diff_filepair *p) +{ + switch (p->status) { +

Re: [PATCH v2 5/8] status: print per-file porcelain v2 status data

2016-07-26 Thread Jeff Hostetler
On 07/25/2016 04:23 PM, Junio C Hamano wrote: Jeff Hostetler <jeffh...@microsoft.com> writes: +static void wt_porcelain_v2_print(struct wt_status *s); + There is no point in this forward declaration, if you just place the implementation of these functions here, no? Right. I ju

[PATCH v4 4/8] status: per-file data collection for --porcelain=v2

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to launch secondary commands (and try to match the logic with

[PATCH v4 8/8] status: tests for --porcelain=v2

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Unit tests for porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- t/t7064-wtstatus-pv2.sh | 585 ++

[PATCH v4 0/8] status: V2 porcelain status

2016-08-02 Thread Jeff Hostetler
/git-status.txt for clarity. Jeff Hostetler (8): status: rename long-format print routines status: cleanup API to wt_status_print status: support --porcelain[=] status: per-file data collection for --porcelain=v2 status: print per-file porcelain v2 status data status: print branch info

[PATCH v4 2/8] status: cleanup API to wt_status_print

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Refactor the API between builtin/commit.c and wt-status.[ch]. Hide details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine and eliminate the switch statements from builtin/co

[PATCH v4 7/8] git-status.txt: describe --porcelain=v2 format

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain V2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- Documentation/gi

[PATCH v4 3/8] status: support --porcelain[=]

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

[PATCH v4 1/8] status: rename long-format print routines

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Renamed the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output. This will hopefully reduce confusion as other status formats are

[PATCH v4 5/8] status: print per-file porcelain v2 status data

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> --- wt-status.c | 283 +

[PATCH v4 6/8] status: print branch info with --porcelain=v2 --branch

2016-08-02 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit SHA, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-

Re: [PATCH v3 7/8] status: update git-status.txt for --porcelain=v2

2016-08-02 Thread Jeff Hostetler
On 08/02/2016 11:19 AM, Jakub Narębski wrote: W dniu 01.08.2016 o 17:39, Jeff Hostetler pisze: On 07/30/2016 01:22 PM, Jakub Narębski wrote: W dniu 26.07.2016 o 23:11, Jeff Hostetler pisze: This is a nice change, available because of lack of backward compatibility with v1. The porcelain v2

[PATCH v6 9/9] status: unit tests for --porcelain=v2

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Test porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 576 1 file changed, 576 insertions(+) create mode 100755 t/t7064-wts

[PATCH v6 8/9] test-lib-functions.sh: Add lf_to_nul

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Add lf_to_nul() function to test-lib-functions. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/test-lib-functions.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functi

[PATCH v6 7/9] git-status.txt: describe --porcelain=v2 format

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 126 +-- 1 file changed, 122 inse

[PATCH v6 4/9] status: collect per-file data for --porcelain=v2

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Collect extra per-file data for porcelain V2 format. The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to

[PATCH v6 5/9] status: print per-file porcelain v2 status data

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- wt-status.c | 285 +++- 1 file changed, 284 insertions(+), 1 delet

[PATCH v6 1/9] status: rename long-format print routines

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Rename the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output and reduce developer confusion as other status formats are added in the

[PATCH v6 2/9] status: cleanup API to wt_status_print

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Refactor the API between builtin/commit.c and wt-status.[ch]. Hide the details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine. Eliminate the switch statements from builtin/commit.c.

[PATCH v6 6/9] status: print branch info with --porcelain=v2 --branch

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit id, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- buil

[PATCH v6 0/9] status: V2 porcelain status

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> This patch series adds porcelain V2 format to status. This provides detailed information about file changes and about the current branch. The new output is accessed via: git status --porcelain=v2 [--branch] This v6 patch series add

[PATCH v6 3/9] status: support --porcelain[=]

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

[PATCH v7 4/9] status: collect per-file data for --porcelain=v2

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Collect extra per-file data for porcelain V2 format. The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to

[PATCH v7 6/9] status: print branch info with --porcelain=v2 --branch

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit id, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- buil

[PATCH v7 5/9] status: print per-file porcelain v2 status data

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- wt-status.c | 285 +++- 1 file changed, 284 insertions(+), 1 delet

[PATCH v7 7/9] git-status.txt: describe --porcelain=v2 format

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 126 +-- 1 file changed, 122 inse

[PATCH v7 3/9] status: support --porcelain[=]

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

[PATCH v7 1/9] status: rename long-format print routines

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Rename the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output and reduce developer confusion as other status formats are added in the

Re: [PATCH v6 9/9] status: unit tests for --porcelain=v2

2016-08-11 Thread Jeff Hostetler
On 08/11/2016 02:36 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: From: Jeff Hostetler <jeffh...@microsoft.com> +. ./test-lib.sh + +OID_EMPTY=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 It seems that test-lib.sh these days has EMPTY_BLOB defined for yo

[PATCH v7 8/9] test-lib-functions.sh: Add lf_to_nul

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Add lf_to_nul() function to test-lib-functions. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/test-lib-functions.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functi

[PATCH v7 2/9] status: cleanup API to wt_status_print

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Refactor the API between builtin/commit.c and wt-status.[ch]. Hide the details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine. Eliminate the switch statements from builtin/commit.c.

[PATCH v7 9/9] status: unit tests for --porcelain=v2

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Test porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 592 1 file changed, 592 insertions(+) create mode 100755 t/t7064-wts

[PATCH v7 0/9] status: V2 porcelain status

2016-08-11 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> This patch series adds porcelain V2 format to status. This provides detailed information about file changes and about the current branch. The new output is accessed via: git status --porcelain=v2 [--branch] This v7 patch series address th

Re: [PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-10 Thread Jeff Hostetler
On 08/08/2016 01:07 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: +test_expect_success pre_initial_commit_0 ' + ... + git status --porcelain=v2 --branch --untracked-files=normal >actual && + test_cmp expect actual +' + + +te

Re: [PATCH v4 1/8] status: rename long-format print routines

2016-08-04 Thread Jeff Hostetler
On 08/03/2016 05:28 PM, Junio C Hamano wrote: Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> Signed-off-by: Jeff Hostetler <g...@jeffhostetler.com> Hmm, are these physically the same people? If so, which one do you want to be known as? Yes, these are both my addre

Re: [PATCH v4 2/8] status: cleanup API to wt_status_print

2016-08-04 Thread Jeff Hostetler
On 08/03/2016 05:36 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: From: Jeff Hostetler <jeffh...@microsoft.com> diff --git a/wt-status.h b/wt-status.h index 2023a3c..a859a12 100644 --- a/wt-status.h +++ b/wt-status.h @@ -43,6 +43,15 @@ struct wt_status

[PATCH v8 7/9] git-status.txt: describe --porcelain=v2 format

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 126 +-- 1 file changed, 122 inse

[PATCH v8 6/9] status: print branch info with --porcelain=v2 --branch

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit id, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- buil

[PATCH v8 5/9] status: print per-file porcelain v2 status data

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- wt-status.c | 285 +++- 1 file changed, 284 insertions(+), 1 delet

[PATCH v8 9/9] status: unit tests for --porcelain=v2

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Test porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 593 1 file changed, 593 insertions(+) create mode 100755 t/t7064-wts

[PATCH v8 1/9] status: rename long-format print routines

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Rename the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output and reduce developer confusion as other status formats are added in the

[PATCH v8 0/9] status: V2 porcelain status

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> This patch series adds porcelain V2 format to status. This provides detailed information about file changes and about the current branch. The new output is accessed via: git status --porcelain=v2 [--branch] This v8 patch series add

[PATCH v8 3/9] status: support --porcelain[=]

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

[PATCH v8 2/9] status: cleanup API to wt_status_print

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Refactor the API between builtin/commit.c and wt-status.[ch]. Hide the details of the various wt_*status_print() routines inside wt-status.c behind a single (new) wt_status_print() routine. Eliminate the switch statements from builtin/commit.c.

[PATCH v8 4/9] status: collect per-file data for --porcelain=v2

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Collect extra per-file data for porcelain V2 format. The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to

[PATCH v8 8/9] test-lib-functions.sh: Add lf_to_nul

2016-08-12 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Add lf_to_nul() function to test-lib-functions. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/test-lib-functions.sh | 4 1 file changed, 4 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functi

Re: [PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-10 Thread Jeff Hostetler
On 08/10/2016 06:41 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: Having said all that, it is OK to fix their titles after the current 9-patch series lands on 'next'; incremental refinements are easier on reviewers than having to review too many rerolls.

Re: [PATCH v1 0/6] Porcelain Status V2

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 12:15 PM, Jeff King wrote: One final bit of food for thought. Just yesterday somebody asked me about renewing the old idea of using a more standardized format for machine-readable output, like --json. That's obviously something that would exist alongside the existing formats for

Re: [PATCH v1 4/6] Expanded branch header for Porcelain Status V2

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 12:06 PM, Jeff King wrote: On Tue, Jul 19, 2016 at 06:10:56PM -0400, Jeff Hostetler wrote: + } else { + /* +* TODO All of various print routines allow for s->branch to be null. +* TODO When can this happen and what should

[PATCH v1 4/6] Expanded branch header for Porcelain Status V2

2016-07-19 Thread Jeff Hostetler
. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- builtin/commit.c | 5 wt-status.c | 89 wt-status.h | 2 ++ 3 files changed, 96 insertions(+) diff --git a/builtin/commit.c b/builtin/commit.c index b

[PATCH v1 1/6] Allow --porcelain[=] in status and commit commands

2016-07-19 Thread Jeff Hostetler
Update the --porcelain argument to take an optional version number. This will allow us to define new porcelain formats in the future. This default to 1 and represents the existing porcelain format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-commit.tx

[PATCH v1 5/6] Add porcelain V2 documentation to status manpage

2016-07-19 Thread Jeff Hostetler
This commit updates the status manpage to include information about porcelain format V2. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 62 +--- 1 file changed, 59 insertions(+), 3 deletions(-) diff

[PATCH v1 3/6] Per-file output for Porcelain Status V2

2016-07-19 Thread Jeff Hostetler
these values reflect the stage 1, 2, and 3 values. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- builtin/commit.c | 9 ++ wt-status.c | 398 ++- wt-status.h | 13 ++ 3 files changed, 419 insertions(+), 1 deletion(-)

[PATCH v1 0/6] Porcelain Status V2

2016-07-19 Thread Jeff Hostetler
could be added to both formats. Jeff Hostetler (6): Allow --porcelain[=] in status and commit commands Status and checkout unit tests for --porcelain[=] Per-file output for Porcelain Status V2 Expanded branch header for Porcelain Status V2 Add porcelain V2 documentation to status manpage Unit

[PATCH v1 6/6] Unit tests for V2 porcelain status

2016-07-19 Thread Jeff Hostetler
This commit contains unit tests to exercise the V2 porcelain status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 461 t/t7501-commit.sh | 9 + 2 files changed, 470 insertions(+) creat

[PATCH v1 2/6] Status and checkout unit tests for --porcelain[=]

2016-07-19 Thread Jeff Hostetler
Simple unit tests to validate the argument parsing. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7060-wtstatus.sh | 21 + t/t7501-commit.sh | 14 ++ 2 files changed, 35 insertions(+) diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh

Re: [PATCH v1 1/6] Allow --porcelain[=] in status and commit commands

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 11:08 AM, Johannes Schindelin wrote: On Tue, 19 Jul 2016, Jeff Hostetler wrote: diff --git a/builtin/commit.c b/builtin/commit.c + } else if (arg) { + int n = strtol(arg, NULL, 10); + if (n == 1) + *value

Re: [PATCH v1 6/6] Unit tests for V2 porcelain status

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 11:30 AM, Jakub Narębski wrote: W dniu 2016-07-20 o 00:10, Jeff Hostetler pisze: +test_expect_success pre_initial_commit_0 ' + printf "## branch: (initial) master\n" >expected && + printf "?? actual\n" >>expected &

Re: [PATCH v1 2/6] Status and checkout unit tests for --porcelain[=]

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 11:19 AM, Johannes Schindelin wrote: Hi Jeff, On Tue, 19 Jul 2016, Jeff Hostetler wrote: Simple unit tests to validate the argument parsing. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> They are simple alright, but do we really need so many of them? I woul

Re: [PATCH v1 5/6] Add porcelain V2 documentation to status manpage

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 11:29 AM, Jakub Narębski wrote: W dniu 2016-07-20 o 00:10, Jeff Hostetler pisze: +Porcelain Format Version 2 +~~ + + +If `--branch` is given, a header line showing branch tracking information +is printed. This line begins with "### branch: "

Re: [PATCH v1 1/6] Allow --porcelain[=] in status and commit commands

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 11:58 AM, Jeff King wrote: On Tue, Jul 19, 2016 at 06:10:53PM -0400, Jeff Hostetler wrote: +static int opt_parse_porcelain(const struct option *opt, const char *arg, int unset) +{ + enum wt_status_format *value = (enum wt_status_format *)opt->value; + if (un

Re: [PATCH v1 2/6] Status and checkout unit tests for --porcelain[=]

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 12:00 PM, Jeff King wrote: On Tue, Jul 19, 2016 at 06:10:54PM -0400, Jeff Hostetler wrote: +test_expect_failure '--porcelain=bogus with stuff to commit returns ok' ' + echo bongo bongo bongo >>file && + git commit -m next -a --porcelain=bogus +' H

Re: [PATCH v1 2/6] Status and checkout unit tests for --porcelain[=]

2016-07-20 Thread Jeff Hostetler
On 07/20/2016 12:03 PM, Jeff King wrote: On Wed, Jul 20, 2016 at 10:00:07AM -0600, Jeff King wrote: On Tue, Jul 19, 2016 at 06:10:54PM -0400, Jeff Hostetler wrote: +test_expect_failure '--porcelain=bogus with stuff to commit returns ok' ' + echo bongo bongo bongo >&g

Re: [PATCH] Add very verbose porcelain output to status

2016-07-12 Thread Jeff Hostetler
these lines and see how it looks. Thank again, Jeff On 07/12/2016 11:07 AM, Jeff King wrote: On Thu, Jul 07, 2016 at 03:26:28PM -0400, Jeff Hostetler wrote: Tools interacting with Git repositories may need to know the complete state of the working directory. For efficiency, it would be good

[PATCH] Add very verbose porcelain output to status

2016-07-07 Thread Jeff Hostetler
this mode to offer more information. Just like we do elsewhere in Git's source code, we now interpret multiple `--verbose` flags accumulatively, and show substantially more information in porcelain mode at verbosity level 2. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentati

Re: [PATCH v4 6/8] status: print branch info with --porcelain=v2 --branch

2016-08-05 Thread Jeff Hostetler
On 08/05/2016 01:01 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: /* + * Print branch information for porcelain v2 output. These lines + * are printed when the '--branch' parameter is given. + * + *# branch.oid + *# branch.head Just bikesh

Re: [PATCH v4 7/8] git-status.txt: describe --porcelain=v2 format

2016-08-05 Thread Jeff Hostetler
On 08/05/2016 01:50 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: +Porcelain Format Version 2 +~~ + +Version 2 format adds more detailed information about the state of +the worktree and changed items. Version 2 also defines an exte

Re: [PATCH v4 8/8] status: tests for --porcelain=v2

2016-08-05 Thread Jeff Hostetler
On 08/05/2016 02:12 PM, Junio C Hamano wrote: Jeff Hostetler <g...@jeffhostetler.com> writes: +## +## Confirm output prior to initial

Re: [PATCH v4 5/8] status: print per-file porcelain v2 status data

2016-08-05 Thread Jeff Hostetler
On 08/05/2016 05:02 PM, Jeff King wrote: On Tue, Aug 02, 2016 at 10:12:14AM -0400, Jeff Hostetler wrote: +static void wt_porcelain_v2_print_unmerged_entry( + struct string_list_item *it, + struct wt_status *s) +{ + struct wt_status_change_data *d = it->util; + co

[PATCH v5 5/9] status: print per-file porcelain v2 status data

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Print per-file information in porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- wt-status.c | 285 +++- 1 file changed, 284 insertions(+), 1 delet

[PATCH v5 1/9] status: rename long-format print routines

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Rename the various wt_status_print*() routines to be wt_longstatus_print*() to make it clear that these routines are only concerned with the normal/long status output and reduce developer confusion as other status formats are added in the

[PATCH v5 4/9] status: collect per-file data for --porcelain=v2

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Collect extra per-file data for porcelain V2 format. The output of `git status --porcelain` leaves out many details about the current status that clients might like to have. This can force them to be less efficient as they may need to

[PATCH v5 7/9] git-status.txt: describe --porcelain=v2 format

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update status manpage to include information about porcelain v2 format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- Documentation/git-status.txt | 126 +-- 1 file changed, 122 inse

[PATCH v5 3/9] status: support --porcelain[=]

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Update --porcelain argument to take optional version parameter to allow multiple porcelain formats to be supported in the future. The token "v1" is the default value and indicates the traditional porcelain format. (The token

Re: [PATCH] wt-status.c: mark a file-local symbol as static

2016-08-05 Thread Jeff Hostetler
On 08/05/2016 04:55 PM, Ramsay Jones wrote: Signed-off-by: Ramsay Jones --- Hi Jeff, If you need to re-roll your 'jh/status-v2-porcelain' branch, could you please squash this into the relevant patch (37f7104f, "status: print per-file porcelain v2 status data",

[PATCH v5 6/9] status: print branch info with --porcelain=v2 --branch

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Expand porcelain v2 output to include branch and tracking branch information. This includes the commit id, the branch, the upstream branch, and the ahead and behind counts. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- buil

[PATCH v5 9/9] status: unit tests for --porcelain=v2

2016-08-05 Thread Jeff Hostetler
From: Jeff Hostetler <jeffh...@microsoft.com> Test porcelain v2 status format. Signed-off-by: Jeff Hostetler <jeffh...@microsoft.com> --- t/t7064-wtstatus-pv2.sh | 597 1 file changed, 597 insertions(+) create mode 100755 t/t7064-wts

  1   2   3   4   5   6   7   >