From 09b049c67a804b7ff4f5a0066ecac9af16673e6845840d874b24e216f6420362 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 24 Jun 2019 19:47:30 +0000 Subject: [PATCH] Accepting request 708976 from devel:tools:scm OBS-URL: https://build.opensuse.org/request/show/708976 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=233 --- git-2.21.0.tar.sign | Bin 566 -> 0 bytes git-2.21.0.tar.xz | 3 -- git-2.22.0.tar.sign | Bin 0 -> 566 bytes git-2.22.0.tar.xz | 3 ++ git.changes | 34 +++++++++++++++ git.spec | 4 +- worktree-fix-worktree-add-race.patch | 63 --------------------------- 7 files changed, 38 insertions(+), 69 deletions(-) delete mode 100644 git-2.21.0.tar.sign delete mode 100644 git-2.21.0.tar.xz create mode 100644 git-2.22.0.tar.sign create mode 100644 git-2.22.0.tar.xz delete mode 100644 worktree-fix-worktree-add-race.patch diff --git a/git-2.21.0.tar.sign b/git-2.21.0.tar.sign deleted file mode 100644 index d42e55154a3a2b88e0f2d07b15c70c5531f3ade0cd6a1a5b6ea149d8f364105d..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j-T@HVmj=OQ1+cc2y|M%`coA9RFfM5~QqIqco^|@no;;BwGO73> zwA@U#KO~|8kb~vuZkaR6ou5Y8{@V;}H&r?-o58BFGLvD7ggry!+@9e)#|d~+m48&c zqf_#&yu~g@;swtnfStIFgj9Fo80{48n{XmFWwood z>hegr_$Xgk_-P-2!i=e|s1qNcaY9)uAH^0c{k{2P0rEW9JNaT6pIzx_Wx& zA(pz>+B~25(WfQSwgn7R0e*V&ji#G^oQWQvI;qRBdI5)#kNy}B$?wvB(x{XA#CpXP zkAP_8U6O|e?kytFIb1z@FvE!QXlSya#qHf9{^YOow~rk$e6pBr6j&fDW`u@ujNsnT z%+YezS96eQxBCo%b$^kaU(G=J8ZK-t(r|(E{wL6^t~-$7P-x{# zq}=8BZ@W1X(oYxjkG$4%p8(x&^qap>^TeSO*er)#;mtVM@$Jt}kG+^eJtR}9V)H(U EP$hpJegFUf diff --git a/git-2.21.0.tar.xz b/git-2.21.0.tar.xz deleted file mode 100644 index 0201f5b..0000000 --- a/git-2.21.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ccb1ce743ee991d91697e163c47c11be4bf81efbdd9fb0b4a7ad77cc0020d28 -size 5491296 diff --git a/git-2.22.0.tar.sign b/git-2.22.0.tar.sign new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..15548ba7cec693dcc5be86d4bea5a60e2a2980b8cbd950499bfcc3515a59795d GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j-T@HVmj=OQ1+cbwKmgER|;TLxi4)33NXD>5)n6kRJNRP6*?+|kwPli8TKMyH* zb7k#ngY2&p{LmO{v+!=d7Rd}Wh@1gOGn5LUXoQ=R+_F&Ry8$4AHlY(H-KJCCxfOf6 zO0s2%3Yi$Sx*8h|N6dxj&Bq?sld%zDid?`45ah^OD)-nOBrq;Z(JT%TCCHZ^$YE;9 zT6cL)!qv%$;1ezQ)#cn(;8e7sptdRoDY=ZfI@6)o(>BY07J~p!R(PrhyHLbdr!{Hp zlLQpr30!gK?&vlkw3dgJl`xYzP4SV9KD@9&uq$3fSil`OY}Y~K0u}k$&EJi)ocQSj zPH{?1ieHQJv$dr|R>p1+21l7?E}dFha&+$s)oBY^_pwadhSD|kdr63vJH9=Ygiv9R zk32GGm;O)N;C}9W%mje9Cf0%UztuH6rpc2E(l;!u*}K4(OGiKXtri9@jsVb7Qc>*G zu`Y(d3gBAnHWIpAC^VXI#6>QOJ4dRh;X zUE`#+)KN%Oz80z$C`*AAXb>dyS@qlY1vM3xJCw6*x0l?*jM@ALXqW-OAqAu_m-_ + +- git 2.22.0 + * The filter specification "--filter=sparse:path=" used to + create a lazy/partial clone has been removed. Using a blob that is + part of the project as sparse specification is still supported with + the "--filter=sparse:oid=" option + * "git checkout --no-overlay" can be used to trigger a new mode of + checking out paths out of the tree-ish, that allows paths that + match the pathspec that are in the current index and working tree + and are not in the tree-ish. + * Four new configuration variables {author,committer}.{name,email} + have been introduced to override user.{name,email} in more specific + cases. + * "git branch" learned a new subcommand "--show-current". + * The command line completion (in contrib/) has been taught to + complete more subcommand parameters. + * The completion helper code now pays attention to repository-local + configuration (when available), which allows --list-cmds to honour + a repository specific setting of completion.commands, for example. + * The list of conflicted paths shown in the editor while concluding a + conflicted merge was shown above the scissors line when the + clean-up mode is set to "scissors", even though it was commented + out just like the list of updated paths and other information to + help the user explain the merge better. + * "git rebase" that was reimplemented in C did not set ORIG_HEAD + correctly, which has been corrected. + * "git worktree add" used to do a "find an available name with stat + and then mkdir", which is race-prone. This has been fixed by using + mkdir and reacting to EEXIST in a loop. +- Removed upstreamed patch worktree-fix-worktree-add-race.patch + * previous item + ------------------------------------------------------------------- Wed May 8 17:02:10 UTC 2019 - Dominique Leuenberger diff --git a/git.spec b/git.spec index 955e1ea..ac702f3 100644 --- a/git.spec +++ b/git.spec @@ -30,7 +30,7 @@ %bcond_without git_libsecret %bcond_without docs Name: git -Version: 2.21.0 +Version: 2.22.0 Release: 0 Summary: Fast, scalable, distributed revision control system License: GPL-2.0-only @@ -54,7 +54,6 @@ Patch6: git-tcsh-completion-fixes.diff # adapt paths in zsh completion (bnc#853183) Patch7: git-zsh-completion-fixes.diff Patch8: git-asciidoc.patch -Patch9: worktree-fix-worktree-add-race.patch Patch10: setup-don-t-fail-if-commondir-reference-is-deleted.patch Patch11: 0001-DOC-Move-to-DocBook-5-when-using-asciidoctor.patch BuildRequires: curl @@ -291,7 +290,6 @@ directory /git/ that calls the cgi script. %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 %patch10 -p1 %patch11 -p1 diff --git a/worktree-fix-worktree-add-race.patch b/worktree-fix-worktree-add-race.patch deleted file mode 100644 index c1b320b..0000000 --- a/worktree-fix-worktree-add-race.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e134801d570d0a0c85424eb80b41893f4d8383ca Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Wed, 13 Feb 2019 10:40:42 +0100 -Subject: [PATCH] worktree: fix worktree add race. - -Git runs a stat loop to find a worktree name that's available and then does -mkdir on the found name. Turn it to mkdir loop to avoid another invocation of -worktree add finding the same free name and creating the directory first. - -Signed-off-by: Michal Suchanek ---- -v2: -- simplify loop exit condition -- exit early if the mkdir fails for reason other than already present -worktree -- make counter unsigned ---- - builtin/worktree.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/builtin/worktree.c b/builtin/worktree.c -index 3f9907fcc994..85a604cfe98c 100644 ---- a/builtin/worktree.c -+++ b/builtin/worktree.c -@@ -268,10 +268,10 @@ static int add_worktree(const char *path, const char *refname, - struct strbuf sb_git = STRBUF_INIT, sb_repo = STRBUF_INIT; - struct strbuf sb = STRBUF_INIT; - const char *name; -- struct stat st; - struct child_process cp = CHILD_PROCESS_INIT; - struct argv_array child_env = ARGV_ARRAY_INIT; -- int counter = 0, len, ret; -+ unsigned int counter = 0; -+ int len, ret; - struct strbuf symref = STRBUF_INIT; - struct commit *commit = NULL; - int is_branch = 0; -@@ -295,8 +295,12 @@ static int add_worktree(const char *path, const char *refname, - if (safe_create_leading_directories_const(sb_repo.buf)) - die_errno(_("could not create leading directories of '%s'"), - sb_repo.buf); -- while (!stat(sb_repo.buf, &st)) { -+ -+ while (mkdir(sb_repo.buf, 0777)) { - counter++; -+ if ((errno != EEXIST) || !counter /* overflow */) -+ die_errno(_("could not create directory of '%s'"), -+ sb_repo.buf); - strbuf_setlen(&sb_repo, len); - strbuf_addf(&sb_repo, "%d", counter); - } -@@ -306,8 +310,6 @@ static int add_worktree(const char *path, const char *refname, - atexit(remove_junk); - sigchain_push_common(remove_junk_on_signal); - -- if (mkdir(sb_repo.buf, 0777)) -- die_errno(_("could not create directory of '%s'"), sb_repo.buf); - junk_git_dir = xstrdup(sb_repo.buf); - is_junk = 1; - --- -2.20.1 -