diff options
author | Quentin Casasnovas <quentin.casasnovas@oracle.com> | 2015-01-27 14:03:57 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruen@gnu.org> | 2015-01-31 22:14:01 +0100 |
commit | 82b800c9552a088a241457948219d25ce0a407a4 (patch) | |
tree | c92ede6a87a5d43780a5ab9fcc550de919aaa6a8 | |
parent | 68d39ff29f03cd85b5993ff17d2adf6c7ff9e496 (diff) | |
download | patch-82b800c9552a088a241457948219d25ce0a407a4.tar.gz |
patch: git-diff mode: do not change permissions if there isn't an explicit mode change.
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
-rw-r--r-- | src/patch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/patch.c b/src/patch.c index 64f4391..2c51f44 100644 --- a/src/patch.c +++ b/src/patch.c @@ -543,7 +543,7 @@ main (int argc, char **argv) enum file_attributes attr = 0; struct timespec new_time = pch_timestamp (! reverse); mode_t mode = file_type | - ((new_mode ? new_mode : instat.st_mode) & S_IRWXUGO); + ((set_mode ? new_mode : instat.st_mode) & S_IRWXUGO); if ((set_time | set_utc) && new_time.tv_sec != -1) { |