gpt4 book ai didi

svn - 如何使用 git-svn 设置 Subversion 属性

转载 作者:IT王子 更新时间:2023-10-29 00:55:43 26 4
gpt4 key购买 nike

有没有办法在由 git-svn 创建的 git 存储库上设置 subversion 属性?

在我的例子中,我想编辑 svn:externalsvn:ignoresvn:executable.

然而,这样做的唯一方法似乎涉及使用颠覆客户端进行 checkout 。有没有一种方法可以编辑 svn 属性而无需检查存储库两次(一次用于 git,一次用于 svn 用于属性)?

最佳答案

注意:git 2.3.0(2015 年 2 月)支持带有 git svn 的 proset .
参见 commit 83c9433通过 Alfred Perlstein (splbio) :

git-svn: support for git-svn propset

This change allows git-svn to support setting subversion properties.

It is useful for manually setting properties when committing to a subversion repo that requires properties to be set without requiring moving your changeset to separate subversion checkout in order to set props.

There is a nit to point out: the code does not support adding props unless there are also content changes to the files as well.
This is demonstrated in the testcase.

因此,如 t/t9148-git-svn-propset.sh 中所示,这现在有效:

git svn propset "$1" "$2" "$file" 
# like
git svn propset "svn:keywords" "FreeBSD=%H" "foo"

关于svn - 如何使用 git-svn 设置 Subversion 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1271449/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com