Commit f0d5a7b
committed
trace: add GIT_TRACE_STDIN
Sometimes tracing the invocation of git programs with
GIT_TRACE is not quite enough to replay a situation; the
interesting input to the program often comes over its
standard input. For instance, if you want to replay a
particular fetch (e.g., for performance analysis or
debugging), you would want both the arguments and stdin sent
to pack-objects.
This patch lets you capture the stdin of any git process.
For instance:
GIT_TRACE=/tmp/processes.out \
GIT_TRACE_STDIN=/tmp/stdin.%p \
git daemon ...
After a fetch, processes.out will contain a line like:
15:19:08.275493 [pid=13196] git.c:348 trace:
built-in: git 'pack-objects' '--revs' '--thin' '--stdout'
'--progress' '--delta-base-offset'
And stdin.13196 (the pid picked from the above line) will
contain its stdin.
Signed-off-by: Jeff King <peff@peff.net>1 parent 562a4d8 commit f0d5a7b
1 file changed
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
916 | 975 | | |
917 | 976 | | |
918 | 977 | | |
| |||
929 | 988 | | |
930 | 989 | | |
931 | 990 | | |
| 991 | + | |
932 | 992 | | |
933 | 993 | | |
934 | 994 | | |
| |||
0 commit comments