summaryrefslogtreecommitdiff
path: root/builtin-fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-07 23:13:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-12-07 23:13:02 (GMT)
commit3a59bb22db24ff90c173ffb462fe67902a213d96 (patch)
treeaa4f56dcd531c232ea18a5242805e86cd50ced76 /builtin-fetch-pack.c
parent2dd620286e84e4e76226a3511af6d14755b8c809 (diff)
parent1c2ed59de2d14ad6ee9daa4d4f7254297d9a3830 (diff)
downloadgit-3a59bb22db24ff90c173ffb462fe67902a213d96.zip
git-3a59bb22db24ff90c173ffb462fe67902a213d96.tar.gz
git-3a59bb22db24ff90c173ffb462fe67902a213d96.tar.bz2
Merge branch 'maint'
* maint: GIT 1.6.0.5 "git diff <tree>{3,}": do not reverse order of arguments tag: delete TAG_EDITMSG only on successful tag gitweb: Make project specific override for 'grep' feature work http.c: use 'git_config_string' to get 'curl_http_proxy' fetch-pack: Avoid memcpy() with src==dst
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r--builtin-fetch-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 372bfa2..67fb80e 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -780,7 +780,8 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
struct ref *ref_cpy;
fetch_pack_setup();
- memcpy(&args, my_args, sizeof(args));
+ if (&args != my_args)
+ memcpy(&args, my_args, sizeof(args));
if (args.depth > 0) {
if (stat(git_path("shallow"), &st))
st.st_mtime = 0;