- Dec 01, 2021
-
-
Aloïs Micard authored
See: https://salsa.debian.org/go-team/infra/pkg-go-tools Gbp-Dch: Ignore
-
- Nov 06, 2021
-
-
Stephen Gelman authored
-
- Oct 15, 2021
-
-
Stephen Gelman authored
-
Stephen Gelman authored
-
- Mar 30, 2021
-
-
brian m. carlson authored
reader: properly implement io.Reader
-
brian m. carlson authored
The io.Reader interface specifies that once we reach an EOF indicator, the next read from the stream should return 0, io.EOF. However, our reader didn't work that way, causing us to attempt to read the next packet from the underlying reader. In some cases, such a packet won't exist until we've responded to the one we already got, causing us to hang. This was fixed in git-lfs/git-lfs#3902, but never ported over to here. Let's port that change over here, and add a Reset method to allow users to continue with the next packet if there's more data to read from the underlying stream.
-
- Feb 10, 2021
-
-
brian m. carlson authored
Add support for delimiter and empty packets
-
brian m. carlson authored
While the Git protocol documentation recommends that implementations SHOULD NOT emit empty packets, they are still valid packets, and we should handle them. Let's make sure we handle them correctly and return a nil body for a flush or delimiter packet and non-nil body for an empty packet and add tests for these cases. We change our invalid packets to contain 0003 instead.
-
brian m. carlson authored
Currently our read code knows nothing about delimiter packets and rejects them as invalid. However, even if we allowed such packets, we couldn't distinguish them from flush packets. We currently return nil as the array for flush packets and an empty but non-nil array for empty packets (those with the header 0004), but there is no other valid value we could use to represent delimiter packets. To help solve this problem in the cases we care about, let's add an additional set of functions which return the packet header length so we can distinguish between these cases and write correct code. We also update the existing ReadPacketList function to distinguish between empty packets (which we also don't currently support) and flush packets, and add tests for all of these cases.
-
- Feb 08, 2021
-
-
brian m. carlson authored
In addition to flush packets, which have the header value 0, Git has the concept of delimiter packets, which have the header value 1. Since we have a way to write flush packets, let's also add a way to write a delimiter packet as well.
-
- Sep 14, 2020
-
-
Chris Darroch authored
SECURITY.md: add link to main security policy doc
-
Chris Darroch authored
-
- Feb 25, 2020
-
-
brian m. carlson authored
Expand API and prepare for public release
-
- Feb 24, 2020
-
-
brian m. carlson authored
Add a basic README file and include the license from Git LFS, whence this code derives.
-
brian m. carlson authored
Since we now expose the underlying Pktline objects, let's add reader and writer objects that work with the underlying Pktline objects so that people can usefully use them together. Change some of the tests to use this new method so that we can get coverage of all cases.
-
brian m. carlson authored
Expand the public interface to include all of the low-level pkt-line methods so that people can use them. Allow instantiating every class by itself. Pull in the minInt function as a helper method so it's not necessary to depend on Git LFS and this library can be used by others. Finally, set the repository up for Go modules so it can be independently tested.
-
- Aug 10, 2017
-
-
Taylor Blau authored
commands/status: indicate missing objects
-
- Aug 08, 2017
-
-
Taylor Blau authored
-
- Aug 04, 2017
-
-
Taylor Blau authored
git: teach *PktlineWriter.Flush() to respond to nil receiver
-
- Aug 02, 2017
-
-
Taylor Blau authored
-
- Nov 22, 2016
-
-
Taylor Blau authored
`n`, representing the total number of bytes we have read into `p`, can never become `>len(p)`. As such, let's remove a check for that impossible condition.
-
Lars Schneider authored
If we read exactly the number of bytes that fit into `p` then implementation detected already an "overfilled" buffer and returned the number of read bytes `n` and `nil` as error. Fix this by treading the exact number not as "overfill". This way the next `readPacket()` call we will read an empty chunk and `read()` will return the number of read bytes `n` and `o.EOF` as (legitmate) error. c.f. https://github.com/git-lfs/git-lfs/issues/1697
-
- Nov 15, 2016
-
-
Taylor Blau authored
-
Taylor Blau authored
Previously, we flushed intermediate data out of the underlying *bufio.Writer used by the implementation of `pkt-line` in `*git.pktline` after _every_ write. This means that we would flush after partial packets, whole packets, and after pkt-line flush sequences. This is unnecessary. Let us instead flush only after an entire packet has been written, after writing the `0000` flush sequence. /ref git-lfs/git-lfs#1640
-
risk danger olson authored
-
risk danger olson authored
-
- Nov 11, 2016
-
-
Taylor Blau authored
-
- Nov 10, 2016
-
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
-
- Nov 09, 2016
-
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
-
- Nov 08, 2016
-
-
Taylor Blau authored
-
Taylor Blau authored
-
Taylor Blau authored
filter stream cleanup
-