public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpkg] 1.70-1: Backport: fixed 'clone --branch' command
@ 2026-08-10 21:44
0 siblings, 0 replies; only message in thread
From: @ 2026-08-10 21:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpkg
Branch : 1.70-1
Commit : 67075c4b40de8579c1ab0e09a5ca74a4cea81f3b
Author : Ondřej Nosek <onosek@redhat.com>
Date : 2019-05-09T15:12:02+00:00
Stats : +49/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpkg/c/67075c4b40de8579c1ab0e09a5ca74a4cea81f3b?branch=1.70-1
Log:
Backport: fixed 'clone --branch' command
Signed-off-by: Ondřej Nosek <onosek@redhat.com>
---
diff --git a/0001-Fix-clone-branches.patch b/0001-Fix-clone-branches.patch
new file mode 100644
index 0000000..1536310
--- /dev/null
+++ b/0001-Fix-clone-branches.patch
@@ -0,0 +1,44 @@
+From c194bf503ffd176403708345a230501b634aa373 Mon Sep 17 00:00:00 2001
+From: Todd Zullinger <tmz@pobox.com>
+Date: Tue, 7 May 2019 21:40:31 -0400
+Subject: [PATCH] Fix clone --branches
+
+When cloning with the --branches option we first clone a bare repo
+locally, then clone each branch from that bare repo. Avoid adding an
+excludes file to the temporary bare repo (which fails because we pass
+the wrong path to the git dir). Add an excludes file to each branch
+dir.
+
+Resolves: rhbz#1707223
+Signed-off-by: Todd Zullinger <tmz@pobox.com>
+---
+ pyrpkg/__init__.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index c12b52b..43bfc1d 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -1546,7 +1546,8 @@ class Commands(object):
+ conf_git = git.Git(os.path.join(path, git_dir))
+ self._clone_config(conf_git, repo)
+
+- self._add_git_excludes(os.path.join(path, git_dir))
++ if not bare_dir:
++ self._add_git_excludes(os.path.join(path, git_dir))
+
+ return
+
+@@ -1625,6 +1626,9 @@ class Commands(object):
+ branch_git.config("--replace-all",
+ "remote.%s.url" % self.default_branch_remote,
+ giturl)
++
++ # Add excludes
++ self._add_git_excludes(branch_path)
+ except (git.GitCommandError, OSError) as e:
+ raise rpkgError('Could not locally clone %s from %s: %s'
+ % (branch, repo_path, e))
+--
+2.20.1
+
diff --git a/rpkg.spec b/rpkg.spec
index 6f80775..5d6180a 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -4,7 +4,7 @@
Name: rpkg
Version: 1.58
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Python library for interacting with rpm+git
License: GPLv2+ and LGPLv2
@@ -21,6 +21,7 @@ Source0: https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
# and there is only old rpm-python package in EL6 and 7, so just simply to
# remove rpm-py-installer for now.
Patch0: remove-koji-and-rpm-py-installer-from-requires.patch
+Patch1: 0001-Fix-clone-branches.patch
%if 0%{?fedora} || 0%{?rhel} > 7
# Enable python3 build by default
@@ -261,6 +262,9 @@ nosetests tests
%changelog
+* Thu May 09 2019 Ondrej Nosek <onosek@redhat.com> - 1.58-2
+- Backport: fixed 'clone --branch' command
+
* Mon Apr 29 2019 Ondřej Nosek <onosek@redhat.com> - 1.58-1
- Ignore files in a cloned repository - #355 (onosek)
- Handle data from python RPM binding as UTF-8 string (zebob.m)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-10 21:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 21:44 [rpms/rpkg] 1.70-1: Backport: fixed 'clone --branch' command
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox