From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (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 739E72DC764 for ; Fri, 5 Jun 2026 16:56:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780678578; cv=none; b=uzQamEnssbgiva7hW6UkD5NF7mePE0WnicCO5TQNw2vWnMSkC8N+RnLU0P8zm5Uho9abuaiZpZ3peujhXOv4moDXa0bSHlDmIhev7OPUXj8s1kUd6UXITTNDAsgpwIWDKFjOQeAziRSEWjS3nZ62tKcMrhi8UnZqcSgcNpBcgno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780678578; c=relaxed/simple; bh=7VnPW/bXM1ZfUss6wEidlBnz4BI+CRq5qzgiZPP3wm4=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=u3QrAETXTtbTZL88KCzB4NrCr869RPSS0M/FvA57XR20rXVE9c7lW0u8SMYbY7xt2cd1L2xLkMxM27QdHrXbDDzonqwDE6D1Y4Npod9odHwNmqKei0SCXY/QTRE4CVOziNN19W7BYi5kQgmZGJwFqGglE/paVUiFci11jOfJAvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com; spf=pass smtp.mailfrom=fastmail.com; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b=cwcB4t/e; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gHRCNXrK; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fastmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fastmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fastmail.com header.i=@fastmail.com header.b="cwcB4t/e"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gHRCNXrK" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id B7BEBEC01D7; Fri, 5 Jun 2026 12:56:16 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-06.internal (MEProxy); Fri, 05 Jun 2026 12:56:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-transfer-encoding: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=1780678576; x=1780764976; bh=qUpj2zuYzxSqZQE3bHAiysGZDtyfF5ukXX7kpc22hFk=; b= cwcB4t/e+q3si7HPUOdw3UBZEEcfshrILtbxmU6ti+vba7HHTWAqdKPWd4tfW3qk Ca56yxTi+8V/lYUJmKkAG36iGMT5+9rSjE58c4XjLJLAlOqJVIeJ0ParDIpzQM/l UttvDEikR2yccSYcRMmyzoVA80TPHyUEC77aXxHJxn3Xoqzy1e+hLyilrWIJ9y6g QgrIbOPlkQWMBNfbV1oiMeAQYrC3ZO7xzl3JDxHgAWCjLNHJ3rT0YVKF2nMQRZ6f mgjX8QmawzvPI3J5vYPJZCUF83fxsG7ihiL1xbuGv4RV4id7IsIT1QiH8wuMVO++ vSBFOSr6X8xLtL/AA8AjfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm1; t=1780678576; x= 1780764976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LJU7jWefoeLms2cgJUPAvxzBdeSsjGDoDNA X-ME-Proxy: Feedback-ID: i8b11424c:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 6B6CB3020094; Fri, 5 Jun 2026 12:56:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A2I8_XOTDCGF Date: Fri, 05 Jun 2026 18:55:56 +0200 From: "Kristoffer Haugsbakk" To: "JAYATHEERTH K" , git@vger.kernel.org Cc: a3205153416@gmail.com, "Junio C Hamano" , "Justin Tobler" , kumarayushjha123@gmail.com, "Lucas Seiki Oshiro" , "Phillip Wood" , "brian m. carlson" Message-Id: In-Reply-To: <20260605163012.181089-2-jayatheerthkulkarni2005@gmail.com> References: <20260601151950.30686-1-jayatheerthkulkarni2005@gmail.com> <20260605163012.181089-1-jayatheerthkulkarni2005@gmail.com> <20260605163012.181089-2-jayatheerthkulkarni2005@gmail.com> Subject: Re: [GSoC PATCH v2 1/4] path: introduce format_path() for centralized path formatting Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Jun 5, 2026, at 18:30, K Jayatheerth wrote: > The path-formatting logic inside `builtin/rev-parse.c` handles absolut= e, > canonical, and relative formatting rules based on user-supplied option= s. > However, this logic is tightly coupled to `rev-parse` and writes direc= tly > to stdout. > > To allow other builtins (such as the upcoming `git repo` path keys) to > re-use this logic, extract the core path-formatting algorithm into a c= entralized > helper function, `format_path()`, in `path.c`. > > Expose a single, streamlined `path_format` enum in `path.h` to let cal= lers > explicitly declare their formatting strategy (UNMODIFIED, RELATIVE, > RELATIVE_IF_SHARED, or CANONICAL). This decouples the core algorithm f= rom > the localized fallback mechanics specific to `rev-parse`. This looks very well explained to my naive eyes. > > Signed-off-by: K Jayatheerth > Mentored-by: Justin Tobler > Mentored-by: Lucas Seiki Oshiro Nitpick. You are supposed to add your `Signed-off-by` at the end. You are saying with that line that you are signing off on the changes and the commit message, including the trailers (mentors) you=E2=80=99ve deci= ded to add. Imagine if the maintainer applies this patch and fixes a typo and the commit becomes: Mentored-by: Justin Tobler Mentored-by: Lucas Seiki Oshiro Signed-off-by: K Jayatheerth [jc: typo fix] Signed-off-by: Junio ... The chain of custody is then very clear. > --- >[snip]