首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Darcs记录空补丁

Darcs记录空补丁
EN

Stack Overflow用户
提问于 2014-05-28 01:45:09
回答 1查看 114关注 0票数 2

我正在编写一个存储库转换工具。问题就在于这件事。Git可以有空提交;Darcs不能。对于空的Mercurial提交,我刚刚创建了一个标记。我知道Darcs有标记,但我不知道如何从消息中删除标记前缀。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-28 05:51:35

您可以通过创建一个非空修补程序,然后使用amend-record向其添加反向更改,从而使Darcs生成一个空修补程序:

代码语言:javascript
复制
ganesh@scafell ~/temp/1
$ touch foo

ganesh@scafell ~/temp/1
$ darcs add foo
Adding 'foo'

ganesh@scafell ~/temp/1
$ darcs rec
addfile ./foo
Shall I record this change? (1/1)  [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
What is the patch name? foo
Finished recording patch 'foo'

ganesh@scafell ~/temp/1
$ rm foo

ganesh@scafell ~/temp/1
$ darcs amend
Wed May 28 06:49:22 GMT Daylight Time 2014  Ganesh Sittampalam <ganesh@earth.li>
  * foo
Shall I amend this patch? [yNjk...], or ? for more options: y
rmfile ./foo
Shall I record this change? (1/1)  [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
Finished amending patch:
Wed May 28 06:49:31 GMT Daylight Time 2014  Ganesh Sittampalam <ganesh@earth.li>
  * foo
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23901611

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档