From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8922A384CE8 for ; Wed, 22 Jul 2026 20:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784753591; cv=none; b=fjJNDP8eo19BeFa0s9josvKuiX3pso4+xEjwFcEtCD7ZEozrTgVe+UmIlDdIHEPZeDF7IUzeLNEPefxRD5Vs54bzYT3Au1UfXfSj9TvMdfqehxlQa1OicU8vrKZaTVA7087DFH9qxfN4mRphvrNFuYyPcx8IkUbuM4+DHyN8lqs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784753591; c=relaxed/simple; bh=zTBD9L+hj2uTZGgZnjOkjod/+xLdYK2/vS356uQc7Ts=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=lePa+tI0rr4WL3hNsRU2JqOW1AmNDPcDa3r8oWnu8meyf3cfiV+LCq+ptbcbNkB6PNrrjn21gn3S27Sd++oNwT02uBjQlLj/OTtITZLqF5BZqdvzKEAx155ldjkB7pparwzRmyHELKtNwW/O7VF72Eae4b1ew8FLQx6/YEf0hcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=rb/j9Kqo; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pnlV8LzJ; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="rb/j9Kqo"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pnlV8LzJ" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 7EB13EC00EA; Wed, 22 Jul 2026 16:53:08 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Wed, 22 Jul 2026 16:53:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1784753588; x=1784839988; bh=1iVZOz4/nn 88umtxu7JttKMYkqx63JaRiFbCmDaFv+I=; b=rb/j9Kqomgkx/ZE29/y/EzUu2i 3nF3F6Dx95UUFnt5lIeh7hMHaQ6FIgkmAqmXyvpX+nTZ8Na/MN7AVMI463P+kDnh x4EyfnA+baejwOvDSG71qJycUKLoVxLdJp8mKXJqcy2AUq6PVbcEkpmeJxaBl/2n zpjdLFS2BNtKeG/fqwi3x31WZeYMj3x+DmV31avXuyVxuRnbcaZZvpc30+I68kFH ef8+7vNKHga+eSiiixbqQVicy0wkttRKcNs+L0aq5Q7yt+8tofYIv0K3bi8cCmSu TBDh0J/BJ/0nskmq0q/Rg14TUtmcjQIKgQsYtM/2q4msXvNSS/lklQ17ltgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784753588; x=1784839988; bh=1iVZOz4/nn88umtxu7JttKM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sSkKOsCeM4/2OYEm+yblXZ8tJcCfJBM3Wi5vac/IvaOw X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jul 2026 16:53:08 -0400 (EDT) From: Junio C Hamano To: hardikxk Cc: git@vger.kernel.org Subject: Re: [PATCH 1/1] Extract only the message body from git commit. In-Reply-To: <20260722083836.744338-2-hardikxk@gmail.com> (hardikxk@gmail.com's message of "Wed, 22 Jul 2026 14:08:36 +0530") References: <20260722083836.744338-1-hardikxk@gmail.com> <20260722083836.744338-2-hardikxk@gmail.com> Date: Wed, 22 Jul 2026 13:53:06 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain hardikxk writes: > Subject: Re: [PATCH 1/1] Extract only the message body from git commit. Please see Documentation/SubmittingPatches[[describe-changes]]. > The patch fixes the `extractLogMessageFromGitCommit` function to skip all the metada of the commit object and only return back the message body. Line-wrap overly long lines like this one. > Previously the function would return the entire data of the objects > including authors tree and SHAs. This patch fixes that to skip over all > that and just return the body of the log message. Please see Documentation/SubmittingPatches[[meaningful-message]]. The observation on how the current code behaves should not be described as "Previously X did Y". Just say "X does Y" instead. There are other rules on how to write proposed commit log messages explained there. > Signed-off-by: hardikxk Please see Documentation/SubmittingPatches[[real-name]]. > --- > git-p4.py | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) Thanks. > diff --git a/git-p4.py b/git-p4.py > index c0ca7be..589efcd 100755 > --- a/git-p4.py > +++ b/git-p4.py > @@ -1003,12 +1003,18 @@ def branchExists(ref): > def extractLogMessageFromGitCommit(commit): > logMessage = "" > > - # fixme: title is first line of commit, not 1st paragraph. > + foundNewLine = False > foundTitle = False > for log in read_pipe_lines(["git", "cat-file", "commit", commit]): > - if not foundTitle: > + if not foundNewLine: > + # skip anything that is not the commit message > if len(log) == 1: > - foundTitle = True > + foundNewLine = True > + continue > + > + # everything from here is the commit message > + if not foundTitle: > + foundTitle = True > continue > > logMessage += log