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

2016-08-23 Thread Jacob Keller
On Tue, Aug 23, 2016 at 2:21 PM, Junio C Hamano wrote: > Junio C Hamano writes: >>> total = nr; >>> -if (!keep_subject && auto_number && total > 1) >>> +if (!keep_subject && auto_number && (total > 1 || cover_letter)) >>> numbered =

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

2016-08-23 Thread Jacob Keller
On Tue, Aug 23, 2016 at 9:33 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> Change the default behavior of git-format-patch to generate numbered >&

Re: [PATCH v10 0/9] submodule inline diff format

2016-08-23 Thread Jacob Keller
On Mon, Aug 22, 2016 at 6:00 PM, Stefan Beller <sbel...@google.com> wrote: > On Mon, Aug 22, 2016 at 4:43 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> A few suggestions from Stefan in regards

Re: [PATCH v10 1/9] Git 2.10-rc1

2016-08-23 Thread Jacob Keller
On Mon, Aug 22, 2016 at 5:28 PM, Stefan Beller <sbel...@google.com> wrote: > On Mon, Aug 22, 2016 at 4:43 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: > > Bad rebase? Ya not sure what happened here. Will find out tomorrow. Thanks, Jake -- To unsubscribe from

[PATCH v10 5/9] diff: prepare for additional submodule formats

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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. Sign

[PATCH v10 7/9] submodule: convert show_submodule_summary to use struct object_id *

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 <jacob.kel...@gmail.com> --- diff.c | 2 +- submodule.c | 16 subm

[PATCH v10 6/9] allow do_submodule_path to work even if submodule isn't checked out

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Currently, do_submodule_path will attempt locating the .git directory by using read_gitfile on /.git. If this fails it just assumes the /.git is actually a git directory. This is good because it allows for handling submodules which were

[PATCH v10 9/9] diff: teach diff to display submodule difference with an inline diff

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

[PATCH v10 2/9] cache: add empty_tree_oid object and helper function

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_tre

[PATCH v10 4/9] graph: add support for --line-prefix on all graph-aware output

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 grap

[PATCH v10 3/9] diff.c: remove output_prefix_length field

2016-08-22 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 v10 8/9] submodule: refactor show_submodule_summary with helper function

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_

[PATCH v10 0/9] submodule inline diff format

2016-08-22 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> A few suggestions from Stefan in regards to falling back to .git/modules/ being a bad idea. I've chosen I think to avoid using die() as we just stick with the current path if we can't find its name. I think this should be safe since we alre

[PATCH v10 1/9] Git 2.10-rc1

2016-08-22 Thread Jacob Keller
From: Junio C Hamano Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.10.0.txt | 31 +++ GIT-VERSION-GEN | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git

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

2016-08-20 Thread Jacob Keller
On Fri, Aug 19, 2016 at 7:33 PM, Junio C Hamano wrote: > 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

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

2016-08-20 Thread Jacob Keller
On Fri, Aug 19, 2016 at 5:02 PM, Stefan Beller <sbel...@google.com> wrote: > On Fri, Aug 19, 2016 at 4:34 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> - strbuf_git_path(buf, "%s/%s", "modules", path); >> +

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

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 v9 7/8] submodule: refactor show_submodule_summary with helper function

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_

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

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

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

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 <jacob.kel...@gmail.com> --- diff.c | 2 +- submodule.c | 16 subm

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

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_tre

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

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 grap

