From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] egencache --update-changelogs: fix timestamp assumptions (bug 579292)
Date: Fri, 8 Apr 2016 18:12:37 -0700 [thread overview]
Message-ID: <20160408181237.7f06dda4.dolsen@gentoo.org> (raw)
In-Reply-To: <57075DE4.1060109@gentoo.org>
On Fri, 8 Apr 2016 00:29:40 -0700
Zac Medico <zmedico@gentoo.org> wrote:
> On 04/07/2016 11:51 PM, Brian Dolbec wrote:
> > the above looks good, but what about:
> >
> >
> > [19:01] <dwfreed|phone> just use --first-parent
> > [19:01] <dwfreed|phone> also take into account merge commits
> > [19:03] <dwfreed|phone> git really complicates ChangeLog generation
> > in general [19:03] <dwfreed|phone> because your ChangeLog should
> > reflect when these commits became part of master, but you still
> > need to perserve their messages [19:04] * zmedico is skeptical
> > about the linearizability of the timestamps [19:04] <dwfreed|phone>
> > if you don't look at merge commits for your timestamps of changes,
> > correct, it is not linear [19:05] <dwfreed|phone> but if you take a
> > set of commits and determine when they became part of master, it is
> > linear [19:05] <dol-sen> so: git log --first-parent --format=%ct
> > -1 . [19:05] <dol-sen> to get the last timestamp of changes to htat
> > pkg [19:06] <dol-sen> then use that timestamp [19:06] <dol-sen>
> > lmod = self.grab(['git', self._work_tree, 'log', '--format=%ct',
> > '-1', '.']) [19:06] <dol-sen> that is the current code [19:06]
> > <dwfreed|phone> git log -m --first-parent --format=%ct -1 . [19:06]
> > <dol-sen> so just add the --first-parent option? [19:07]
> > <dwfreed|phone> you want -m toolmod = self.grab(['git',
> > self._work_tree, 'log', '--format=%ct', '-1', '.'])
> >
> > [19:06] <dwfreed|phone> git log -m --first-parent --format=%ct -1 .
> > [19:06] <dol-sen> so just add the --first-parent option?
> > [19:07] <dwfreed|phone> you want -m too
> >
> >
> > Don't we need to add the -m --first-parent ???
> >
>
> I don't know enough about how those options matter for git log
> behavior, but I trust that dwfreed has good reasons to recommend
> them. Maybe we should add them in a separate patch, possibly with
> some explanation about how they are useful in this context.
They really matter when the tree gets crappy/stale merge commits from
pull requests which play with the way the tree is considered. In this
particular case, it will ignore the branch history and only consider the
merge commit that connects it to master. Which is when we want to make
the changelog entry, not when the (possibly stale) user commit was made.
--
Brian Dolbec <dolsen>
next prev parent reply other threads:[~2016-04-09 1:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 5:46 [gentoo-portage-dev] [PATCH] egencache --update-changelogs: fix timestamp assumptions (bug 579292) Zac Medico
2016-04-08 6:51 ` Brian Dolbec
2016-04-08 7:29 ` Zac Medico
2016-04-09 1:12 ` Brian Dolbec [this message]
2016-04-09 7:51 ` Zac Medico
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160408181237.7f06dda4.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox