From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8A1DB59CAF for ; Fri, 8 Apr 2016 07:29:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 98AE621C079; Fri, 8 Apr 2016 07:29:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F109221C078 for ; Fri, 8 Apr 2016 07:29:44 +0000 (UTC) Received: from [192.168.0.20] (ip68-5-185-102.oc.oc.cox.net [68.5.185.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 89740340D41 for ; Fri, 8 Apr 2016 07:29:43 +0000 (UTC) Subject: Re: [gentoo-portage-dev] [PATCH] egencache --update-changelogs: fix timestamp assumptions (bug 579292) To: gentoo-portage-dev@lists.gentoo.org References: <1460094385-11889-1-git-send-email-zmedico@gentoo.org> <20160407235130.458a3f9f.dolsen@gentoo.org> From: Zac Medico Message-ID: <57075DE4.1060109@gentoo.org> Date: Fri, 8 Apr 2016 00:29:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <20160407235130.458a3f9f.dolsen@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Archives-Salt: 9db0a626-ff73-4473-8de2-8c0fbbf2a0ff X-Archives-Hash: e251561368d61fd46b3319fef95a7556 On 04/07/2016 11:51 PM, Brian Dolbec wrote: > the above looks good, but what about: > > > [19:01] just use --first-parent > [19:01] also take into account merge commits > [19:03] git really complicates ChangeLog generation in general > [19:03] 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] if you don't look at merge commits for your timestamps of changes, correct, it is not linear > [19:05] but if you take a set of commits and determine when they became part of master, it is linear > [19:05] so: git log --first-parent --format=%ct -1 . > [19:05] to get the last timestamp of changes to htat pkg > [19:06] then use that timestamp > [19:06] lmod = self.grab(['git', self._work_tree, 'log', '--format=%ct', '-1', '.']) > [19:06] that is the current code > [19:06] git log -m --first-parent --format=%ct -1 . > [19:06] so just add the --first-parent option? > [19:07] you want -m toolmod = self.grab(['git', > self._work_tree, 'log', '--format=%ct', '-1', '.']) > > [19:06] git log -m --first-parent --format=%ct -1 . > [19:06] so just add the --first-parent option? > [19:07] 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. -- Thanks, Zac