git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Robert Dailey <rcdailey.lists@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Jens Lehmann <Jens.Lehmann@web.de>, Git <git@vger.kernel.org>
Subject: Re: Diffing submodule does not yield complete logs for merge commits
Date: Sat, 30 May 2015 14:37:39 -0500	[thread overview]
Message-ID: <CAHd499BRhfbfGOWv217QT5GwLpOkY4B3j8t3MACGXz-ZdQbYtA@mail.gmail.com> (raw)
In-Reply-To: <CAHd499B+icDskcsR7zxPfZ=8Nqwg14eb2h2LBuDx6=fnoO24AQ@mail.gmail.com>

On Sat, May 30, 2015 at 2:19 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> On Sat, May 30, 2015 at 12:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Robert Dailey <rcdailey.lists@gmail.com> writes:
>>
>>> In the meantime I'd like to ask, do we even need to add an option for
>>> this? What if we just make `diff.submodule log` not use
>>> --first-parent? This seems like a backward compatible change in of
>>> itself.
>>
>> Why?  People have relied on submodule-log not to include all the
>> noise coming from individual commits on side branches and instead
>> appreciated seeing only the overview by merges of side branch topics
>> being listed---why is regressing the system to inconvenience these
>> existing users "a backward compatible change"?
>
> Backward compatible in the sense that it does not break existing
> functionality. For example, removing -D from `git branch` would be a
> backward breaking change.
>
> Also not everyone has a disciplined merge-commit editing policy like
> the Linux & Git projects do. In fact (especially in corporate
> environments), most merge commit messages are useless and
> auto-generated. It's in fact very common (depending on popular
> tooling) to not have the ability to edit these messages. Example:
>
>     Merge branch "topic" into "master"
>
> This is the defacto message you get when you use Github, Atlassian
> Stash, etc. any time you merge a PR. For repositories that only accept
> changes through pull requests, it is not possible to generate a diff
> log of submodules that is useful without showing the ancestor commits
> on all parents. Right now 'log' literally gives you the following for
> a submodule that has a mainline branch that does not accept direct
> pushes (i.e. only PRs):
>
>     > Merge branch "topic1" into "master"
>     > Merge branch "topic2" into "master"
>     > Merge branch "origin/develop" into "master"
>     > Merge branch "topic3" into "master"
>
> I would argue that this situation is common -- more common than what
> you would typically see in a well groomed git repository that does not
> use PRs or always does rebase+ff-merge.
>
> That is the basis for my concern. No functionality is broken and
> cators to the common case. But I guess since we're discussing 2
> distinct workflows, it makes sense to have 2 options for viewing the
> submodule logs. Because if 'full-log' were indeed the default, it
> would cause a lot of noise in the well-disciplined-merge-commit
> workflow.
>
> From a high level (to explain my motivation for my simplified and
> arguably naive suggestion), I work with a lot of amateur users of Git.
> They always complain about using Git and how "SVN is better". Yet they
> do not accept the challenge of learning Git, which is a very
> complicated tool. Much of git I would argue is not very beginner (even
> user) friendly (although things are certainly getting better). With
> such an advanced tool, with such complex configuration and behavior,
> and given all the friction it causes, I can only do my best to offer
> seemingly sensible alternatives to adding MORE configuration.
>
> Anyway it's just a thought. Glad to get feedback and I see both sides
> of the fence on this one.
>
>>> And it's simpler to implement. I can't think of a good
>>> justification to add more settings to an already hugely complex
>>> configuration scheme for such a minor difference in behavior.
>>
>> Careful, as that argument can cut both ways.  If it is so a minor
>> difference in behaviour, perhaps we can do without not just an
>> option but a feature to omit --first-parent here.  That would be
>> even simpler to implement, as you do not have to do anything.
>>
>> So, if you think the new behaviour can help _some_ users, then you
>> would need the feature and a knob to enable it, I would think.
>
> I don't really understand your contrasted example here. Can you explain:
>
>     "...we can do without not just an option but a feature to omit
> --first-parent..."
>
> Again thanks for the feedback.

I'm having some difficulty with the tests. What it looks like is that
the test repository is created by calling test-lib.sh at the top. Then
by the time the commands after that are run, it's inside the temp
repository.

At the bottom of t4041, I add this:

    test_create_repo sm3 &&
    git add sm3 &&
    cd sm3 &&
    echo > foo.txt &&
    git add foo.txt &&
    git commit -m 'foo.txt' >/dev/null &&
    git checkout -b topic >/dev/null &&
    echo > topic.txt &&
    git add topic.txt &&
    git commit -m 'topic.txt' >/dev/null &&
    git checkout master >/dev/null &&
    git merge --no-ff --no-edit topic >/dev/null &&
    cd .. &&
    git diff --submodule=log sm3

But this does not work as I expect. How do I add a submodule and then
simulate creation of branches, commits, and merges, prior to running
code in "text_expect_success"?

  reply	other threads:[~2015-05-30 19:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 20:53 Diffing submodule does not yield complete logs for merge commits Robert Dailey
2015-05-01 17:57 ` Heiko Voigt
2015-05-04 15:05   ` Robert Dailey
2015-05-04 19:32     ` Jens Lehmann
2015-05-04 20:21       ` Robert Dailey
2015-05-04 20:51         ` Heiko Voigt
2015-05-05  5:49         ` Johannes Schindelin
2015-05-15 20:33           ` Robert Dailey
2015-05-18 12:30             ` Heiko Voigt
2015-05-18 15:06               ` Robert Dailey
2015-05-19 10:44                 ` Heiko Voigt
2015-05-19 19:29                   ` Robert Dailey
2015-05-19 20:34                     ` Stefan Beller
2015-05-22  9:17                       ` Roberto Tyley
2015-05-21 12:51                     ` Heiko Voigt
2015-05-30  2:18                       ` Robert Dailey
2015-05-30 10:41                         ` Heiko Voigt
2015-05-30 17:04                         ` Junio C Hamano
2015-05-30 19:19                           ` Robert Dailey
2015-05-30 19:37                             ` Robert Dailey [this message]
2015-05-30 19:54                             ` Junio C Hamano
2015-05-30 20:25                               ` Robert Dailey
2015-06-02 12:02                                 ` Heiko Voigt
2015-05-04 21:03     ` Junio C Hamano

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=CAHd499BRhfbfGOWv217QT5GwLpOkY4B3j8t3MACGXz-ZdQbYtA@mail.gmail.com \
    --to=rcdailey.lists@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=johannes.schindelin@gmx.de \
    /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).