Code

work around Python warnings from AsciiDoc
[git.git] / builtin-fetch-pack.c
index 21ce3e016314e0c8500c9010b2ff214b1e05e022..22a57121a8cd58c43008e46fec4a4b8348310724 100644 (file)
@@ -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;