From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E93E15802F for ; Sun, 5 Mar 2023 19:55:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5202AE08A2; Sun, 5 Mar 2023 19:55:03 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 265A4E08A2 for ; Sun, 5 Mar 2023 19:55:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DAADB3412DD for ; Sun, 5 Mar 2023 19:55:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D24288E for ; Sun, 5 Mar 2023 19:55:00 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1678045978.41b813487245d68407640a36ece5d2320e6c1af9.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgdev:main commit in: src/pkgdev/scripts/ X-VCS-Repository: proj/pkgcore/pkgdev X-VCS-Files: src/pkgdev/scripts/pkgdev_commit.py X-VCS-Directories: src/pkgdev/scripts/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 41b813487245d68407640a36ece5d2320e6c1af9 X-VCS-Branch: main Date: Sun, 5 Mar 2023 19:55:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 722470f4-ab39-44fc-a6da-81d3cf3c14a3 X-Archives-Hash: dae49b195f2248f7e787b09889954ba6 commit: 41b813487245d68407640a36ece5d2320e6c1af9 Author: Arthur Zamarin gentoo org> AuthorDate: Sun Mar 5 19:52:58 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Sun Mar 5 19:52:58 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgdev.git/commit/?id=41b81348 commit: compute commit title for commit related files only In cases were multiples files are staged for commit across packages, but we run `pkgdev commit .` in one of them, it was adding and committing only the current package, but computing the message based on both of them. Resolves: https://github.com/pkgcore/pkgdev/issues/122 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgdev/scripts/pkgdev_commit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pkgdev/scripts/pkgdev_commit.py b/src/pkgdev/scripts/pkgdev_commit.py index c85c7b1..98cbb78 100644 --- a/src/pkgdev/scripts/pkgdev_commit.py +++ b/src/pkgdev/scripts/pkgdev_commit.py @@ -48,6 +48,9 @@ class ArgumentParser(cli.ArgumentParser): if namespace.edit: args.append("--edit") namespace.commit_args = args + namespace.git_args_paths = list( + filter(os.path.exists, (s for s in args if not s.startswith("-"))) + ) return namespace, [] @@ -575,6 +578,7 @@ class GitChanges(UserDict): "--cached", "-z", "HEAD", + *self._options.git_args_paths, stdout=subprocess.PIPE, )