531
final flush packet. Also note that the "value" of a "key=value" pair
532
can contain the "=" character whereas the key would never contain
533
that character.
534
-------------------------
534
+
535
+-----------------------
536
packet: git> command=smudge
537
packet: git> pathname=path/testfile.dat
538
packet: git> 0000
539
packet: git> CONTENT
540
packet: git> 0000
540
-------------------------
541
+-----------------------
542
543
The filter is expected to respond with a list of "key=value" pairs
544
terminated with a flush packet. If the filter does not experience
560
561
If the result content is empty then the filter is expected to respond
562
with a "success" status and a flush packet to signal the empty content.
563
+
564
------------------------
565
packet: git< status=success
566
packet: git< 0000
570
571
In case the filter cannot or does not want to process the content,
572
it is expected to respond with an "error" status.
571
-------------------------
573
+
574
+-----------------------
575
packet: git< status=error
576
packet: git< 0000
574
-------------------------
577
+-----------------------
578
579
If the filter experiences an error during processing, then it can
580
send the status "error" after the content was (partially or
581
completely) sent.
582
+
583
------------------------
584
packet: git< status=success
585
packet: git< 0000
593
as well as any future content for the lifetime of the Git process,
594
then it is expected to respond with an "abort" status at any point
595
in the protocol.
592
-------------------------
596
+
597
+-----------------------
598
packet: git< status=abort
599
packet: git< 0000
595
-------------------------
600
+-----------------------
601
602
Git neither stops nor restarts the filter process in case the
603
"error"/"abort" status is set. However, Git sets its exit code
618
denotes that the filter can delay filtering the current blob (e.g. to
619
compensate network latencies) by responding with no content but with
620
the status "delayed" and a flush packet.
616
-------------------------
621
+
622
+-----------------------
623
packet: git> command=smudge
624
packet: git> pathname=path/testfile.dat
625
packet: git> can-delay=1
628
packet: git> 0000
629
packet: git< status=delayed
630
packet: git< 0000
625
-------------------------
631
+-----------------------
632
633
If the filter supports the "delay" capability then it must support the
634
"list_available_blobs" command. If Git sends this command, then the
653
packet: git< 0000
654
------------------------
655
656
+
657
After Git received the pathnames, it will request the corresponding
658
blobs again. These requests contain a pathname and an empty content
659
section. The filter is expected to respond with the smudged content
660
in the usual way as explained above.
661
+
662
------------------------
663
packet: git> command=smudge
664
packet: git> pathname=path/testfile.dat