git log between closed interval

0

Receiving a start date and an end date and need to get all commits between this interval but the git log interval is opened in this way no commit that is on the exact date of the final day is obtained.

An example and using the following command:

git log  --before=2017-10-09T11:53:52.089+0000 --after=2017-10-04T12:18:34.287+0000

But it uses an open interval or it does not show the values between days 4 to 9 and yes of days 4 to 8 as can be seen in the following log:

commit d4677be5c080b2ce502c281ab116c1e5a2589047
Author: Rossen Stoyanchev <[email protected]>
Date:   Fri Oct 6 21:29:36 2017 -0400

    Improve Web Servlet section structure

commit 9998c63ee4d4a3987d50c1d4ad8afade6a8b6646
Author: Rossen Stoyanchev <[email protected]>
Date:   Fri Oct 6 13:11:15 2017 -0400

    Compact headings in Web Servlet section

    Optimized for viewing in left TOC.

commit b47905f0507bb204470655d1e1578da53d5a76e1
Merge: 3533db7 fba2633
Author: Stephane Nicoll <[email protected]>
Date:   Fri Oct 6 07:46:18 2017 +0200

    Merge pull request #1549 from WilderPereira:patch-1

    * pr/1549:
      Fix doc format

commit fba2633e6e20d083bf13cb545827b04ba4ff71aa
Author: Wilder Pereira <[email protected]>
Date:   Thu Oct 5 22:43:37 2017 -0300

    Fix doc format

    Closes gh-1549

commit 3533db78d24117d11a598b38a06422a9360faedf
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 23:33:21 2017 -0400

    Fix broken link to overview

commit b11caeb3ea763bf26680ffedba9bde9e740fdf4e
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 22:43:26 2017 -0400

    Fix headings in WebFlux section

commit ee3913c6d0e092ba798fb9fb4fc1d758b8692e36
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 22:23:38 2017 -0400

    Use Tocbot for Table of Contents

commit 8aaa7e9cc7c0618b64be9b052689db39471e6617
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 15:31:27 2017 -0400

    Polish index.html

commit eea8ee2165d694165364692bfd1ad761bb7fc09d
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 14:22:26 2017 -0400

    Migrate JSP tag library appendix reference to Javadoc.

    The Javadoc on tag classes now has all the information including a
    list of all tags at the package level, HTML tables listing tag
    attributes in each tag class, and class level description that is
    as good or in many cases better than what was in the reference.

    Issue: SPR-16045

commit e5a5677fcd2a0948be5ab87fbd418fdc7b2b1daf
Author: Rossen Stoyanchev <[email protected]>
Date:   Thu Oct 5 07:23:18 2017 -0400

    Appendix refactoring

    1. Move schemas to local appendix within each top-level section.
    2. Link to Javadoc for JSP tags
    3. Purge Class Spring usage information

    Issue: SPR-16045

commit d04d4bfb4d4bfabd7cef417d5b45fd992603a18f
Author: Rossen Stoyanchev <[email protected]>
Date:   Wed Oct 4 14:58:11 2017 -0400

    Better "no content" support and polish in WebTestClient

    The WebTestClient now takes advantage of the support for decoding
    response to Void.class in WebClient so that applications can use
    expectBody(Void.class) to the same effect as using
    response.bodyToMono(Void.class) as documneted on WebClient#exchange.

    The top-level, no-arg returnResult method (added very recently) has been
    retracted, since the use of returnResult at that level, i.e. without
    consuming the response content, should be used mainly for streaming.
    It shouldn't be used for "no content" scenarios.

    Documentation and Javadoc have been udpated accordingly.

commit decb6329dba834043d72c44457d997d0409eda4f
Author: Rossen Stoyanchev <[email protected]>
Date:   Wed Oct 4 04:50:11 2017 -0400

    DefaultWebTestClient internal refactoring

    Use the ClientResponse methods bodyToMono and bodyToFlux rather than
    passing in a BodyExtractor so that WebTestclient now also benefits from
    the recently improved handling of Void.class.

Note: The log shows until day 6 because there are no commits on days 7 and 8 but there are commits on day 9.

How can I get commits between this closed interval?

    
asked by anonymous 11.10.2017 / 15:39

1 answer

0

git log --before=2017-10-10T11:53:52.089+0000 --after=2017-10-04T12:18:34.287+0000

If default does not show the last day (9), add another day (10). This way it will show the day 9 and will not show from the 10th.

    
26.07.2018 / 12:58