mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
git patch: create empty added files
This commit is contained in:
parent
2e3c2f2949
commit
803c7dd950
@ -369,6 +369,9 @@ def updatedir(ui, repo, patches, wlock=None):
|
||||
if gp and gp.mode:
|
||||
x = gp.mode & 0100 != 0
|
||||
dst = os.path.join(repo.root, gp.path)
|
||||
# patch won't create empty files
|
||||
if ctype == 'ADD' and not os.path.exists(dst):
|
||||
repo.wwrite(gp.path, '')
|
||||
util.set_exec(dst, x)
|
||||
cmdutil.addremove(repo, cfiles, wlock=wlock)
|
||||
files = patches.keys()
|
||||
|
Loading…
Reference in New Issue
Block a user