1. 14 Jan, 2019 1 commit
  2. 29 Jun, 2018 1 commit
  3. 30 Jan, 2018 2 commits
  4. 16 Oct, 2017 2 commits
  5. 15 Jun, 2017 1 commit
  6. 02 Jun, 2017 2 commits
  7. 30 May, 2017 1 commit
    • Ævar Arnfjörð Bjarmason's avatar
      C style: use standard style for "TRANSLATORS" comments · 66f5f6dc
      Ævar Arnfjörð Bjarmason authored
      Change all the "TRANSLATORS: [...]" comments in the C code to use the
      regular Git coding style, and amend the style guide so that the
      example there uses that style.
      This custom style was necessary back in 2010 when the gettext support
      was initially added, and was subsequently documented in commit
      cbcfd4e3 ("i18n: mention "TRANSLATORS:" marker in
      Documentation/CodingGuidelines", 2014-04-18).
      GNU xgettext hasn't had the parsing limitation that necessitated this
      exception for almost 3 years. Since its 0.19 release on 2014-06-02
      it's been able to recognize TRANSLATOR comments in the standard Git
      comment syntax[1].
      Usually we'd like to keep compatibility with software that's that
      young, but in this case literally the only person who needs to be
      using a gettext newer than 3 years old is Jiang Xin (the only person
      who runs & commits "make pot" results), so I think in this case we can
      make an exception.
      This xgettext parsing feature was added after a thread on the Git
      mailing list[2] which continued on the bug-gettext[3] list, but we
      never subsequently changed our style & styleguide, do so.
      There are already longstanding changes in git that use the standard
      comment style & have their TRANSLATORS comments extracted properly
      without getting the literal "*"'s mixed up in the text, as would
      happen before xgettext 0.19.
      Commit 7ff26832 ("builtin-am: implement -i/--interactive",
      2015-08-04) added one such comment, which in commit df0617bf ("l10n:
      git.pot: v2.6.0 round 1 (123 new, 41 removed)", 2015-09-05) got picked
      up in the po/git.pot file with the right format, showing that Jiang
      already runs a modern xgettext.
      The xgettext parser does not handle the sort of non-standard comment
      style that I'm amending here in sequencer.c, but that isn't standard
      Git comment syntax anyway. With this change to sequencer.c & "make
      pot" the comment in the pot file is now correct:
           #. TRANSLATORS: %s will be "revert", "cherry-pick" or
          -#. * "rebase -i".
          +#. "rebase -i".
      1. http://git.savannah.gnu.org/cgit/gettext.git/commit/?id=10af7fe6bd
      2. <2ce9ec406501d112e032c8208417f8100bed04c6.1397712142.git.worldhello.net@gmail.com>
      3. https://lists.gnu.org/archive/html/bug-gettext/2014-04/msg00016.htmlSigned-off-by: Ævar Arnfjörð Bjarmason's avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
      Acked-by: Jiang Xin's avatarJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  8. 08 May, 2017 2 commits
    • brian m. carlson's avatar
      Convert lookup_commit* to struct object_id · bc83266a
      brian m. carlson authored
      Convert lookup_commit, lookup_commit_or_die,
      lookup_commit_reference, and lookup_commit_reference_gently to take
      struct object_id arguments.
      Introduce a temporary in parse_object buffer in order to convert this
      function.  This is required since in order to convert parse_object and
      parse_object_buffer, lookup_commit_reference_gently and
      lookup_commit_or_die would need to be converted.  Not introducing a
      temporary would therefore require that lookup_commit_or_die take a
      struct object_id *, but lookup_commit would take unsigned char *,
      leaving a confusing and hard-to-use interface.
      parse_object_buffer will lose this temporary in a later patch.
      This commit was created with manual changes to commit.c, commit.h, and
      object.c, plus the following semantic patch:
      expression E1, E2;
      - lookup_commit_reference_gently(E1.hash, E2)
      + lookup_commit_reference_gently(&E1, E2)
      expression E1, E2;
      - lookup_commit_reference_gently(E1->hash, E2)
      + lookup_commit_reference_gently(E1, E2)
      expression E1;
      - lookup_commit_reference(E1.hash)
      + lookup_commit_reference(&E1)
      expression E1;
      - lookup_commit_reference(E1->hash)
      + lookup_commit_reference(E1)
      expression E1;
      - lookup_commit(E1.hash)
      + lookup_commit(&E1)
      expression E1;
      - lookup_commit(E1->hash)
      + lookup_commit(E1)
      expression E1, E2;
      - lookup_commit_or_die(E1.hash, E2)
      + lookup_commit_or_die(&E1, E2)
      expression E1, E2;
      - lookup_commit_or_die(E1->hash, E2)
      + lookup_commit_or_die(E1, E2)
      Signed-off-by: brian m. carlson's avatarbrian m. carlson <sandals@crustytoothpaste.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • brian m. carlson's avatar
      notes-utils: convert internals to struct object_id · 18b74e51
      brian m. carlson authored
      Convert the internals of create_notes_comit and commit_notes to use
      struct object_id.
      Signed-off-by: brian m. carlson's avatarbrian m. carlson <sandals@crustytoothpaste.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  9. 12 Jan, 2016 1 commit
    • Mike Hommey's avatar
      notes: allow treeish expressions as notes ref · ee76f92f
      Mike Hommey authored
      init_notes() is the main point of entry to the notes API. It ensures
      that the input can be used as ref, because it needs a ref to update to
      store notes tree after modifying it.
      There however are many use cases where notes tree is only read, e.g.
      "git log --notes=...".  Any notes-shaped treeish could be used for such
      purpose, but it is not allowed due to existing restriction.
      Allow treeish expressions to be used in the case the notes tree is going
      to be used without write "permissions".  Add a flag to distinguish
      whether the notes tree is intended to be used read-only, or will be
      With this change, operations that use notes read-only can be fed any
      notes-shaped tree-ish can be used, e.g. git log --notes=notes@{1}.
      Signed-off-by: default avatarMike Hommey <mh@glandium.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  10. 17 Aug, 2015 1 commit
  11. 12 Dec, 2014 1 commit
  12. 12 Jun, 2014 1 commit
    • Jeff King's avatar
      commit_tree: take a pointer/len pair rather than a const strbuf · 3ffefb54
      Jeff King authored
      While strbufs are pretty common throughout our code, it is
      more flexible for functions to take a pointer/len pair than
      a strbuf. It's easy to turn a strbuf into such a pair (by
      dereferencing its members), but less easy to go the other
      way (you can strbuf_attach, but that has implications about
      memory ownership).
      This patch teaches commit_tree (and its associated callers
      and sub-functions) to take such a pair for the commit
      message rather than a strbuf.  This makes passing the buffer
      around slightly more verbose, but means we can get rid of
      some dangerous strbuf_attach calls in the next patch.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  13. 07 Apr, 2014 1 commit
  14. 18 Feb, 2014 1 commit
  15. 05 Dec, 2013 1 commit
    • Christian Couder's avatar
      replace {pre,suf}fixcmp() with {starts,ends}_with() · 59556548
      Christian Couder authored
      Leaving only the function definitions and declarations so that any
      new topic in flight can still make use of the old functions, replace
      existing uses of the prefixcmp() and suffixcmp() with new API
      The change can be recreated by mechanically applying this:
          $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
            grep -v strbuf\\.c |
            xargs perl -pi -e '
      on the result of preparatory changes in this series.
      Signed-off-by: Christian Couder's avatarChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  16. 24 Oct, 2013 1 commit
  17. 12 Jun, 2013 2 commits