Update to 1.8.0
- include git-credential-gnome-keyring helper in git pkg - 0001-cvsimport-strip-all-inappropriate-tag-strings.patch was merged Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
parent
4985e02df9
commit
8c6dafd613
@ -1,71 +0,0 @@
|
||||
From 70b67b0792375c59f60f3e24f2d6757b24dc719c Mon Sep 17 00:00:00 2001
|
||||
From: Ken Dreyer <ktdreyer@ktdreyer.com>
|
||||
Date: Thu, 6 Sep 2012 10:36:53 -0600
|
||||
Subject: [PATCH] cvsimport: strip all inappropriate tag strings
|
||||
|
||||
Certain characters such as "?" can be present in a CVS tag name, but
|
||||
git does not allow these characters in tags. If git-cvsimport
|
||||
encounters a CVS tag that git cannot handle, cvsimport will error and
|
||||
refuse to continue the import beyond that point.
|
||||
|
||||
When importing CVS tags, strip all the inappropriate strings from the
|
||||
tag names as we translate them to git tag names.
|
||||
|
||||
Provide more debugging information to the user if we've altered the
|
||||
tag and the "git tag" command still fails. Also, warn the user if we
|
||||
end up skipping an (unusable) tag altogether.
|
||||
|
||||
Signed-off-by: Ken Dreyer <ktdreyer@ktdreyer.com>
|
||||
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
||||
---
|
||||
git-cvsimport.perl | 33 ++++++++++++++++++++++++++++++---
|
||||
1 file changed, 30 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
|
||||
index 8d41610..8032f23 100755
|
||||
--- a/git-cvsimport.perl
|
||||
+++ b/git-cvsimport.perl
|
||||
@@ -889,10 +889,37 @@ sub commit {
|
||||
$xtag =~ s/\s+\*\*.*$//; # Remove stuff like ** INVALID ** and ** FUNKY **
|
||||
$xtag =~ tr/_/\./ if ( $opt_u );
|
||||
$xtag =~ s/[\/]/$opt_s/g;
|
||||
- $xtag =~ s/\[//g;
|
||||
|
||||
- system('git' , 'tag', '-f', $xtag, $cid) == 0
|
||||
- or die "Cannot create tag $xtag: $!\n";
|
||||
+ # See refs.c for these rules.
|
||||
+ # Tag cannot contain bad chars. (See bad_ref_char in refs.c.)
|
||||
+ $xtag =~ s/[ ~\^:\\\*\?\[]//g;
|
||||
+ # Other bad strings for tags:
|
||||
+ # (See check_refname_component in refs.c.)
|
||||
+ 1 while $xtag =~ s/
|
||||
+ (?: \.\. # Tag cannot contain '..'.
|
||||
+ | \@{ # Tag cannot contain '@{'.
|
||||
+ | ^ - # Tag cannot begin with '-'.
|
||||
+ | \.lock $ # Tag cannot end with '.lock'.
|
||||
+ | ^ \. # Tag cannot begin...
|
||||
+ | \. $ # ...or end with '.'
|
||||
+ )//xg;
|
||||
+ # Tag cannot be empty.
|
||||
+ if ($xtag eq '') {
|
||||
+ warn("warning: ignoring tag '$tag'",
|
||||
+ " with invalid tagname\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (system('git' , 'tag', '-f', $xtag, $cid) != 0) {
|
||||
+ # We did our best to sanitize the tag, but still failed
|
||||
+ # for whatever reason. Bail out, and give the user
|
||||
+ # enough information to understand if/how we should
|
||||
+ # improve the translation in the future.
|
||||
+ if ($tag ne $xtag) {
|
||||
+ print "Translated '$tag' tag to '$xtag'\n";
|
||||
+ }
|
||||
+ die "Cannot create tag $xtag: $!\n";
|
||||
+ }
|
||||
|
||||
print "Created tag '$xtag' on '$branch'\n" if $opt_v;
|
||||
}
|
||||
--
|
||||
1.7.12
|
||||
|
30
git.spec
30
git.spec
@ -69,9 +69,16 @@
|
||||
%global arch_support 0
|
||||
%endif
|
||||
|
||||
# Build gnome-keyring git-credential helper on Fedora and RHEL >= 7
|
||||
%if 0%{?rhel} >= 7 || 0%{?fedora}
|
||||
%global gnome_keyring 1
|
||||
%else
|
||||
%global gnome_keyring 0
|
||||
%endif
|
||||
|
||||
Name: git
|
||||
Version: 1.7.12.1
|
||||
Release: 2%{?dist}
|
||||
Version: 1.8.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Fast Version Control System
|
||||
License: GPLv2
|
||||
Group: Development/Tools
|
||||
@ -87,7 +94,6 @@ Patch0: git-1.5-gitweb-home-link.patch
|
||||
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
||||
# https://bugzilla.redhat.com/600411
|
||||
Patch3: git-1.7-el5-emacs-support.patch
|
||||
Patch4: 0001-cvsimport-strip-all-inappropriate-tag-strings.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -102,6 +108,9 @@ BuildRequires: pcre-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: zlib-devel >= 1.2
|
||||
%{!?_without_docs:BuildRequires: asciidoc > 6.0.3, xmlto}
|
||||
%if %{gnome_keyring}
|
||||
BuildRequires: libgnome-keyring-devel
|
||||
%endif
|
||||
|
||||
Requires: less
|
||||
Requires: openssh-clients
|
||||
@ -318,7 +327,6 @@ Requires: emacs-git = %{version}-%{release}
|
||||
%if %{emacs_old}
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch4 -p1
|
||||
|
||||
# Use these same options for every invocation of 'make'.
|
||||
# Otherwise it will rebuild in %%install due to flags changes.
|
||||
@ -368,6 +376,10 @@ make %{?_smp_mflags} all %{!?_without_docs: doc}
|
||||
make -C contrib/emacs
|
||||
%endif
|
||||
|
||||
%if %{gnome_keyring}
|
||||
make -C contrib/credential/gnome-keyring/
|
||||
%endif
|
||||
|
||||
# Remove shebang from bash-completion script
|
||||
sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
|
||||
|
||||
@ -391,6 +403,11 @@ install -Dpm 644 %{SOURCE2} \
|
||||
%{buildroot}%{_emacs_sitestartdir}/git-init.el
|
||||
%endif
|
||||
|
||||
%if %{gnome_keyring}
|
||||
install -pm 755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
|
||||
%{buildroot}%{gitcoredir}
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
|
||||
install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
|
||||
sed "s|@PROJECTROOT@|%{_var}/lib/git|g" \
|
||||
@ -582,6 +599,11 @@ rm -rf %{buildroot}
|
||||
# No files for you!
|
||||
|
||||
%changelog
|
||||
* Mon Oct 29 2012 Adam Tkac <atkac redhat com> - 1.8.0-1
|
||||
- update to 1.8.0
|
||||
- include git-credential-gnome-keyring helper in git pkg
|
||||
- 0001-cvsimport-strip-all-inappropriate-tag-strings.patch was merged
|
||||
|
||||
* Thu Oct 25 2012 Adam Tkac <atkac redhat com> - 1.7.12.1-2
|
||||
- move git-prompt.sh into usr/share/git-core/contrib/completion (#854061)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user