Re: What's cooking in git.git (Aug 2016, #07; Thu, 18)

2016-08-19 Thread Junio C Hamano
On Fri, Aug 19, 2016 at 4:46 PM, Stefan Beller wrote: >> >> * sb/submodule-clone-rr (2016-08-17) 8 commits >> >> I spotted a last-minute bug in v5, which is not a very good sign >> (it shows that nobody is reviewing). Any more comments? > > nobody except you ;) OK, it

BUG: Use GNU Short Option Style "clumping" rules not obeyed for `git stash`

2016-08-19 Thread Damian Nowak
``` % git stash -ku error: unknown option for 'stash save': -ku (...) % git stash -k -u Saved working directory and index state WIP on master: (...) (...) ``` In other parts of git, clumping (as defined by [GNU Short Option Style

Re: [PATCH v9 0/8] submodule show inline diff

2016-08-19 Thread Stefan Beller
On Fri, Aug 19, 2016 at 4:34 PM, Jacob Keller wrote: > From: Jacob Keller > > More suggestions from Junio and a few changes to support submodule name > lookup. Hopefully we're getting close to the goal! > > interdiff between v8 and current: >

Re: What's cooking in git.git (Aug 2016, #07; Thu, 18)

2016-08-19 Thread Stefan Beller
> > * sb/submodule-clone-rr (2016-08-17) 8 commits > - clone: recursive and reference option triggers submodule alternates > - clone: implement optional references > - clone: clarify option_reference as required > - clone: factor out checking for an alternate path > - submodule--helper

[PATCH] format-patch: show 0/1 and 1/1 for singleton patch with cover letter

2016-08-19 Thread Jacob Keller
From: Jacob Keller Change the default behavior of git-format-patch to generate numbered sequence of 0/1 and 1/1 when generating both a cover-letter and a single patch. This standardizes the cover letter to have 0/N which helps distinguish the cover letter from the patch

[PATCH v9 7/8] submodule: refactor show_submodule_summary with helper function

2016-08-19 Thread Jacob Keller
From: Jacob Keller A future patch is going to add a new submodule diff format which displays an inline diff of the submodule changes. To make this easier, and to ensure that both submodule diff formats use the same initial header, factor out show_submodule_header()

[PATCH v9 8/8] diff: teach diff to display submodule difference with an inline diff

2016-08-19 Thread Jacob Keller
From: Jacob Keller Teach git-diff and friends a new format for displaying the difference of a submodule. The new format is an inline diff of the contents of the submodule between the commit range of the update. This allows the user to see the actual code change caused by

[PATCH v9 6/8] submodule: convert show_submodule_summary to use struct object_id *

2016-08-19 Thread Jacob Keller
From: Jacob Keller Since we're going to be changing this function in a future patch, lets go ahead and convert this to use object_id now. Signed-off-by: Jacob Keller --- diff.c | 2 +- submodule.c | 16 submodule.h | 2 +-

[PATCH v9 1/8] cache: add empty_tree_oid object and helper function

2016-08-19 Thread Jacob Keller
From: Jacob Keller Similar to is_null_oid(), and is_empty_blob_sha1() add an empty_tree_oid along with helper function is_empty_tree_oid(). For completeness, also add an "is_empty_tree_sha1()", "is_empty_blob_sha1()", "is_empty_tree_oid()" and "is_empty_blob_oid()"

[PATCH v9 3/8] graph: add support for --line-prefix on all graph-aware output

2016-08-19 Thread Jacob Keller
From: Jacob Keller Add an extension to git-diff and git-log (and any other graph-aware displayable output) such that "--line-prefix=" will print the additional line-prefix on every line of output. To make this work, we have to fix a few bugs in the graph API that force

[PATCH v9 2/8] diff.c: remove output_prefix_length field

2016-08-19 Thread Jacob Keller
From: Junio C Hamano "diff/log --stat" has a logic that determines the display columns available for the diffstat part of the output and apportions it for pathnames and diffstat graph automatically. 5e71a84a (Add output_prefix_length to diff_options, 2012-04-16) added the

[PATCH v9 4/8] diff: prepare for additional submodule formats

2016-08-19 Thread Jacob Keller
From: Jacob Keller A future patch will add a new format for displaying the difference of a submodule. Make it easier by changing how we store the current selected format. Replace the DIFF_OPT flag with an enumeration, as each format will be mutually exclusive.

[PATCH v9 5/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Jacob Keller
From: Jacob Keller Currently, do_submodule_path will first try to locate the git directory using read_gitfile on /.git. If this fails, it goes ahead and assumes the path is actually the git directory. This is good as it allows submodules which aren't stored in the

[PATCH v9 0/8] submodule show inline diff

2016-08-19 Thread Jacob Keller
From: Jacob Keller More suggestions from Junio and a few changes to support submodule name lookup. Hopefully we're getting close to the goal! interdiff between v8 and current: diff --git c/builtin/rev-list.c w/builtin/rev-list.c index 21cde8dd6b31..8479f6ed28aa 100644

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 3:26 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> Is there a way to do this lookup? I couldn't find it. > > Perhaps submodule_from_path(), that is used to implement "git > submodule--helper name $path"? Yep, thanks. I

[ANNOUNCE] Git v2.10.0-rc1

2016-08-19 Thread Junio C Hamano
A release candidate Git v2.10.0-rc1 is now available for testing at the usual places. It is comprised of 611 non-merge commits since v2.9.0, contributed by 68 people, 20 of which are new faces. Relative to v2.10-0-rc0 (the preview), there is a last-minute merge of Linus's "Let's show longer

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Eric Wong
Johannes Schindelin wrote: > On Thu, 18 Aug 2016, Eric Wong wrote: > > Johannes Schindelin wrote: > > > > > Old dogs claim the mail list-approach works for them. Nope. Doesn't. > > > Else you would not have written all those custom scripts.

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Eric Wong
Stefan Beller wrote: > Maybe we should invent a patch format that copes with broken whitespace? No redundant new formats, please. MIME attachments are already widely-supported and fine by me. But it's not my call for git. -- To unsubscribe from this list: send the line

Re: [PATCH] diff-highlight: add some tests.

2016-08-19 Thread Junio C Hamano
Jeff King writes: > For that matter, I'm not sure that: > > cat >a <<-\EOF && > aaa > bbb > ccc > EOF > > cat >b <<-\EOF && > aaa > 0bb > ccc > EOF > > dh_test a b <<\EOF > aaa > -${CW}b${CR}bb > +${CW}0${CR}bb > EOF > > isn't more readable, too. It's

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > Is there a way to do this lookup? I couldn't find it. Perhaps submodule_from_path(), that is used to implement "git submodule--helper name $path"? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH v8 8/8] diff: teach diff to display submodule difference with an inline diff

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 2:52 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> diff --git a/diff.h b/diff.h >> index ea5aba668eaa..192c0eedd0ff 100644 >> --- a/diff.h >> +++ b/diff.h >> @@ -112,6 +112,7 @@ enum diff_words_type { >> enum

[PATCH v13 05/13] t6030: explicitly test for bisection cleanup

2016-08-19 Thread Pranit Bauva
Add test to explicitly check that 'git bisect reset' is working as expected. This is already covered implicitly by the test suite. Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 2:14 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Jacob Keller writes: >> >>> Is there a reason for that? I've found that .field = value is safer >>> because it ensures that you don't end up

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 2:11 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> submodule. I think we already have the complete path. Or is the name >> *not* equivalent to the path? > > A submodule that is bound to top-level at "path" originally gets

Re: [PATCH v8 8/8] diff: teach diff to display submodule difference with an inline diff

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > diff --git a/diff.h b/diff.h > index ea5aba668eaa..192c0eedd0ff 100644 > --- a/diff.h > +++ b/diff.h > @@ -112,6 +112,7 @@ enum diff_words_type { > enum diff_submodule_format { > DIFF_SUBMODULE_SHORT = 0, > DIFF_SUBMODULE_LOG, > +

[PATCH] for-each-ref: add %(upstream:gone) to mark missing refs

2016-08-19 Thread Øystein Walle
git branch -vv will show "gone" next to a remote tracking branch if it does not exist. for-each-ref is suitable for parsing but had no way of showing this information. This introduces "%(upstream:gone)" to display "gone" in the formatted output if the ref does not exist or an empty string

[PATCH v13 10/13] bisect--helper: `check_and_set_terms` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement the `check_and_set_terms` shell function in C and add `check-and-set-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-and-set-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more

Re: [PATCH v2 0/3] diff-highlight: add support for git log --graph output.

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 09:19:44PM +, Eric Wong wrote: > > I've rebased my changes. Unfortunately, having 3 commits made this somewhat > > tedious. I also find it weird that my new patch set makes it difficult to > > see > > what changes I've made from my first set. What's the standard

Re: [PATCH v2 0/3] diff-highlight: add support for git log --graph output.

2016-08-19 Thread Eric Wong
Brian Henderson wrote: > On Wed, Aug 10, 2016 at 08:56:35AM +, Eric Wong wrote: > > "local" is not a portable construct. It's common for > > Debian/Ubuntu systems to use dash as /bin/sh instead of bash; > > (dash is faster, and mostly sticks to POSIX) > > > > The

[PATCH v13 04/13] bisect--helper: `bisect_clean_state` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement `bisect_clean_state` shell function in C and add a `bisect-clean-state` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-clean-state` subcommand is a measure to port shell function to C so as to use the existing test suite. As more functions are

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Junio C Hamano
Junio C Hamano writes: > Jacob Keller writes: > >> Is there a reason for that? I've found that .field = value is safer >> because it ensures that you don't end up initializing the wrong >> values? Or is it a compatibility thing? > > Yes. That was a

[PATCH v13 06/13] wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()

2016-08-19 Thread Pranit Bauva
is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > submodule. I think we already have the complete path. Or is the name > *not* equivalent to the path? A submodule that is bound to top-level at "path" originally gets "path" as its name. If you move it elsewhere, you do not want it to lose its

[PATCH v13 03/13] bisect--helper: `write_terms` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement the `write_terms` shell function in C and add a `write-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also remove the subcommand `--check-term-format` as it can now be called from inside the function write_terms() C implementation. Also `|| exit` is added

Re: [PATCH] diff-highlight: add some tests.

2016-08-19 Thread Junio C Hamano
Brian Henderson writes: > +# dh_test is a test helper function which takes 1) some file data, 2) some > +# change of the file data, creates a diff and commit of the changes and > passes > +# that through diff-highlight. > +# The optional 3rd parameter is the expected

Re: [PATCH] diff-highlight: add some tests.

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 01:44:28PM -0700, Junio C Hamano wrote: > Brian Henderson writes: > > > Junio, how does this look? > > ... > > +# dh_test is a test helper function which takes 1) some file data, 2) some > > +# change of the file data, creates a diff and commit of

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 01:31:27PM -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > From: Jacob Keller > > > > Add an empty_tree_oid object which can be used in place of > > EMPTY_TREE_SHA1_BIN_LITERAL for code which is being converted

Re: [PATCH v3 1/3] diff-highlight: add some tests.

2016-08-19 Thread Eric Wong
Brian Henderson wrote: > On Fri, Aug 19, 2016 at 11:10:55AM -0700, Junio C Hamano wrote: > > > > > +# vim: set noet > > > > We tend to avoid cluttering the source with editor specific insns > > like this. > > oops. > > Anyone have any suggestions for project level vim

[PATCH v13 08/13] bisect--helper: `is_expected_rev` & `check_expected_revs` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement `is_expected_rev` & `check_expected_revs` shell function in C and add a `--check-expected-revs` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--check-expected-revs` subcommand is a temporary measure to port shell functions to C so as to use the existing

[PATCH v13 09/13] bisect--helper: `bisect_write` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement the `bisect_write` shell function in C and add a `bisect-write` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--bisect-write` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions are ported,

[PATCH v13 12/13] bisect--helper: `get_terms` & `bisect_terms` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement the `get_terms` and `bisect_terms` shell function in C and add `bisect-terms` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `--bisect-terms` subcommand is a temporary measure to port shell function in C so as to use the existing test suite. As more functions

[PATCH v13 11/13] bisect--helper: `bisect_next_check` & bisect_voc shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement `bisect_next_check` shell function in C and add `bisect-next-check` subcommand to `git bisect--helper` to call it from git-bisect.sh . Also reimplement `bisect_voc` shell function in C and call it from `bisect_next_check` implementation in C. Using `--bisect-next-check` is a

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 1:06 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> diff --git a/path.c b/path.c >> index 17551c483476..0cb30123e988 100644 >> --- a/path.c >> +++ b/path.c >> @@ -482,6 +482,11 @@ static void do_submodule_path(struct

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > Is there a reason for that? I've found that .field = value is safer > because it ensures that you don't end up initializing the wrong > values? Or is it a compatibility thing? Yes. -- To unsubscribe from this list: send the line "unsubscribe git"

[PATCH v13 01/13] bisect--helper: use OPT_CMDMODE instead of OPT_BOOL

2016-08-19 Thread Pranit Bauva
`--next-all` is meant to be used as a subcommand to support multiple "operation mode" though the current implementation does not contain any other subcommand along side with `--next-all` but further commits will include some more subcommands. Helped-by: Johannes Schindelin

[PATCH v13 07/13] bisect--helper: `bisect_reset` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement `bisect_reset` shell function in C and add a `--bisect-reset` subcommand to `git bisect--helper` to call it from git-bisect.sh . Using `bisect_reset` subcommand is a temporary measure to port shell functions to C so as to use the existing test suite. As more functions are ported, this

Re: [PATCH] diff-highlight: add some tests.

2016-08-19 Thread Junio C Hamano
Brian Henderson writes: > Junio, how does this look? > ... > +# dh_test is a test helper function which takes 1) some file data, 2) some > +# change of the file data, creates a diff and commit of the changes and > passes > +# that through diff-highlight. > +# The

[PATCH v13 13/13] bisect--helper: `bisect_start` shell function partially in C

2016-08-19 Thread Pranit Bauva
Reimplement the `bisect_start` shell function partially in C and add `bisect-start` subcommand to `git bisect--helper` to call it from git-bisect.sh . The last part is not converted because it calls another shell function. `bisect_start` shell function will be completed after the `bisect_next`

[PATCH v13 02/13] bisect: rewrite `check_term_format` shell function in C

2016-08-19 Thread Pranit Bauva
Reimplement the `check_term_format` shell function in C and add a `--check-term-format` subcommand to `git bisect--helper` to call it from git-bisect.sh Using `--check-term-format` subcommand is a temporary measure to port shell function to C so as to use the existing test suite. As more

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 1:31 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> From: Jacob Keller >> >> Add an empty_tree_oid object which can be used in place of >> EMPTY_TREE_SHA1_BIN_LITERAL for code which is being

Re: [PATCH v8 6/8] submodule: refactor show_submodule_summary with helper function

2016-08-19 Thread Jacob Keller
On Fri, Aug 19, 2016 at 1:24 PM, Junio C Hamano wrote: > And probably merge_bases also leaks here. > > It is not cheap to compute merge bases, but show_submodule_summary() > makes two calls to get_merge_bases(), one in show_submodule_header() > and then another inside

Re: [PATCH v8 7/8] cache: add empty_tree_oid object

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > Add an empty_tree_oid object which can be used in place of > EMPTY_TREE_SHA1_BIN_LITERAL for code which is being converted to struct > object_id. How widely do you envision the users of this symbol

Re: [PATCH v8 6/8] submodule: refactor show_submodule_summary with helper function

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > @@ -290,12 +289,6 @@ static int prepare_submodule_summary(struct rev_info > *rev, const char *path, > add_pending_object(rev, >object, path); > add_pending_object(rev, >object, path); > merge_bases = get_merge_bases(left,

[PATCH] diff-highlight: add some tests.

2016-08-19 Thread Brian Henderson
Junio, how does this look? Signed-off-by: Brian Henderson --- contrib/diff-highlight/Makefile | 5 + contrib/diff-highlight/t/Makefile| 22 contrib/diff-highlight/t/t9400-diff-highlight.sh | 122 +++ 3 files

Re: [PATCH v8 5/8] submodule: convert show_submodule_summary to use struct object_id *

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > Since we're going to be changing this function in a future patch, lets > go ahead and convert this to use object_id now. > > Signed-off-by: Jacob Keller > --- Sounds good.

Re: [PATCH v8 4/8] submodule: allow add_submodule_odb to work even if path is not checked out

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > diff --git a/path.c b/path.c > index 17551c483476..0cb30123e988 100644 > --- a/path.c > +++ b/path.c > @@ -482,6 +482,11 @@ static void do_submodule_path(struct strbuf *buf, const > char *path, > strbuf_reset(buf); >

Re: [PATCH v8 3/8] diff: prepare for additional submodule formats

2016-08-19 Thread Junio C Hamano
Jacob Keller writes: > +enum diff_submodule_format { > + DIFF_SUBMODULE_SHORT = 0, > + DIFF_SUBMODULE_LOG, > +}; Unlike definition of an array elements, enum {} did not allow trailing comma until recent versions of C, and we avoid it. No need to resend only to

Re: [PATCH v3 1/3] diff-highlight: add some tests.

2016-08-19 Thread Brian Henderson
On Fri, Aug 19, 2016 at 11:10:55AM -0700, Junio C Hamano wrote: > > > +# vim: set noet > > We tend to avoid cluttering the source with editor specific insns > like this. oops. Anyone have any suggestions for project level vim settings? -- To unsubscribe from this list: send the line

Re: git format-patch --break-rewrites broken in 2.9.3

2016-08-19 Thread Andreas Schwab
On Aug 19 2016, "Philip Oakley" wrote: > On Thu, Aug 18, 2016 at 04:44:21PM +0200, Olaf Hering wrote: > >> This command used to create a diff which can be consumed by patch. But >> at least with 2.9.3 it just gives a rename output: >> >> git format-patch \ >>

Re: [PATCH v3 3/3] diff-highlight: add support for --graph output.

2016-08-19 Thread Junio C Hamano
Brian Henderson writes: > diff --git a/contrib/diff-highlight/t/t9400-diff-highlight.sh > b/contrib/diff-highlight/t/t9400-diff-highlight.sh > index 3b3c831..b88174e 100755 > --- a/contrib/diff-highlight/t/t9400-diff-highlight.sh > +++

Re: [PATCH v3 2/3] diff-highlight: add failing test for handling --graph output.

2016-08-19 Thread Junio C Hamano
Brian Henderson writes: > Signed-off-by: Brian Henderson > --- > contrib/diff-highlight/t/t9400-diff-highlight.sh | 54 > > 1 file changed, 54 insertions(+) > > diff --git

Re: [PATCH v3 1/3] diff-highlight: add some tests.

2016-08-19 Thread Junio C Hamano
> +# dh_test is a test helper function which takes 1) some file data, 2) some > +# change of the file data, creates a diff and commit of the changes and > passes > +# that through diff-highlight. The optional 3rd parameter is the expected > +# output of diff-highlight minus the diff/commit

Re: git format-patch --break-rewrites broken in 2.9.3

2016-08-19 Thread Philip Oakley
On Thu, Aug 18, 2016 at 04:44:21PM +0200, Olaf Hering wrote: This command used to create a diff which can be consumed by patch. But at least with 2.9.3 it just gives a rename output: git format-patch \ --no-signature \ --stdout \ --break-rewrites \

[PATCH v3 3/3] diff-highlight: add support for --graph output.

2016-08-19 Thread Brian Henderson
Signed-off-by: Brian Henderson --- contrib/diff-highlight/diff-highlight| 19 +-- contrib/diff-highlight/t/t9400-diff-highlight.sh | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/contrib/diff-highlight/diff-highlight

[PATCH v3 2/3] diff-highlight: add failing test for handling --graph output.

2016-08-19 Thread Brian Henderson
Signed-off-by: Brian Henderson --- contrib/diff-highlight/t/t9400-diff-highlight.sh | 54 1 file changed, 54 insertions(+) diff --git a/contrib/diff-highlight/t/t9400-diff-highlight.sh b/contrib/diff-highlight/t/t9400-diff-highlight.sh index

[PATCH v3 0/3] diff-highlight: add support for git log --graph output.

2016-08-19 Thread Brian Henderson
I cleaned up the graph test, hopefully it's better. Brian Henderson (3): diff-highlight: add some tests. diff-highlight: add failing test for handling --graph output. diff-highlight: add support for --graph output. contrib/diff-highlight/Makefile | 5 +

[PATCH v3 1/3] diff-highlight: add some tests.

2016-08-19 Thread Brian Henderson
Signed-off-by: Brian Henderson --- contrib/diff-highlight/Makefile | 5 + contrib/diff-highlight/t/Makefile| 22 contrib/diff-highlight/t/t9400-diff-highlight.sh | 150 +++ 3 files changed, 177 insertions(+)

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Stefan Beller
It was not my intend to start this discussion again with my initial email. I rather wanted to point out how I make progress in doing my own tooling. I mean if email works well for Junio (both as a maintainer as well as a contributor) and Jeff as a contributor, then I can adapt my workflow to

Re: [PATCH v1 0/1] Rename NotNormalized (NNO) into CRLF in index

2016-08-19 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > Here comes the promised cleanup of t0027: > - The wording NNO is removed and replaced by CRI > - No code changes > - Needs to go on top of next or pu or tb/t0027-raciness-fix > Torsten Bögershausen (1): > t0027: Rename

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Junio C Hamano
Jeff King writes: >> Sorry, Torsten, this is not my doing. So I cannot explain why it is not an >> enum. >> >> I *guess* the rationale for 'c' being the cmdmode of --textconv is "c for >> convert". That is why I chose "w as in worktree" as new cmdmode. > > I think it started as a

Re: [PATCH 3/4] cat-file --textconv/--filters: allow specifying the path separately

2016-08-19 Thread Junio C Hamano
Johannes Schindelin writes: >> I think I saw some code to ensure "when giving this option you need >> that option in effect, too"; they should be tested here, too, no? > > No, I would rather not test for that. These conditionals are purely for > any user's

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Junio C Hamano
Johannes Schindelin writes: >> Does it make sense to be more specific here: >> The order of conversion is >> - ident >> - CRLF >> - smudge > > I do not think it makes sense to complexify the documentation in that > manner. Right. -- To unsubscribe from this list:

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Junio C Hamano
Johannes Schindelin writes: > Actually, I find it much harder to debug these "the output must match > these precise bytes, else we fail" type of test cases. Instead, I describe > in a natural way what is expected: > > ! has_cr actual > > Now, when the test

Re: [PATCH 2/2] mingw: ensure temporary file handles are not inherited by child processes

2016-08-19 Thread Junio C Hamano
Eric Wong writes: > I'd be more comfortable keeping the EINVAL check that got > snipped in your reply. O_CLOEXEC can be defined to non-zero in > new userspace headers, but an older kernel chokes on it with > EINVAL. Good point. Thanks. -- To unsubscribe from this list: send

Re: [PATCH 1/2] help: introduce option --command-only

2016-08-19 Thread Junio C Hamano
Johannes Schindelin writes: > - configure help.format = html (for "man", the current code would always > add $(prefix)/share/man to the MANPATH when testing, not what we want, > and hacking this code *just* for testing is both ugly and unnecessary). A very

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Johannes Schindelin
Hi Eric, On Thu, 18 Aug 2016, Eric Wong wrote: > Johannes Schindelin wrote: > > > Old dogs claim the mail list-approach works for them. Nope. Doesn't. > > Else you would not have written all those custom scripts. > > git and cogito started as a bunch of custom

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Johannes Schindelin
Hi, On Thu, 18 Aug 2016, Junio C Hamano wrote: > Eric Wong writes: > > > unsubscribe: meta+unsubscr...@public-inbox.org > > Did you mean this, really? FWIW I do not see this line in my original mail from Eric. Ciao, Dscho -- To unsubscribe from this list: send the line

Re: [PATCH v2 1/3] diff-highlight: add some tests.

2016-08-19 Thread Brian Henderson
On Fri, Aug 19, 2016 at 10:51:23AM -0400, Jeff King wrote: > On Fri, Aug 19, 2016 at 07:42:35AM -0700, Brian Henderson wrote: > > > > > +# PERL is required, but assumed to be present, although not > > > > necessarily modern > > > > +# some tests require 5.8 > > > > +test_expect_success PERL

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 02:25:51PM +0200, Johannes Schindelin wrote: > > On Thu, Aug 18, 2016 at 02:46:28PM +0200, Johannes Schindelin wrote: > > > diff --git a/builtin/cat-file.c b/builtin/cat-file.c > > > index 5ff58b3..5f91cf4 100644 > > > --- a/builtin/cat-file.c > > > +++

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-19 Thread Jeff King
On Thu, Aug 18, 2016 at 02:42:34PM +0200, Johannes Schindelin wrote: > BTW I take this thread as yet another proof that people are unhappy with > mail list-based review: if you have to build *that much* tooling around it > (and Peff & Junio certainly have a megaton of advanced and sophisticated >

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Johannes Schindelin
Hi Torsten, On Fri, 19 Aug 2016, Torsten Bögershausen wrote: > On Thu, Aug 18, 2016 at 02:46:17PM +0200, Johannes Schindelin wrote: > > > +--filters:: > > + Show the content as transformed by the filters configured in > > Minor comment: > s/transformed/converted/ ? Sure. > Does it make

Re: [PATCH v2 1/3] diff-highlight: add some tests.

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 07:42:35AM -0700, Brian Henderson wrote: > > > +# PERL is required, but assumed to be present, although not necessarily > > > modern > > > +# some tests require 5.8 > > > +test_expect_success PERL 'name' 'true' > > > > If the platform lacks PERL prerequisite, this will

Re: [PATCH 3/4] cat-file --textconv/--filters: allow specifying the path separately

2016-08-19 Thread Johannes Schindelin
Hi Junio, On Thu, 18 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > There are circumstances when it is relatively easy to figure out the > > object name for a given path, but not the revision. For example, when > > revision of the containing

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 02:59:32PM +0200, Johannes Schindelin wrote: > > The only thing that somewhat is worrysome is what would happen to > > %(rest). > > What would happen is that it would print out the path, as it is exactly > that "rest" field that is used in the implementation, piggybacking

Re: [PATCH v2 3/3] diff-highlight: add support for --graph output.

2016-08-19 Thread Jeff King
On Wed, Aug 17, 2016 at 08:31:24AM -0700, Brian Henderson wrote: > contrib/diff-highlight/diff-highlight | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) Junio already commented on the tests, and I think everything he said in his review is sensible. As for the code

Re: [PATCH v2 1/3] diff-highlight: add some tests.

2016-08-19 Thread Brian Henderson
On Wed, Aug 17, 2016 at 12:09:25PM -0700, Junio C Hamano wrote: > Brian Henderson writes: > > > + > > +# PERL is required, but assumed to be present, although not necessarily > > modern > > +# some tests require 5.8 > > +test_expect_success PERL 'name' 'true' > > If

Re: [PATCH v4] config: add conditional include

2016-08-19 Thread Jeff King
On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: > Ping.. There was some discussion after v4. I think the open issues are: - the commit message is rather terse (it should describe motivation, and can refer to the docs for the "how") - the syntax might be more clear as:

Re: upload-pack/ls-remote: showing non-HEAD symbolic refs?

2016-08-19 Thread Jeff King
On Tue, Aug 16, 2016 at 03:24:14PM -0700, Josh Triplett wrote: > > But if we had a real full-duplex connection over https, I think there > > would be no reason for git:// to continue existing (we'd probably keep > > ssh as it's a useful protocol for authentication, though). > > Agreed. > >

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Jeff King
On Fri, Aug 19, 2016 at 03:09:19PM +0200, Johannes Schindelin wrote: > > The object name can have spaces in it, too. E.g.: > > > > HEAD:path with spaces > > > > or even: > > > > :/grep for this > > > > (as was pointed out to me when I tried to turn on %(rest) handling by > > default, long

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Johannes Schindelin
Hi Junio, On Thu, 18 Aug 2016, Junio C Hamano wrote: > Jeff King writes: > > > On Thu, Aug 18, 2016 at 02:46:28PM +0200, Johannes Schindelin wrote: > > > >> With this patch, --batch can be combined with --textconv or --filters. > >> For this to work, the input needs to have the

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Johannes Schindelin
Hi Peff, On Thu, 18 Aug 2016, Jeff King wrote: > On Thu, Aug 18, 2016 at 02:46:28PM +0200, Johannes Schindelin wrote: > > > With this patch, --batch can be combined with --textconv or --filters. > > For this to work, the input needs to have the form > > > > > > > > so that the filters

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Johannes Schindelin
Hi Junio, On Thu, 18 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > With this patch, --batch can be combined with --textconv or --filters. > > For this to work, the input needs to have the form > > > > > > > > so that the filters can be

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Johannes Schindelin
Hi Junio, On Thu, 18 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > As suggested by its name, the --filters option applies the filters > > that are currently configured for the specified path. > > > > [...] > > I think you can lose the last

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Johannes Schindelin
Hi Torsten, On Thu, 18 Aug 2016, Torsten Bögershausen wrote: > On Thu, Aug 18, 2016 at 02:46:17PM +0200, Johannes Schindelin wrote: > > As suggested by its name, the --filters option applies the filters > > [] > > diff --git a/t/t8010-cat-file-filters.sh b/t/t8010-cat-file-filters.sh > > Does

Re: [PATCH 4/4] cat-file: support --textconv/--filters in batch mode

2016-08-19 Thread Johannes Schindelin
Hi Torsten, On Thu, 18 Aug 2016, Torsten Bögershausen wrote: > On Thu, Aug 18, 2016 at 02:46:28PM +0200, Johannes Schindelin wrote: > > diff --git a/builtin/cat-file.c b/builtin/cat-file.c > > index 5ff58b3..5f91cf4 100644 > > --- a/builtin/cat-file.c > > +++ b/builtin/cat-file.c > > @@ -17,6

[PATCH v1 0/1] Rename NotNormalized (NNO) into CRLF in index

2016-08-19 Thread tboegi
From: Torsten Bögershausen Here comes the promised cleanup of t0027: - The wording NNO is removed and replaced by CRI - No code changes - Needs to go on top of next or pu or tb/t0027-raciness-fix Torsten Bögershausen (1): t0027: Rename NotNormalized (NNO) into CRLF in index

[PATCH v1 1/1] t0027: Rename NotNormalized (NNO) into CRLF in index

2016-08-19 Thread tboegi
From: Torsten Bögershausen Originally NNO stands for content, that had been commited "Not NOrmalized", in other words files with CRLF in the index. Make more clear what should be tested: - commit a file with CRLF into the index - Change the content in the working tree - Run "git

Re: [PATCH 2/4] cat-file: introduce the --filters option

2016-08-19 Thread Torsten Bögershausen
[] On Thu, Aug 18, 2016 at 02:46:17PM +0200, Johannes Schindelin wrote: > diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt > index 071029b..7d48735 100644 > --- a/Documentation/git-cat-file.txt > +++ b/Documentation/git-cat-file.txt > @@ -9,15 +9,15 @@ git-cat-file -

[PATCH] Revert "display HTML in default browser using Windows' shell API"

2016-08-19 Thread Johannes Schindelin
Since 4804aab (help (Windows): Display HTML in default browser using Windows' shell API, 2008-07-13), Git for Windows used to call `ShellExecute()` to launch the default Windows handler for `.html` files. The idea was to avoid going through a shell script, for performance reasons. However, this

Re: [PATCH 1/2] help: introduce option --command-only

2016-08-19 Thread Johannes Schindelin
Hi Ralf, On Thu, 18 Aug 2016, Ralf Thielow wrote: > diff --git a/t/t0012-help.sh b/t/t0012-help.sh > new file mode 100755 > index 000..e20f907 > --- /dev/null > +++ b/t/t0012-help.sh > @@ -0,0 +1,21 @@ > +#!/bin/sh > + > +test_description='help' > + > +. ./test-lib.sh > + >

  1   2   >