From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Prathamesh Chavan <pc44800@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Christian Couder <christian.couder@gmail.com>
Subject: Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C
Date: Tue, 18 Jul 2017 15:44:18 -0700 [thread overview]
Message-ID: <CAGZ79kYDD076Xbrh19nTPd4DiTsGvO0Zm=P8W-Zv1GFvp9XQOg@mail.gmail.com> (raw)
In-Reply-To: <xmqqmv81ml4i.fsf@gitster.mtv.corp.google.com>
On Tue, Jul 18, 2017 at 3:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>>> + if (!lstat(list_item->name, &st) && !ce_match_stat(list_item, &st, 0)) {
>>> + print_status(info, ' ', list_item->name, sub_sha1, displaypath);
>>
>> The question from the last round still stands
>> https://public-inbox.org/git/CAGZ79kb18z5zc9iu3Vv5aVZWJmoZzmwbMVpy89VC-t-ei2M+bw@mail.gmail.com/
>>
>> I am not an expert in the diff area and wonder how
>> the cmd_diff_files functionality is achieved with just a stat call
>> and then comparing it to ce_match_stat. 'Using "dirty" ignores
>> all changes to the work tree of submodules, only changes to the
>> commits stored in the superproject are shown.' So I'd have
>> expected ce->oid to be compared (is there an index entry differing,
>> i.e. more than one stage?)
>
> ce_match_stat() calls into ce_compare_gitlink() for a 160000 entry,
> which would resolve HEAD ref there and compares ce->oid with it.
Oh in that case this should be fine, as in the original we did
"git diff-files --ignore-submodules=dirty <path>",
which did precisely that.
> But as you said, this is probably insufficient to emulate the
> original. Shouldn't it call into run_diff_files(), which is the
> in-core way to run the equivalent of "diff-files"?
Oh, your comment in [1] was related to cmd_diff_files,
which is more complicated than run_diff_files?
run_diff_files also iterates over all cache entries.
I think we need to be looking at match_stat_with_submodule
to figure out what we need to do.
[1] https://public-inbox.org/git/xmqq60fdoyyt.fsf@gitster.mtv.corp.google.com/
next prev parent reply other threads:[~2017-07-18 22:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 20:48 [GSoC][PATCH 0/8] Update: Week 9 Prathamesh Chavan
2017-07-18 20:48 ` [GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath() Prathamesh Chavan
2017-07-18 20:48 ` [GSoC][PATCH 2/8] submodule--helper: introduce for_each_submodule_list() Prathamesh Chavan
2017-07-18 20:48 ` [GSoC][PATCH 3/8] submodule: port set_name_rev() from shell to C Prathamesh Chavan
2017-07-18 20:49 ` [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' " Prathamesh Chavan
2017-07-18 21:39 ` Stefan Beller
2017-07-18 22:32 ` Junio C Hamano
2017-07-18 22:44 ` Stefan Beller [this message]
2017-07-18 22:47 ` Junio C Hamano
2017-07-18 20:49 ` [GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' " Prathamesh Chavan
2017-07-18 22:23 ` Stefan Beller
2017-07-20 19:36 ` Prathamesh Chavan
2017-07-20 19:57 ` Stefan Beller
2017-07-18 20:49 ` [GSoC][PATCH 6/8] submodule: port submodule subcommand 'deinit' " Prathamesh Chavan
2017-07-19 14:04 ` Christian Couder
2017-07-18 20:49 ` [GSoC][PATCH 7/8] diff: change scope of the function count_lines() Prathamesh Chavan
2017-07-18 20:49 ` [GSoC][PATCH 8/8] submodule: port submodule subcommand 'summary' from shell to C Prathamesh Chavan
2017-07-19 14:53 ` Christian Couder
-- strict thread matches above, loose matches on Subject: below --
2017-07-10 22:45 [GSoC] Update: Week 8 Prathamesh Chavan
2017-07-10 22:54 ` [GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath() Prathamesh Chavan
2017-07-10 22:54 ` [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C Prathamesh Chavan
2017-07-10 23:38 ` Brandon Williams
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='CAGZ79kYDD076Xbrh19nTPd4DiTsGvO0Zm=P8W-Zv1GFvp9XQOg@mail.gmail.com' \
--to=sbeller@google.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pc44800@gmail.com \
/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).