ソースを参照

add some client-side logging.

Jelmer Vernooij 4 年 前
コミット
77c84b0008
1 ファイル変更7 行追加0 行削除
  1. 7 0
      dulwich/client.py

+ 7 - 0
dulwich/client.py

@@ -40,6 +40,7 @@ Known capabilities that are not supported:
 
 from contextlib import closing
 from io import BytesIO, BufferedReader
+import logging
 import os
 import select
 import socket
@@ -111,6 +112,9 @@ from dulwich.refs import (
 )
 
 
+logger = logging.getLogger(__name__)
+
+
 class InvalidWants(Exception):
     """Invalid wants."""
 
@@ -626,6 +630,9 @@ class GitClient(object):
                 )
 
             if old_sha1 != new_sha1:
+                logger.debug(
+                    'Sending updated ref %r: %r -> %r',
+                    refname, old_sha1, new_sha1)
                 if sent_capabilities:
                     proto.write_pkt_line(old_sha1 + b" " + new_sha1 + b" " + refname)
                 else: