From: "Michal Suchánek" <msuchanek@suse.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: git crash in range-diff
Date: Wed, 2 Oct 2019 16:16:15 +0200 [thread overview]
Message-ID: <20191002141615.GB17916@kitsune.suse.cz> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1910021129010.46@tvgsbejvaqbjf.bet>
On Wed, Oct 02, 2019 at 11:41:53AM +0200, Johannes Schindelin wrote:
> Hi Michal,
>
> On Wed, 2 Oct 2019, Michal Suchánek wrote:
>
> > I get a crash in range-diff. It used to work in the past but I don't use
> > it often so can't really say if this is a regression or a particular
> > data triggering the crash.
>
> It would always be helpful to add a Minimal, Complete & Verifiable
> Example with your bug reports. If that is too much of a burden ;-) at
> least try to give a Complete & Verifiable Example.
It is not always clear what the minimal and verifiable example is. So I
sent the report in case somebody can see something obviously broken try
to suggest such examples, etc.
>
> And indeed, when I look at the variable `line`:
>
> > ws_rule = 0, lines_added = 0, lines_deleted = 0, score = 0, extension_linenr = 0, is_toplevel_relative = 0, inaccurate_eof = 0,
> > is_binary = 0, is_copy = 0, is_rename = 0, recount = 0, conflicted_threeway = 0, direct_to_threeway = 0, crlf_in_old = 0,
> > fragments = 0x0, result = 0x0, resultsize = 0, old_oid_prefix = "c452d7c1308d", '\000' <repeats 52 times>,
> > new_oid_prefix = "dd7b242a4c00", '\000' <repeats 52 times>, next = 0x0, threeway_stage = {{hash = '\000' <repeats 31 times>}, {
> > hash = '\000' <repeats 31 times>}, {hash = '\000' <repeats 31 times>}}}
> > root = {alloc = 0, len = 0, buf = 0x555555a64920 <strbuf_slopbuf> ""}
> > linenr = 4
> > p = <optimized out>
> > cp = {argv = 0x555555a6a390, args = {argv = 0x555555a6a390, argc = 12, alloc = 24}, env_array = {
> > argv = 0x555555a2f760 <empty_argv>, argc = 0, alloc = 0}, pid = 3068, trace2_child_id = 0, trace2_child_us_start = 0,
> > trace2_child_class = 0x0, trace2_hook_name = 0x0, in = 0, out = 3, err = 0, dir = 0x0, env = 0x555555a2f760 <empty_argv>,
> > no_stdin = 1, no_stdout = 0, no_stderr = 0, git_cmd = 1, silent_exec_failure = 0, stdout_to_stderr = 0, use_shell = 0,
> > clean_on_exit = 0, wait_after_clean = 0, clean_on_exit_handler = 0x0, clean_on_exit_handler_cbdata = 0x0}
> > buf = {alloc = 6816, len = 5924,
> > buf = 0x555555a864c0 " ## Metadata ##\nAuthor: Michal Suchanek <msuchanek@suse.de>\n\n ## Commit message ##\n Refresh sorted section.\n\n - Refresh patches.suse/powerpc-dump-kernel-log-before-carrying-out-fadump-o.patch wi"...}
> > contents = {alloc = 947512, len = 679767, buf = 0x7ffff7e69010 "commit 999192044274522b2d5820f40cd1a7436cce31b9"}
> > util = 0x555555a6a600
> > in_header = 0
> > line = 0x7ffff7e6aea0 "diff --git series.conf series.conf\nindex c452d7c1308d..dd7b242a4c00 100644\n--- series.conf\n+++ series.conf\n@@ -47,17 +47,14 @@\n#\t", '#' <repeats 56 times>, "\n#\t# sorted pat"...
> ^^^^^^^^^^^ ^^^^^^^^^^^
>
> I see that neither old nor new name start with the expected `a/` and
> `b/`, respectively. But that `1` that was passed to
> `parse_git_diff_header()` is the `p_value`, i.e. the number of leading
> directories to strip from the file names.
>
> And when there is nothing to strip, but it was told to strip something,
> I guess `parse_git_diff_header()` just ignores it and leaves `new_name`
> unassigned.
>
> So here is how you can chase this down further:
>
> - Why are those `a/` and `b/` prefixes missing? They should not be
> missing, they should be generated by default,
Unless you change the default so you get sane filenames (without those
crazy useless prefixes) that you can cut and paste into a text editor. I
even tried to link a and b to . so I can access the files with the
filenames git gives by default but then git fails miserably.
> and `range-diff` expects
> them.
So it should set up the configuration so that it gets them.
>
> Probably some funny config setting in your setup, something that
> should probably be explicitly overridden by the `range-diff` machinery
> when generating those patches that are then fed into `read_patches()`.
So the minimal verifiable example is I suppose
diff.noprefix=true
Thanks
Michal
prev parent reply other threads:[~2019-10-02 14:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 8:21 git crash in range-diff Michal Suchánek
2019-10-02 9:41 ` Johannes Schindelin
2019-10-02 14:16 ` Michal Suchánek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191002141615.GB17916@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).