[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 <jacob.kel...@gmail.com> 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. Sign

[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 <jacob.kel...@gmail.com> 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

[PATCH v9 0/8] submodule show inline diff

2016-08-19 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

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 <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> Is there a way to do this lookup? I couldn't find it. > > Perhaps submodule_from_path(), that is used to implement "git > submodul

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 <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> diff --git a/diff.h b/diff.h >> index ea5aba668eaa..192c0eedd0ff 100644 >> --- a/diff.h >> +++ b/diff.h >> @@

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 <gits...@pobox.com> wrote: > Junio C Hamano <gits...@pobox.com> writes: > >> Jacob Keller <jacob.kel...@gmail.com> writes: >> >>> Is there a reason for that? I've found that .field = value is safer

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 <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> 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

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 <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> diff --git a/path.c b/path.c >> index 17551c483476..0cb30123e988 100644 >> --- a/path.c >> +++ b/path.c >> @@ -482,6

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 <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> Add an empty_tree_oid object which can be used in place of >> EMP

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 v7 5/7] submodule: correct output of submodule log format

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 11:25 AM, Stefan Beller <sbel...@google.com> wrote: > On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> The submodule log diff ou

Re: [PATCH v7 6/7] submodule: refactor show_submodule_summary with helper function

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 12:04 PM, Stefan Beller <sbel...@google.com> wrote: > On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> + if (is_null_sha1(one)) >> + message = "(new submodule)&quo

Re: [PATCH v7 7/7] diff: teach diff to display submodule difference with an inline diff

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 12:47 PM, Stefan Beller <sbel...@google.com> wrote: > On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: > > > >> if (o->submodule_format == DIFF_SUBMODULE_LOG && >>

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 <jacob.kel...@gmail.com> --- diff.c | 2 +- submodule.c | 16 subm

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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. Signed-off-by: Jacob Keller <jacob.kel...@gmail.com> --- cache.h | 2 ++ sha1_file.c | 3

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 grap

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

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_

[PATCH v8 1/8] diff.c: remove output_prefix_length field

2016-08-18 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 v8 3/8] diff: prepare for additional submodule formats

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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. Sign

[PATCH v8 0/8] submodule show inline diff

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> v8 has changes suggested by Junio and Stefan Beller, as well as a few modifications of my own, plus more tests. Series interdiff of v7 and v8: diff --git c/builtin/rev-list.c w/builtin/rev-list.c index 1a75a83538f4..21cde8dd6b31 100644 --- c/b

Re: [PATCH v7 4/7] submodule: allow do_submodule_path to work if given gitdir directly

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 11:46 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> Currently, do_submodule_path relies on read_gitfile, which will die() if &

Re: [PATCH v7 2/7] graph: add support for --line-prefix on all graph-aware output

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 10:56 AM, Stefan Beller <sbel...@google.com> wrote: > On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> - if (!graph) >> + if (!graph) { >> + graph_show_line_prefix(d

Re: [PATCH v7 6/7] submodule: refactor show_submodule_summary with helper function

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 1:49 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >>>>> If we were to change those, we could discuss if we want to go with >>>>> full sentences >>>>> all

Re: [PATCH v7 6/7] submodule: refactor show_submodule_summary with helper function

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 1:39 PM, Stefan Beller <sbel...@google.com> wrote: > On Thu, Aug 18, 2016 at 1:24 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: >> On Thu, Aug 18, 2016 at 12:04 PM, Stefan Beller <sbel...@google.com> wrote: >>> On Wed, Aug 17, 2016 a

Re: [PATCH v7 2/7] graph: add support for --line-prefix on all graph-aware output

2016-08-18 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> On Thu, Aug 18, 2016 at 10:56 AM, Stefan Beller <sbel...@google.com> wrote: > On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.kel...@intel.com> > wrote: >> From: Jacob

Re: [PATCH v7 6/7] submodule: refactor show_submodule_summary with helper function

2016-08-18 Thread Jacob Keller
On Thu, Aug 18, 2016 at 12:00 AM, David Aguilar wrote: >> +void show_submodule_summary(FILE *f, const char *path, >> + const char *line_prefix, >> + unsigned char one[20], unsigned char two[20], >> + unsigned dirty_submodule, const char *meta,

Re: Working from different machines.

2016-08-18 Thread Jacob Keller
On Wed, Aug 17, 2016 at 3:41 PM, Junio C Hamano wrote: > If the answer is "yes", then you are in the problem space that > Git-the-tool is interested in solving. Assuming that you have > network connection into 'desktop' from 'home', the solution would > involve making it the

[PATCH v7 2/7] graph: add support for --line-prefix on all graph-aware output

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 grap

[PATCH v7 4/7] submodule: allow do_submodule_path to work if given gitdir directly

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Currently, do_submodule_path relies on read_gitfile, which will die() if it can't read from the specified gitfile. Unfortunately, this means that do_submodule_path will not work when given the path to a submodule which is checked out di

[PATCH v7 5/7] submodule: correct output of submodule log format

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> The submodule log diff output incorrectly states that the submodule is "not checked out" in cases where it wants to say the submodule is "not initialized". Change the wording to reflect the actual check being performed. S

[PATCH v7 3/7] diff: prepare for additional submodule formats

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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. Sign

[PATCH v7 0/7] implement inline submodule diff format

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> As suggested by Junio, I broke this patch into several pieces, and made a common helper function for the submodule header. Note that there are a couple of complicated modifications to the submodule header portion which (should) still result in th

[PATCH v7 1/7] diff.c: remove output_prefix_length field

2016-08-17 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 v7 7/7] diff: teach diff to display submodule difference with an inline diff

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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

[PATCH v7 6/7] submodule: refactor show_submodule_summary with helper function

2016-08-17 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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_

Re: Working with zip files

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 2:14 PM, Nikolaus Rath wrote: > On Aug 16 2016, David Lang wrote: >> On Tue, 16 Aug 2016, Nikolaus Rath wrote: >> >>> I would like to store Simulink models in a Git >>> repository. Unfortunately, the file format is binary. But luckily,

Re: [PATCH v6 3/3] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 2:14 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >>>> + >>>> + if (dirty_submodule & DIRTY_SUBMODULE_MODIFIED) { >>>> + /* >>>> +

Re: [PATCH v6 2/3] graph: add support for --line-prefix on all graph-aware output

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 11:22 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> To make this work, we have to fix a few bugs in the graph API that force >> graph_show_commit_msg to be used only when you have a va

Re: [PATCH v6 3/3] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 11:48 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt >> index d5a5b17d5088..f5d693afad6c 100644 >> --- a/Do

Re: [PATCH v6 1/3] diff.c: remove output_prefix_length field

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 11:03 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Junio C Hamano <gits...@pobox.com> > > Thanks. I had quite a many typoes in this one. > > > No need to resend;

Re: Credential helpers processing order

2016-08-16 Thread Jacob Keller
On Tue, Aug 16, 2016 at 8:13 AM, Dmitry Neverov wrote: > Hi, > > I wonder why credential helpers are called in the order: system, > global, local, command-line and not in the reverse order? This make it > impossible to provide a custom helper and disable default ones via

Re: storing cover letter of a patch series?

2016-08-16 Thread Jacob Keller
On Mon, Aug 15, 2016 at 11:45 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Tue, Aug 16, 2016 at 12:26 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: >>>> They can just add "squash! cover! " commits for that ;-) Though >>>> more >>>

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 8:45 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Tue, Aug 16, 2016 at 3:46 AM, Philip Oakley <philipoak...@iee.org> wrote: >> From: "Jacob Keller" <jacob.kel...@gmail.com> >> [nip] >>>> >>>> >>&g

Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 8:37 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> I will look more into how to do the log version tomorrow, if I am >> still stuck I will re-work the patches as you suggest here. >&

[PATCH v6 1/3] diff.c: remove output_prefix_length field

2016-08-15 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 v6 2/3] graph: add support for --line-prefix on all graph-aware output

2016-08-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> 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 grap

[PATCH v6 3/3] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Teach git-diff and friends a new format for displaying the difference of a submodule using git-diff inside the submodule project. This allows users to easily see exactly what source changed in a given commit that updates the submodule pointer.

[PATCH v6 0/3] Add support for displaying submodules as a proper diff

2016-08-15 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> This patch series adds support for displaying a submodule as a difference between the pre and post commits. This allows projects who frequently update submodule contents to view the submodule in the log as if it were just one squashed

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 1:38 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> Some people have suggested this simple idea, and I like it, but they >> did mention that modifying the cover letter now requires a reba

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 5:37 AM, Philip Oakley wrote: > [sorry if this is not the right place to 'drop in'..] > I appreciate there has been a lot of discussion, but it mainly appears to be > about an upstream / integration viewpoint. > > I'd hate it if there was a one size

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Sun, Aug 14, 2016 at 11:49 PM, Stefan Beller <sbel...@google.com> wrote: > On Sun, Aug 14, 2016 at 11:38 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: >> On Sun, Aug 14, 2016 at 11:28 PM, Stefan Beller <sbel...@google.com> wrote: >>> I would imagine

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Sun, Aug 14, 2016 at 11:28 PM, Stefan Beller wrote: > I would imagine this is similar to the pull requests on the linux > mailing list, i.e. > how it is with merges. Back in the time we did not open the editor for you to > talk about the merge you just did, and then we

Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-14 Thread Jacob Keller
On Sun, Aug 14, 2016 at 2:21 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.kel...@gmail.com> writes: > >> On Fri, Aug 12, 2016 at 2:58 PM, Junio C Hamano <gits...@pobox.com> wrote: >>> On Fri, Aug 12, 2016 at 2:43 PM, Jacob Keller <j

Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs

2016-08-14 Thread Jacob Keller
On Sat, Aug 13, 2016 at 8:59 AM, Junio C Hamano wrote: > Jeff King writes: > >> So assuming everything I just said isn't complete bollocks, I think we >> can move to a future where nobody uses the compaction heuristic. And >> there are three ways to deal with

Re: storing cover letter of a patch series?

2016-08-14 Thread Jacob Keller
On Sat, Aug 13, 2016 at 1:49 AM, Duy Nguyen wrote: > On Tue, Aug 9, 2016 at 12:27 AM, Stefan Beller wrote: >> is what you want. Maybe we want to see a patch that adds the reverse >> functionality as well, i.e. git-am will store the the cover letter as the

Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-12 Thread Jacob Keller
On Fri, Aug 12, 2016 at 2:21 PM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Fri, Aug 12, 2016 at 2:15 PM, Junio C Hamano <gits...@pobox.com> wrote: >> Otherwise, a "git log --graph -p --submodule=log-with-diff", when >> showing a commit in the sup

Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-12 Thread Jacob Keller
On Fri, Aug 12, 2016 at 2:15 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> The prefix shall come first prior to any other prefix associated with >> the --graph option or other source. >> >> Add test

Re: `git stash --help` tries to pull up nonexistent file gitstack.html

2016-08-12 Thread Jacob Keller
On Fri, Aug 12, 2016 at 9:25 AM, Junio C Hamano wrote: > On Fri, Aug 12, 2016 at 9:15 AM, Joseph Musser wrote: >> Oh, I'm embarrassed. The typo was mine, I must have typed `git stack >> --help`. I would have expected a syntax error message or "did you >> mean"

[PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-11 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Add an option to pass additional prefix to be displayed before diff output. This feature will be used in a following patch to output correct --graph prefix when using a child_process/run_command interface for submodules. The prefix shall come

[PATCH v5 3/3] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-11 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Teach git-diff and friends a new format for displaying the difference of a submodule using git-diff inside the submodule project. This allows users to easily see exactly what source changed in a given commit that updates the submodule pointer.

[PATCH v5 1/3] diff.c: remove output_prefix_length field

2016-08-11 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

Re: [PATCH v4 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-11 Thread Jacob Keller
On Thu, Aug 11, 2016 at 10:53 AM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> From: Jacob Keller <jacob.kel...@gmail.com> >> >> Teach git-diff and friends a new format for displaying the differen

Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-11 Thread Jacob Keller
On Thu, Aug 11, 2016 at 10:22 AM, Junio C Hamano wrote: > -- >8 -- > Subject: diff.c: remove output_prefix_length field > > "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

Re: Can cc's be included in patches sent by send-email

2016-08-11 Thread Jacob Keller
On Thu, Aug 11, 2016 at 12:58 AM, Jacob Keller <jacob.kel...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 12:32 AM, Philip Oakley <philipoak...@iee.org> wrote: >> While 'git send-email' can have multiple --cc="addressee" options on the >> command line, is it

Re: Can cc's be included in patches sent by send-email

2016-08-11 Thread Jacob Keller
On Thu, Aug 11, 2016 at 12:32 AM, Philip Oakley wrote: > While 'git send-email' can have multiple --cc="addressee" options on the > command line, is it possible for the "cc:addressee" to actually be > included in the patches that are to be sent, so that different

[PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> This will be used by a future patch which implements a diff mode for submodule display. Without this, the diff output would incorrectly display when using both -p and --graph during a git-log. Note that the --line-prefix will be displayed first

[PATCH v4 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> Teach git-diff and friends a new format for displaying the difference of a submodule using git-diff inside the submodule project. This allows users to easily see exactly what source changed in a given commit that updates the submodule pointer.

Re: [PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 2:58 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> As suggested by Junio, I implemented --line-prefix to enable the graph >> display correctly. This works by a neat trick of adding to t

Re: [PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 2:58 PM, Junio C Hamano wrote: > You might be envisioning a future enhancement where the recursive > one uses not "-Submodule commit A"/"-Submodule commit B", and not > "diff A B", but "log -p A...B" in the submodule, and in such a case, > it might make

Re: [PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Wed, Aug 10, 2016 at 3:05 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: > >> @@ -2305,6 +2311,15 @@ static void builtin_diff(const char *name_a, >> struct strbuf header = STRBUF_INIT; >> const ch

[PATCH v3 1/2] diff: add --line-prefix option for passing in a prefix

2016-08-10 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> This will be used by a future patch which implements a diff mode for submodule display. Without this, the diff output would incorrectly display when using both -p and --graph during a git-log. Signed-off-by: Jacob Keller <jacob.kel...@

[PATCH v3 2/2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> For projects which have frequent updates to submodules it is often useful to be able to see a submodule update commit as a difference. Teach diff's --submodule= a new "diff" format which will execute a diff for the submodule between

Re: [PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Tue, Aug 9, 2016 at 5:53 PM, Stefan Beller wrote: > This is not used any more, but the child is run directly below? > unsigned char one[20], unsigned char two[20]) >> +{ > Yea I meant to take it all out and forgot. Will be gone in v3. > > This pattern seems

Re: [PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Jacob Keller
On Tue, Aug 9, 2016 at 8:37 PM, Junio C Hamano <gits...@pobox.com> wrote: > Jacob Keller <jacob.e.kel...@intel.com> writes: >> + cp.dir = path; >> + cp.out = -1; >> + cp.no_stdin = 1; >> + argv_array_push(, "diff"); >&

[PATCH RFC v2] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-09 Thread Jacob Keller
From: Jacob Keller <jacob.kel...@gmail.com> For projects which have frequent updates to submodules it is often useful to be able to see a submodule update commit as a difference. Teach diff's --submodule= a new "diff" format which will execute a diff for the submodule between

<    2   3   4   5   6   7   8   9   10   11   >