Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

*: code quality improvements #1199

Merged
merged 7 commits into from
Jul 29, 2019
Merged

*: code quality improvements #1199

merged 7 commits into from
Jul 29, 2019

Commits on Jul 29, 2019

  1. plumbing/object: simplify code

    - Use append instead of ranged for loop
    - Simpler bool comparison
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 3918d0e)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    d3c45dc View commit details
    Browse the repository at this point in the history
  2. *: fixed tautological error conditionsautological error conditions

    - Added missing error handling around encodeCommitData and prevented shadowing
    err.
    
    - Removed tautological error checks.
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 7d76176)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    af46dd5 View commit details
    Browse the repository at this point in the history
  3. *: added missing error checks in tests

    When we assign a value to err, make sure to also check for it being nil
    afterwards. If those were intentionally unchecked, we should remove the
    assignment in the first place. Those checks certainly never harm, but please
    review thoroughly and let me know.
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 19d6f42)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    172a0d8 View commit details
    Browse the repository at this point in the history
  4. plumbing/format: idxfile, unsigned values are never < 0

    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 047bb4f)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    28675ba View commit details
    Browse the repository at this point in the history
  5. plumbing/format: simplify code

    Just a bit easier to read, in my opinion.
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 91d314c)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    bfe45ee View commit details
    Browse the repository at this point in the history
  6. *: avoid unnecessary conversions

    No need to convert these values, they're already of the right type.
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit a1d8a7a)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    e5c9c0d View commit details
    Browse the repository at this point in the history
  7. plumbing/object: don't assign err from ForEach loop

    Since we don't check the value anyway, as it can't possibly be anything but nil.
    
    Signed-off-by: Christian Muehlhaeuser <[email protected]>
    (cherry picked from commit 293e70f)
    muesli authored and mcuadros committed Jul 29, 2019
    Configuration menu
    Copy the full SHA
    ab19315 View commit details
    Browse the repository at this point in the history