Re: bug: Directory replaced by submodule -> checkout fails

2019-10-18 Thread Thomas Braun
Am 18.10.2019 um 01:07 schrieb Christopher Collins: Hi Christopher, > ### Reproduce:> > > git clone g...@github.com:JuulLabs-OSS/mcuboot.git > cd mcuboot > git submodule init > git submodule update > git checkout ae01f153b11637feaedbc9d9042172fba2e080c0 > > ### Discussion: > > In the above seq

Re: [PATCH 1/1] doc(stash): clarify the description of `save`

2019-10-10 Thread Thomas Gummerer
On 10/10, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > The original phrasing of this paragraph made at least one person stumble > over the word "from" (thinking that it was a typo and "from" was > intended), and other readers chimed in, agreeing that it was confusin

[PATCH v2] range-diff: don't segfault with mode-only changes

2019-10-08 Thread Thomas Gummerer
ng and completing of the struct into the 'parse_git_diff_header' function, so other callers can take advantage of it. This fixes the segfault in 'git range-diff'. Reported-by: Uwe Kleine-König Signed-off-by: Thomas Gummerer --- Thanks Junio and Dscho for your reviews. I decided to l

Re: [PATCH v3 00/13] ci: include a Visual Studio build & test in our Azure Pipeline

2019-10-07 Thread Thomas Gummerer
On 10/07, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Date: Fri, 04 Oct 2019 08:09:25 -0700 (PDT) > > [...] > > X-Google-Original-Date: Fri, 04 Oct 2019 15:09:10 GMT > > [...] > > > > I am fairly certain that the latter is the actual `Date:` line sent to > > GMail,

Re: Regression in v2.23

2019-10-07 Thread Thomas Gummerer
ff-mode-only-change --- >8 --- Subject: [PATCH] range-diff: don't segfault with mode-only changes If we don't have a new file, deleted file or renamed file in a diff, we currently add 'patch.new_name' to the range-diff header. This works well for files that are changed. H

Re: Bi-Weekly Standup - Time/timezone in calendar?

2019-09-30 Thread Thomas Gummerer
On 09/28, Junio C Hamano wrote: > Thomas Gummerer writes: > > >> I thought it was to be 1700 UTC, which currently is 1800 BST her in UK, and > >> 1900 CST in Europe. > > > > That's my recollection as well, and what the calendar should say. > > Thank

Re: [git issue] git am failed for patches of converting the format of source codes from dos to unix

2019-09-27 Thread Thomas Gummerer
On 09/27, Beyondhorizon Zheng wrote: > [git issue] git am failed for patches of converting the file format of > source codes from dos to unix > > Git version: git version 2.23.0 > Host PC: ubuntu 16.04.10 > Reporter: Shuang Zheng > > I have submitted a patch which convert the file format of sourc

[PATCH 1/1] git-gui (Windows): use git-bash.exe if it is available

