1. 27 Jun, 2010 2 commits
  2. 20 Oct, 2009 2 commits
    • Thomas Rast's avatar
      Introduce new pretty formats %g[sdD] for reflog information · 8f8f5476
      Thomas Rast authored
      Add three new --pretty=format escapes:
        %gD  long  reflog descriptor (e.g. refs/[email protected]{0})
        %gd  short reflog descriptor (e.g. [email protected]{0})
        %gs  reflog message
      This is achieved by passing down the reflog info, if any, inside the
      pretty_print_context struct.
      We use the newly refactored get_reflog_selector(), and give it some
      extra functionality to extract a shortened ref.  The shortening is
      cached inside the commit_reflogs struct; the only allocation of it
      happens in read_complete_reflog(), where it is initialised to 0.  Also
      add another helper get_reflog_message() for the message extraction.
      Note that the --format="%h %gD: %gs" tests may not work in real
      repositories, as the --pretty formatter doesn't know to leave away the
      ": " on the last commit in an incomplete (because git-gc removed the
      old part) reflog.  This equivalence is nevertheless the main goal of
      this patch.
      Thanks to Jeff King for reviews, the %gd testcase and documentation.
      Signed-off-by: default avatarThomas Rast <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
    • Thomas Rast's avatar
      reflog-walk: refactor the [email protected]{num} formatting · 72b103fe
      Thomas Rast authored
      We'll use the same output in an upcoming commit, so refactor its
      formatting (which was duplicated anyway) into a separate function.
      Signed-off-by: default avatarThomas Rast <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  3. 01 May, 2009 1 commit
  4. 20 Mar, 2009 1 commit
    • Jeff King's avatar
      make oneline reflog dates more consistent with multiline format · cd437120
      Jeff King authored
      The multiline reflog format (e.g., as shown by "git log -g")
      will show [email protected]{<date>} rather than [email protected]{<count>} in two
        1. If the user gave [email protected]{<date>} syntax to specify the
        2. If the user gave a --date=<format> specifier
      It uses the "normal" date format in case 1, and the
      user-specified format in case 2.
      The oneline reflog format (e.g., "git reflog show" or "git
      log -g --oneline") will show the date in the same two
      circumstances. However, it _always_ shows the date as a
      relative date, and it always ignores the timezone.
      In case 2, it seems ridiculous to trigger the date but use a
      format totally different from what the user requested.
      For case 1, it is arguable that the user might want to see
      the relative date by default; however, the multiline version
      shows the normal format.
      This patch does three things:
        - refactors the "relative_date" parameter to
          show_reflog_message to be an actual date_mode enum,
          since this is how it is used (it is passed to show_date)
        - uses the passed date_mode parameter in the oneline
          format (making it consistent with the multiline format)
        - does not ignore the timezone parameter in oneline mode
      Signed-off-by: default avatarJeff King <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  5. 22 Jul, 2008 1 commit
    • Johannes Schindelin's avatar
      Rename path_list to string_list · c455c87c
      Johannes Schindelin authored
      The name path_list was correct for the first usage of that data structure,
      but it really is a general-purpose string list.
      $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list)
      $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list)
      $ git mv path-list.h string-list.h
      $ git mv path-list.c string-list.c
      $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path)
      $ perl -i -pe 's/path/string/g' string-list.[ch]
      $ git mv Documentation/technical/api-path-list.txt \
      $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths)
      ... and then fix all users of string-list to access the member "string"
      instead of "path".
      Documentation/technical/api-string-list.txt needed some rewrapping, too.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  6. 25 Jul, 2007 1 commit
  7. 09 Feb, 2007 2 commits
  8. 02 Feb, 2007 1 commit
  9. 28 Jan, 2007 1 commit
  10. 21 Jan, 2007 5 commits