From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Narebski Subject: Re: [PATCH] Calculate lines changed for cvs log command Date: Sun, 13 Apr 2008 22:43:39 +0200 Message-ID: <200804132243.40909.jnareb@gmail.com> References: <3F0821AA-C11D-4C42-A415-D346A7CD89F8@nocrew.org> <20AD7252-19A2-443F-88CF-F871AE7A392E@nocrew.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org To: Fredrik Noring X-From: git-owner@vger.kernel.org Sun Apr 13 22:44:55 2008 connect(): Connection refused Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jl94H-0005Rp-5r for gcvg-git-2@gmane.org; Sun, 13 Apr 2008 22:44:53 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756821AbYDMUnt convert rfc822-to-quoted-printable (ORCPT ); Sun, 13 Apr 2008 16:43:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753540AbYDMUnt (ORCPT ); Sun, 13 Apr 2008 16:43:49 -0400 Received: from ug-out-1314.google.com ([66.249.92.173]:29472 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbYDMUns (ORCPT ); Sun, 13 Apr 2008 16:43:48 -0400 Received: by ug-out-1314.google.com with SMTP id z38so340138ugc.16 for ; Sun, 13 Apr 2008 13:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=LsntRuaiWcJAhvD2igI+H5D4JA+JYc+lp7rwlyb2CLA=; b=pQ/xkTx8rd/9eylJ1pkM+QZll8EhcDkUDy8AgxCj2V9NkD0gd/DDMHWyFuPyLEglfJA/igVLKU4ZSlxkNLCczDljFsV4c2QV8s17Fw6L5T6XefkV0FNzGFKlKcGYhq+jlctFkHxkAdvLb39gZaBKyjw25c6Tm/t1bM6PTaAkCdA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=MHnRwJUBJA9NyJDn4oOBc2ojhb7LV5plrDz5V+30pedsW37LnmPVUADa9RJfSMw8WAbKBWhnOKBjdqCIxWZrEMs9aYaxqL2QpuRVDljqCDiQD228kiafgFWs+CAhHeUrykNBKGqioyRECUBk52tCDiVd9tLa8YAbJX9jkrab9fU= Received: by 10.67.115.19 with SMTP id s19mr2820098ugm.70.1208119426474; Sun, 13 Apr 2008 13:43:46 -0700 (PDT) Received: from ?192.168.1.11? ( [83.8.231.63]) by mx.google.com with ESMTPS id z40sm1285967ugc.82.2008.04.13.13.43.43 (version=SSLv3 cipher=OTHER); Sun, 13 Apr 2008 13:43:44 -0700 (PDT) User-Agent: KMail/1.9.3 In-Reply-To: <20AD7252-19A2-443F-88CF-F871AE7A392E@nocrew.org> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Could you please do not toppost? It is against natural reading order. Dnia niedziela 13. kwietnia 2008 20:44, Fredrik Noring napisa=B3: > 13 apr 2008 kl. 18.59 skrev Jakub Narebski: >> Fredrik Noring writes: >> >>> (My mailer destroys inline patches, so I'm attaching it. Sorry abou= t >>> that.) >> >> Could you please attach it as 1.) attachement=3Dinline if possible, = to >> have them displayed along the email; 2.) use text/plain mimetype, no= t >> application/octet-stream (you might need to change patch extension >> from *.patch to *.txt; you can change default extension of files >> generated by git-format-patch via format.suffix configuration >> variable), and what is tied with it 3.) use Transfer-Encoding: 8bit >> (or something like that), not base64, and preferably not >> quoted-printable? >> >> Or change your mailer (or configure it), or use git-send-email. >>=20 > OK, I'll look deeper into the mailer issues. Any comments on the =20 > actual code in the patch, and the question regarding git-log vs git-=20 > cat-file? =46irst, having patch as attachement, moreover as _binary_ and _encoded= _=20 attachement makes it hard to comment on it. And if you make it hard to= =20 comment on patch, people woundn't do it. Second, your approach with "--pretty=3Dformat:%s%n%b" might be a good idea, but you don't get all the information as you get from=20 git-cat-file: no tree info, no true (recorded) parents info, no=20 committer info, no author info. I don't know if git-cvsserver makes=20 use of that info or not; from the patch it looks as if it discards all but commit message (message body).=20 BTW. I'm not Perl expert, but if you want to discard two last elements in arrays, wouldn't using splice (or just decreasing $#lines by 2) be simpler solution? > Speaking of which -- is there any particular reason for not running =20 > git-log once, instead of forking it (or git-cat-file) for every commi= t =20 > in the log? There seems to be a special case for merges, but it'd =20 > appear to be more efficient to query the SQLite DB for the commits =20 > provided by git-log rather than the other way around, no? About git-log vs git-cat-file: take a look how gitweb does it, with=20 parse_commits and parse_commit_text, and commit 756bbf548dbef5b738c by Robert Fitzsimons introducing it. Note that IIRC this commit predates --pretty=3Dformat: option to git-log / git-rev-list. > Any thoughts? >=20 > (git-send-email appears to fail for me without providing an error.) You have either configure sendmail, or set mail.smtp* options (or=20 something like that) correctly. BTW. cannot you turn off "format=3Dflowed" in Apple Mail? --=20 Jakub Narebski Poland