2019-09-26 Thread Thomas Klaeger via GitGitGadget
From: Thomas Klaeger Git for Windows 2.x ships with an executable that starts the Git Bash with all the environment variables and what not properly set up. It is also adjusted according to the Terminal emulator option chosen when installing Git for Windows (while `bash.exe --login -i` would

Re: Bi-Weekly Standup - Time/timezone in calendar?

2019-09-25 Thread Thomas Gummerer
On 09/25, Philip Oakley wrote: > Hi, > > At the Virtual Git Contributors Summit we discussed (#13) the bi-weekly > standup meetings (mentioned in the Git Rev News edition 55 under > 'News/Various'). > > The Git Events calendar [1] that's linked from the Rev News doesn't actually > say what time z

Re: [PATCH] add a Code of Conduct document

2019-09-24 Thread Thomas Gummerer
On 09/24, Jeff King wrote: > We've never had a formally written Code of Conduct document. Though it > has been discussed off and on over the years, for the most part the > behavior on the mailing list has been good enough that nobody felt the > need to push one forward. > > However, even if there

Re: What's cooking in git.git (Sep 2019, #02; Wed, 18)

2019-09-19 Thread Thomas Gummerer
On 09/18, Junio C Hamano wrote: > * tg/stash-refresh-index (2019-09-05) 3 commits > - stash: make sure to write refreshed cache > - merge: use refresh_and_write_cache > - factor out refresh_and_write_cache function > > "git stash" learned to write refreshed index back to disk. > > Needs coor

Re: Git standup on IRC

2019-09-16 Thread Thomas Gummerer
On 09/16, Jonathan Nieder wrote: > > (In case it was not clear: those standups are meant to offer a really > > informal venue to talk about patches you are working (or planning to > > work) on, _especially_ for people who feel intimidated by this here > > mailing list...) &

[PATCH v4 2/3] merge: use refresh_and_write_cache

2019-09-11 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

[PATCH v4 1/3] factor out refresh_and_write_cache function

2019-09-11 Thread Thomas Gummerer
Helped-by: Martin Ågren Helped-by: Johannes Schindelin Signed-off-by: Thomas Gummerer --- builtin/am.c | 16 ++-- cache.h | 18 ++ read-cache.c | 21 + 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/builtin/am.c b/builtin/

[PATCH v4 3/3] stash: make sure to write refreshed cache

2019-09-11 Thread Thomas Gummerer
written somewhere else already. Reported-by: Jeff King Signed-off-by: Thomas Gummerer --- builtin/stash.c | 11 +++ t/t3903-stash.sh | 16 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index b5a301f24d..ab30d1e920

[PATCH v4 0/3] make sure stash refreshes the index properly

2019-09-11 Thread Thomas Gummerer
istinction. +Helped-by: Martin Ågren +Helped-by: Johannes Schindelin Signed-off-by: Thomas Gummerer ## builtin/am.c ## @@ builtin/am.c: static void am_run(struct am_state *state, int resume) unlink(am_path(state, "dirtyindex")); - ref

Re: [PATCH v3 1/3] factor out refresh_and_write_cache function

2019-09-11 Thread Thomas Gummerer
On 09/11, Johannes Schindelin wrote: > Hi Thomas, > > On Fri, 6 Sep 2019, Thomas Gummerer wrote: > > Oops, I didn't realize there was another series in flight that also > > introduces 'repo_refresh_and_write_index'. Probably should have done > > a

Re: [PATCH v3 1/3] factor out refresh_and_write_cache function

2019-09-06 Thread Thomas Gummerer
On 09/05, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Getting the lock for the index, refreshing it and then writing it is a > > pattern that happens more than once throughout the codebase, and isn't > > trivial to get right. Factor out the refresh_and_

[PATCH v3 2/3] merge: use refresh_and_write_cache

2019-09-03 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

[PATCH v3 3/3] stash: make sure to write refreshed cache

2019-09-03 Thread Thomas Gummerer
written somewhere else already. Reported-by: Jeff King Signed-off-by: Thomas Gummerer --- builtin/stash.c | 11 +++ t/t3903-stash.sh | 16 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index b5a301f24d..da1260ca8e

[PATCH v3 0/3] make sure stash refreshes the index properly

2019-09-03 Thread Thomas Gummerer
if (write_locked_index(repo->index, &lock_file, COMMIT_LOCK | write_flags)) + return -1; + return 0; 2: 148a65d649 = 2: 0367d938b1 merge: use refresh_and_write_cache 3: e0f6815192 = 3: 8ed3df9fec stash: make sure to write refreshed cache Thomas Gummerer (3): factor out ref

[PATCH v3 1/3] factor out refresh_and_write_cache function

2019-09-03 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer --- builtin/am.c | 16 ++-- cache.h | 16 read-cache.c | 19 +++ 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index 1aea657a7f..ddedd2b9d4 100644 --- a/builtin/am.c +++

[PATCH] push: disallow --all and refspecs when remote..mirror is set

2019-09-02 Thread Thomas Gummerer
f appropriate) before checking for compatibility of the various options. *1*: https://twitter.com/FiloSottile/status/1163918701462249472 Reported-by: Filippo Valsorda Helped-by: Saleem Rashid Signed-off-by: Thomas Gummerer --- builtin/push.c | 69 ++-

Re: [PATCH v2 1/3] factor out refresh_and_write_cache function

2019-09-02 Thread Thomas Gummerer
On 08/30, Junio C Hamano wrote: > Martin Ågren writes: > > > There's a difference in behavior that I'm not sure about: We used > > to ignore the return value of `refresh_cache()`, i.e. we didn't care > > whether it had any errors. I have no idea whether that's safe to do -- > > especially as we g

Re: git range-diff throws Segmentation fault

2019-08-30 Thread Thomas Gummerer
On 08/30, van den Berg, Kasper wrote: > Hello, > > `git range-diff ` prints "segmentation fault" to > the console and nothing else. It happens in git version > 2.23.0.windows.1 and only occurs for some branches in my repository. > I have not exactly determined when it does happen and when it does

[PATCH v2 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
different error codes for failing to refresh the cache, and failing to write the index. The current caller only cares about failing to write the index. However for other callers we're going to convert in subsequent patches we will need this distinction. Signed-off-by: Thomas Gum

[PATCH v2 3/3] stash: make sure to write refreshed cache

2019-08-29 Thread Thomas Gummerer
written somewhere else already. Reported-by: Jeff King Signed-off-by: Thomas Gummerer --- builtin/stash.c | 11 +++ t/t3903-stash.sh | 16 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index b5a301f24d..da1260ca8e

[PATCH v2 0/3] make sure stash refreshes the index properly

2019-08-29 Thread Thomas Gummerer
ruct pathspec *ps, const char } - if (refresh_cache(REFRESH_QUIET)) { -+ if (refresh_and_write_cache(REFRESH_QUIET, COMMIT_LOCK)) { ++ if (refresh_and_write_cache(REFRESH_QUIET, 0)) { ret = -1; goto done; } Thomas Gumm

[PATCH v2 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

Re: [PATCH 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:15, Thomas Gummerer wrote: > > > struct lock_file lock = LOCK_INIT; > > const char *head_arg = "HEAD"; > > > > - hold_locked_index(&lock, LOCK_DIE_ON_ERROR); > > -

Re: [PATCH 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:14, Thomas Gummerer wrote: > > > > Getting the lock for the index, refreshing it and then writing it is a > > pattern that happens more than once throughout the codebase. Factor > > out the refresh_and_write_

[PATCH 3/3] stash: make sure to write refreshed cache

2019-08-27 Thread Thomas Gummerer
written somewhere else already. Reported-by: Jeff King Signed-off-by: Thomas Gummerer --- builtin/stash.c | 11 +++ t/t3903-stash.sh | 16 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/builtin/stash.c b/builtin/stash.c index b5a301f24d..b36aada644

[PATCH 0/3] make sure stash refreshes the index properly

2019-08-27 Thread Thomas Gummerer
hich is what the shell script did. The first patch is a small refactoring that makes the actual fix a bit easier, while the second patch is a cleanup that I found while there. Thomas Gummerer (3): factor out refresh_and_write_cache function merge: use refresh_and_write_cache sta

[PATCH 1/3] factor out refresh_and_write_cache function

2019-08-27 Thread Thomas Gummerer
different error codes for failing to refresh the cache, and failing to write the index. The current caller only cares about failing to write the index. However for other callers we're going to convert in subsequent patches we will need this distinction. Signed-off-by: Thomas Gum

[PATCH 2/3] merge: use refresh_and_write_cache

2019-08-27 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git

[PATCH v2] t0021: make sure clean filter runs

2019-08-22 Thread Thomas Gummerer
ating the mtime of test.r, so git is forced to check the contents of the file, and the clean filter is run as the test expects. Signed-off-by: Thomas Gummerer --- v2 adds the comment as suggested by Szeder. Junio: I saw this is marked as "merged to 'next'" in the What's

Re: [PATCH] t0021: make sure clean filter runs

2019-08-22 Thread Thomas Gummerer
On 08/22, SZEDER Gábor wrote: > On Wed, Aug 21, 2019 at 08:23:23PM +0200, Johannes Sixt wrote: > > Am 21.08.19 um 16:56 schrieb Thomas Gummerer: > > > On 08/20, Johannes Sixt wrote: > > >> Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > > >>>

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Thomas Gummerer
On 08/20, Johannes Sixt wrote: > Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > > Fix the test by updating the mtime of test.r, ... > > > diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh > > index e10f5f787f..66f75005d5 100755 > > --- a/t/t0021-c

Re: [PATCH] t0021: make sure clean filter runs

2019-08-21 Thread Thomas Gummerer
On 08/20, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Fix the test by updating the mtime of test.r, so git is forced to > > check the contents of the file, and the clean filter is run as the > > test expects. > > Hmph, depending on the timestamp granular

[PATCH] t0021: make sure clean filter runs

2019-08-19 Thread Thomas Gummerer
ating the mtime of test.r, so git is forced to check the contents of the file, and the clean filter is run as the test expects. Signed-off-by: Thomas Gummerer --- t/t0021-conversion.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index e10f5f7

[PATCH v2] stash: fix handling removed files with --keep-index

2019-07-16 Thread Thomas Gummerer
that behaviour by using 'git checkout' in no-overlay mode which can faithfully restore the index and working tree. This also simplifies the code. Note that this will overwrite untracked files if the untracked file has the same name as a file that has been deleted in the index. Signed

Re: [PATCH] stash: fix handling removed files with --keep-index

2019-07-16 Thread Thomas Gummerer
On 07/11, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Fix that behaviour by using 'git restore' which can faithfully restore > > the index and working tree. This also simplifies the code. > > Hmph. I would have preferred to see we stayed away fr

[PATCH] stash: fix handling removed files with --keep-index

2019-07-11 Thread Thomas Gummerer
tree. This also simplifies the code. Note that this will overwrite untracked files if the untracked file has the same name as a file that has been deleted in the index. Signed-off-by: Thomas Gummerer --- builtin/stash.c | 34 ++ t/t3903-stash.sh | 7 +++ 2 f

[PATCH v4 11/14] range-diff: suppress line count in outer diff

2019-07-11 Thread Thomas Gummerer
e going to add some more contextual information such as the filename corresponding to the diff to the hunk headers. Remove the unnecessary information, and just keep the "@@" to indicate that a new hunk of the outer diff is starting. Signed-off-by: Thomas Gummerer --- diff.c

[PATCH v4 14/14] range-diff: add headers to the outer hunk header

2019-07-11 Thread Thomas Gummerer
while previously it would have only been @@ which doesn't give a lot of context for the change that follows. For completeness also add section headers for the commit metadata and the commit message, although they are arguably less important. Signed-off-by: Thomas Gummerer --- ra

[PATCH v4 12/14] range-diff: add section header instead of diff header

2019-07-11 Thread Thomas Gummerer
d be easier to understand. Additionally, this allows us to add these range diff section headers to the outer diffs hunk headers using a custom userdiff pattern, which should help making the range-diff more readable. Signed-off-by: Thomas Gummerer --- range-diff.c | 34 t/

[PATCH v4 10/14] range-diff: don't remove funcname from inner diff

2019-07-11 Thread Thomas Gummerer
that it is not guaranteed that the hunk header actually shows up in the range-diff, and this change only aims to improve the case where a hunk header would already be included in the final output. Signed-off-by: Thomas Gummerer --- range-diff.c | 7 --- t/t3206-range-diff.sh

[PATCH v4 13/14] range-diff: add filename to inner diff

2019-07-11 Thread Thomas Gummerer
ers. This also allows us to add the filename + the funcname to the outer diffs hunk headers using a custom userdiff pattern, which will be done in the next commit. Signed-off-by: Thomas Gummerer --- range-diff.c | 15 +-- t/t3206-range-diff.sh | 16 ++-- 2 files c

[PATCH v4 07/14] apply: make parse_git_diff_header public

2019-07-11 Thread Thomas Gummerer
ut a diff header and not just any header. Signed-off-by: Thomas Gummerer --- apply.c | 69 - apply.h | 48 +++ 2 files changed, 67 insertions(+), 50 deletions(-) diff --git a/apply.c b/apply.c index 034

[PATCH v4 06/14] apply: only pass required data to gitdiff_* functions

2019-07-11 Thread Thomas Gummerer
ons are called in a loop using their function pointers, each function needs to be passed all the parameters even if only one of the functions actually needs it. We therefore pass this data along in a struct to avoid adding too many unused parameters to each function and making the code

[PATCH v4 08/14] range-diff: fix function parameter indentation

2019-07-11 Thread Thomas Gummerer
Fix the indentation of the function parameters for a couple of functions, to match the style in the rest of the file. Signed-off-by: Thomas Gummerer --- range-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/range-diff.c b/range-diff.c index 48b0e1b4ce..9242b8975f

[PATCH v4 09/14] range-diff: split lines manually

2019-07-11 Thread Thomas Gummerer
#x27;t use strbufs. This doesn't match with how we do the line-by-line processing in range-diff currently. Switch range-diff to do our own line by line parsing, so we can re-use the 'parse_git_diff_header()' function later. Signed-off-by:

[PATCH v4 05/14] apply: only pass required data to find_name_*

2019-07-11 Thread Thomas Gummerer
bsequent commit. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take argument

[PATCH v4 04/14] apply: only pass required data to check_header_line

2019-07-11 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v4 03/14] apply: only pass required data to git_header_name

2019-07-11 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gum

[PATCH v4 02/14] apply: only pass required data to skip_tree_prefix

2019-07-11 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v4 01/14] apply: replace marc.info link with public-inbox

2019-07-11 Thread Thomas Gummerer
public-inbox.org links include the whole message ID by default. This means the message can still be found even if the site goes away, which is not the case with the marc.info link. Replace the marc.info link with a more future proof one. Signed-off-by: Thomas Gummerer --- apply.c | 2 +- 1

[PATCH v4 00/14] output improvements for git range-diff

2019-07-11 Thread Thomas Gummerer
29912-1-t.gumme...@gmail.com/ Thomas Gummerer (14): apply: replace marc.info link with public-inbox apply: only pass required data to skip_tree_prefix apply: only pass required data to git_header_name apply: only pass required data to check_header_line apply: only pass required data to find_name_

Re: [PATCH v3 07/14] apply: make parse_git_header public

2019-07-10 Thread Thomas Gummerer
On 07/09, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Maybe it would be even better to name it 'struct gitdiff_data', as > > it's really only used for those few functions? > > Is it really the case where "these three are only used by the

Re: [PATCH v3 07/14] apply: make parse_git_header public

2019-07-09 Thread Thomas Gummerer
On 07/09, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Make parse_git_header a "public" function in apply.h, so we can re-use > > it in range-diff in a subsequent commit. Eek, I just noticed that I forgot updating the name here. This and the Subject shoul

[PATCH v3 08/14] range-diff: fix function parameter indentation

2019-07-08 Thread Thomas Gummerer
Fix the indentation of the function parameters for a couple of functions, to match the style in the rest of the file. Signed-off-by: Thomas Gummerer --- range-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/range-diff.c b/range-diff.c index 48b0e1b4ce..9242b8975f

[PATCH v3 05/14] apply: only pass required data to find_name_*

2019-07-08 Thread Thomas Gummerer
bsequent commit. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take argument

[PATCH v3 07/14] apply: make parse_git_header public

2019-07-08 Thread Thomas Gummerer
Make parse_git_header a "public" function in apply.h, so we can re-use it in range-diff in a subsequent commit. Signed-off-by: Thomas Gummerer --- apply.c | 69 - apply.h | 48 +++ 2 files c

[PATCH v3 06/14] apply: only pass required data to gitdiff_* functions

2019-07-08 Thread Thomas Gummerer
ons are called in a loop using their function pointers, each function needs to be passed all the parameters even if only one of the functions actually needs it. We therefore pass this data along in a struct to avoid adding too many unused parameters to each function and making the code

[PATCH v3 11/14] range-diff: suppress line count in outer diff

2019-07-08 Thread Thomas Gummerer
e going to add some more contextual information such as the filename corresponding to the diff to the hunk headers. Remove the unnecessary information, and just keep the "@@" to indicate that a new hunk of the outer diff is starting. Signed-off-by: Thomas Gummerer --- diff.c

[PATCH v3 12/14] range-diff: add section header instead of diff header

2019-07-08 Thread Thomas Gummerer
d be easier to understand. Additionally, this allows us to add these range diff section headers to the outer diffs hunk headers using a custom userdiff pattern, which should help making the range-diff more readable. Signed-off-by: Thomas Gummerer --- range-diff.c | 34 t/

[PATCH v3 09/14] range-diff: split lines manually

2019-07-08 Thread Thomas Gummerer
#x27;t use strbufs. This doesn't match with how we do the line-by-line processing in range-diff currently. Switch range-diff to do our own line by line parsing, so we can re-use the 'parse_git_diff_header()' function later. Signed-off-by:

[PATCH v3 14/14] range-diff: add headers to the outer hunk header

2019-07-08 Thread Thomas Gummerer
while previously it would have only been @@ which doesn't give a lot of context for the change that follows. For completeness also add section headers for the commit metadata and the commit message, although they are arguably less important. Signed-off-by: Thomas Gummerer --- ra

[PATCH v3 13/14] range-diff: add filename to inner diff

2019-07-08 Thread Thomas Gummerer
ers. This also allows us to add the filename + the funcname to the outer diffs hunk headers using a custom userdiff pattern, which will be done in the next commit. Signed-off-by: Thomas Gummerer --- range-diff.c | 15 +-- t/t3206-range-diff.sh | 16 ++-- 2 files c

[PATCH v3 10/14] range-diff: don't remove funcname from inner diff

2019-07-08 Thread Thomas Gummerer
that it is not guaranteed that the hunk header actually shows up in the range-diff, and this change only aims to improve the case where a hunk header would already be included in the final output. Signed-off-by: Thomas Gummerer --- range-diff.c | 7 --- t/t3206-range-diff.sh

[PATCH v3 03/14] apply: only pass required data to git_header_name

2019-07-08 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gum

[PATCH v3 04/14] apply: only pass required data to check_header_line

2019-07-08 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v3 02/14] apply: only pass required data to skip_tree_prefix

2019-07-08 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v3 01/14] apply: replace marc.info link with public-inbox

2019-07-08 Thread Thomas Gummerer
public-inbox.org links include the whole message ID by default. This means the message can still be found even if the site goes away, which is not the case with the marc.info link. Replace the marc.info link with a more future proof one. Signed-off-by: Thomas Gummerer --- apply.c | 2 +- 1

[PATCH v3 00/14] output improvements for git range-diff

2019-07-08 Thread Thomas Gummerer
d in 09/14 - be less strict about parsing hunk headers, so the new code isn't more strict than it was before - give more information when we are unable to parse the git diff header [1]: https://public-inbox.org/git/20190705170630.27500-1-t.gumme...@gmail.com/ Thomas Gummerer (14):

Re: [PATCH v2 12/14] range-diff: add section header instead of diff header

2019-07-08 Thread Thomas Gummerer
didn't because that's much less likely to change between different versions of a patch series. > > */ > > continue; > > else if (line[0] == '>') { > > diff --git a/t/t3206-range-diff.sh b/t/t3206-ran

Re: [PATCH v2 00/14] output improvements for git range-diff

2019-07-08 Thread Thomas Gummerer
On 07/05, Johannes Schindelin wrote: > Hi Thomas, > > On Fri, 5 Jul 2019, Thomas Gummerer wrote: > > > It's been quite a while since I sent the RFC [1] (thanks all for the > > comments on that), and the series changed shapes quite a bit since the > > last ro

Re: [PATCH v2 09/14] range-diff: split lines manually

2019-07-08 Thread Thomas Gummerer
On 07/05, Johannes Schindelin wrote: > Hi Thomas, > > > On Fri, 5 Jul 2019, Thomas Gummerer wrote: > > > Currently range-diff uses the 'strbuf_getline()' function for doing > > its line by line processing. In a future patch we want to do parts of > &g

[PATCH v2 10/14] range-diff: don't remove funcname from inner diff

2019-07-05 Thread Thomas Gummerer
that it is not guaranteed that the hunk header actually shows up in the range-diff, and this change only aims to improve the case where a hunk header would already be included in the final output. Signed-off-by: Thomas Gummerer --- range-diff.c | 8 +--- t/t3206-range-diff.sh

[PATCH v2 03/14] apply: only pass required data to git_header_name

2019-07-05 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gum

[PATCH v2 05/14] apply: only pass required data to find_name_*

2019-07-05 Thread Thomas Gummerer
bsequent commit. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take argument

[PATCH v2 04/14] apply: only pass required data to check_header_line

2019-07-05 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v2 14/14] range-diff: add headers to the outer hunk header

2019-07-05 Thread Thomas Gummerer
while previously it would have only been @@ which doesn't give a lot of context for the change that follows. For completeness also add section headers for the commit metadata and the commit message, although they are arguably less important. Signed-off-by: Thomas Gummerer --- ra

[PATCH v2 01/14] apply: replace marc.info link with public-inbox

2019-07-05 Thread Thomas Gummerer
public-inbox.org links include the whole message ID by default. This means the message can still be found even if the site goes away, which is not the case with the marc.info link. Replace the marc.info link with a more future proof one. Signed-off-by: Thomas Gummerer --- apply.c | 2 +- 1

[PATCH v2 08/14] range-diff: fix function parameter indentation

2019-07-05 Thread Thomas Gummerer
Fix the indentation of the function parameters for a couple of functions, to match the style in the rest of the file. Signed-off-by: Thomas Gummerer --- range-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/range-diff.c b/range-diff.c index 48b0e1b4ce..9242b8975f

[PATCH v2 09/14] range-diff: split lines manually

2019-07-05 Thread Thomas Gummerer
27;t use strbufs. Switch range-diff to do our own line by line parsing, so we can re-use the parse_git_header function later. Signed-off-by: Thomas Gummerer --- Longer term it might be better to have both range-diff and apply code use strbufs. However I didn't feel it's worth makin

[PATCH v2 02/14] apply: only pass required data to skip_tree_prefix

2019-07-05 Thread Thomas Gummerer
. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. Signed-off-by: Thomas Gumme

[PATCH v2 00/14] output improvements for git range-diff

2019-07-05 Thread Thomas Gummerer
-- range-diff: add section header instead of diff header -: -- > 11: 69654fe76d range-diff: suppress line count in outer diff -: -- > 12: c38f929b9a range-diff: add section header instead of diff header -: -- > 13: 6df03ecdcf range-diff: add filename to inn

[PATCH v2 12/14] range-diff: add section header instead of diff header

2019-07-05 Thread Thomas Gummerer
d be easier to understand. Additionaly, this allows us to add these range diff section headers to the outer diffs hunk headers using a custom userdiff pattern, which should help making the range-diff more readable. Signed-off-by: Thomas Gummerer --- range-diff.c | 35 t/

[PATCH v2 06/14] apply: only pass required data to gitdiff_* functions

2019-07-05 Thread Thomas Gummerer
bsequent commit. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they rea

[PATCH v2 13/14] range-diff: add filename to inner diff

2019-07-05 Thread Thomas Gummerer
ers. This also allows us to add the filename + the funcname to the outer diffs hunk headers using a custom userdiff pattern, which will be done in the next commit. Signed-off-by: Thomas Gummerer --- range-diff.c | 14 -- t/t3206-range-diff.sh | 16 ++-- 2 files c

[PATCH v2 07/14] apply: make parse_git_header public

2019-07-05 Thread Thomas Gummerer
Make parse_git_header a "public" function in apply.h, so we can re-use it in range-diff in a subsequent commit. Signed-off-by: Thomas Gummerer --- I considered creating a separate struct for only the metadata here, and embedding that in 'struct patch'. As struct patch is mo

[PATCH v2 11/14] range-diff: suppress line count in outer diff

2019-07-05 Thread Thomas Gummerer
e going to add some more contextual information such as the filename corresponding to the diff to the hunk headers. Remove the unnecessary information, and just keep the "@@" to indicate that a new hunk of the outer diff is starting. Signed-off-by: Thomas Gummerer --- diff.c

Re: [PATCH 2/2] ci: disable Homebrew's auto cleanup

2019-07-03 Thread Thomas Braun
Am 03.07.2019 um 12:47 schrieb SZEDER Gábor: > Lately Homebrew learned to automagically clean up information about > outdated packages during other 'brew' commands, which might be useful > for the avarage user, but is a waste of time in CI build jobs, because > the next build jobs will start from t

Re: What's cooking in git.git (Jun 2019, #06; Wed, 26)

2019-06-28 Thread Thomas Gummerer
On 06/26, Junio C Hamano wrote: > * ra/cherry-pick-revert-skip (2019-06-24) 6 commits > - cherry-pick/revert: advise using --skip > - cherry-pick/revert: add --skip option > - sequencer: use argv_array in reset_merge > - sequencer: rename reset_for_rollback to reset_merge > - sequencer: add ad

Re: [PATCH] doc: fix form -> from typo

2019-06-26 Thread Thomas Gummerer
On 06/25, Martin Ågren wrote: > Hi Catalin > > Welcome to the list! > > On Tue, 25 Jun 2019 at 09:43, Catalin Criste wrote: > > > @@ -88,7 +88,7 @@ save [-p|--patch] [-k|--[no-]keep-index] > > [-u|--include-untracked] [-a|--all] [-q > > > > This option is deprecated in favour of 'git s

Why is part of push origin output written to stderr?

2019-06-25 Thread Thomas Hruska
or but I could be very wrong. Maybe git is trying to tell me that pushing is actually a mistake. -- Thomas Hruska CubicleSoft President http://cubiclesoft.com/

Re: [PATCH v2 00/10] Add 'ls-files --debug-json' to dump the index in json

2019-06-25 Thread Thomas Gummerer
On 06/25, Duy Nguyen wrote: > On Tue, Jun 25, 2019 at 1:00 AM Johannes Schindelin > wrote: > > especially when we offer this as a better way > > for 3rd-party applications to interact with Git (which I think will be the > > use case for this feature that will be _far_ more common than using it for

Re: [GSoC][PATCH v7 1/6] advice: add sequencerInUse config variable

2019-06-25 Thread Thomas Gummerer
On 06/24, Rohit Ashiwal wrote: > Calls to advise() which are not guarded by advice.* config variables > are "bad" as they do not let the user say, "I've learned this part > of Git enough, please don't tell me what to do verbosely.". Add a > configuration variable "sequencerInUse" which controls whe

Re: [PATCH v2 01/10] ls-files: add --json to dump the index

2019-06-25 Thread Thomas Gummerer
On 06/24, Nguyễn Thái Ngọc Duy wrote: > So far we don't have a command to basically dump the index file out, > with all its glory details. Checking some info, for example, stat > time, usually involves either writing new code or firing up "xxd" and > decoding values by yourself. > > This --json is

  1   2   3   4   5   6   7   8   9   10   >