1. 19 Aug, 2015 1 commit
    • Heiko Voigt's avatar
      submodule: implement a config API for lookup of .gitmodules values · 959b5455
      Heiko Voigt authored
      In a superproject some commands need to interact with submodules. They
      need to query values from the .gitmodules file either from the worktree
      of from certain revisions. At the moment this is quite hard since a
      caller would need to read the .gitmodules file from the history and then
      parse the values. We want to provide an API for this so we have one
      place to get values from .gitmodules from any revision (including the
      The API is realized as a cache which allows us to lazily read
      .gitmodules configurations by commit into a runtime cache which can then
      be used to easily lookup values from it. Currently only the values for
      path or name are stored but it can be extended for any value needed.
      It is expected that .gitmodules files do not change often between
      commits. Thats why we lookup the .gitmodules sha1 from a commit and then
      either lookup an already parsed configuration or parse and cache an
      unknown one for each sha1. The cache is lazily build on demand for each
      requested commit.
      This cache can be used for all purposes which need knowledge about
      submodule configurations. Example use cases are:
       * Recursive submodule checkout needs to lookup a submodule name from
         its path when a submodule first appears. This needs be done before
         this configuration exists in the worktree.
       * The implementation of submodule support for 'git archive' needs to
         lookup the submodule name to generate the archive when given a
         revision that is not checked out.
       * 'git fetch' when given the --recurse-submodules=on-demand option (or
         configuration) needs to lookup submodule names by path from the
         database rather than reading from the worktree. For new submodule it
         needs to lookup the name from its path to allow cloning new
         submodules into the .git folder so they can be checked out without
         any network interaction when the user does a checkout of that
      Signed-off-by: Heiko Voigt's avatarHeiko Voigt <hvoigt@hvoigt.net>
      Signed-off-by: Stefan Beller's avatarStefan Beller <sbeller@google.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  2. 12 Mar, 2015 1 commit
  3. 13 Oct, 2014 1 commit
  4. 01 Oct, 2014 1 commit
  5. 29 Jul, 2014 1 commit
  6. 15 Jul, 2014 1 commit
  7. 13 Jun, 2014 1 commit
  8. 12 May, 2014 1 commit
    • Torsten Bögershausen's avatar
      utf8: make it easier to auto-update git_wcwidth() · 9c94389c
      Torsten Bögershausen authored
      The function git_wcwidth() returns for a given unicode code point the
      width on the display:
       -1 for control characters,
        0 for combining or other non-visible code points
        1 for e.g. ASCII
        2 for double-width code points.
      This table had been originally been extracted for one Unicode
      version, probably 3.2.
      We now use two tables these days, one for zero-width and another for
      double-width.  Make it easier to update these tables to a later
      version of Unicode by factoring out the table from utf8.c into
      unicode_width.h and add the script update_unicode.sh to update the
      table based on the latest Unicode specification files.
      Thanks to Peter Krefting <peter@softwolves.pp.se> and Kevin Bracey
      <kevin@bracey.fi> for helping with their Unicode knowledge.
      Signed-off-by: default avatarTorsten Bögershausen <tboegi@web.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  9. 24 Feb, 2014 1 commit
  10. 18 Nov, 2013 1 commit
  11. 12 Nov, 2013 4 commits
  12. 05 Aug, 2013 1 commit
  13. 13 Jul, 2013 1 commit
    • Eric Sunshine's avatar
      builtin: add git-check-mailmap command · 226ad348
      Eric Sunshine authored
      Introduce command check-mailmap, similar to check-attr and check-ignore,
      which allows direct testing of .mailmap configuration.
      As plumbing accessible to scripts and other porcelain, check-mailmap
      publishes the stable, well-tested .mailmap functionality employed by
      built-in Git commands.  Consequently, script authors need not
      re-implement .mailmap functionality manually, thus avoiding potential
      quirks and behavioral differences.
      Signed-off-by: Eric Sunshine's avatarEric Sunshine <sunshine@sunshineco.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  14. 11 Jun, 2013 1 commit
    • Junio C Hamano's avatar
      prio-queue: priority queue of pointers to structs · b4b594a3
      Junio C Hamano authored
      Traditionally we used a singly linked list of commits to hold a set
      of in-flight commits while traversing history.  The most typical use
      of the list is to add commits that are newly discovered to it, keep
      the list sorted by commit timestamp, pick up the newest one from the
      list, and keep digging.  The cost of keeping the singly linked list
      sorted is nontrivial, and this typical use pattern better matches a
      priority queue.
      Introduce a prio-queue structure, that can be used either as a LIFO
      stack, or a priority queue.  This will be used in the next patch to
      hold in-flight commits during sort-in-topological-order.
      Tests and the idea to make it usable for any "void *" pointers to
      "things" are by Jeff King.  Bugs are mine.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  15. 10 Jun, 2013 1 commit
  16. 04 Jun, 2013 1 commit
  17. 28 Apr, 2013 1 commit
  18. 30 Jan, 2013 1 commit
  19. 10 Jan, 2013 1 commit
  20. 06 Jan, 2013 1 commit
  21. 19 Dec, 2012 1 commit
    • Christian Couder's avatar
      Makefile: detect when PYTHON_PATH changes · 96a4647f
      Christian Couder authored
      When make is run, the python scripts are created from *.py files that
      are changed to use the python given by PYTHON_PATH. And PYTHON_PATH
      is set by default to /usr/bin/python on Linux.
      This is nice except when you run make another time setting a
      different PYTHON_PATH, because, as the python scripts have already
      been created, make finds nothing to do.
      The goal of this patch is to detect when the PYTHON_PATH changes and
      to create the python scripts again when this happens. To do that we
      use the same trick that is done to track other variables like prefix,
      flags, tcl/tk path and shell path. We update a GIT-PYTHON-VARS file
      with the PYTHON_PATH and check if it changed.
      Signed-off-by: Christian Couder's avatarChristian Couder <chriscool@tuxfamily.org>
      Acked-by: default avatarPete Wyckoff <pw@padd.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  22. 18 Dec, 2012 1 commit
    • Christian Couder's avatar
      Makefile: remove tracking of TCLTK_PATH · 8f26aa44
      Christian Couder authored
      It looks like we are tracking the value of TCLTK_PATH in the main
      Makefile for no good reason.
      This patch removes the useless code used to do this tracking.
      Maybe this code should have been moved to gitk-git/Makefile by
      62ba5143 (Move gitk to its own subdirectory, 2007-11-17).
      A patch to do that has just been sent to Paul Mackerras, the gitk
      While at it, this patch removes /gitk-git/gitk-wish from
      .gitignore as it should be in /gitk-git/.gitignore and the patch
      sent to Paul put it there.
      Signed-off-by: Christian Couder's avatarChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  23. 29 Nov, 2012 1 commit
  24. 15 Oct, 2012 1 commit
  25. 07 Oct, 2012 1 commit
  26. 12 Sep, 2012 1 commit
    • Michael Haggerty's avatar
      string_list: add two new functions for splitting strings · ff919f96
      Michael Haggerty authored
      Add two new functions, string_list_split() and
      string_list_split_in_place().  These split a string into a string_list
      on a separator character.  The first makes copies of the substrings
      (leaving the input string untouched) and the second splits the
      original string in place, overwriting the separator characters with
      NULs and referring to the original string's memory.
      These functions are similar to the strbuf_split_*() functions except
      that they work with the more powerful string_list interface.
      Signed-off-by: default avatarMichael Haggerty <mhagger@alum.mit.edu>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  27. 03 Sep, 2012 1 commit
  28. 09 Jul, 2012 3 commits
  29. 25 Jun, 2012 1 commit
  30. 27 Apr, 2012 1 commit
    • Duy Nguyen's avatar
      Add column layout skeleton and git-column · 7e29b825
      Duy Nguyen authored
      A column option string consists of many token separated by either
      a space or a  comma. A token belongs to one of three groups:
       - enabling: always, never and auto
       - layout mode: currently plain (which does not layout at all)
       - other future tuning flags
      git-column can be used to pipe output to from a command that wants
      column layout, but not to mess with its own output code. Simpler output
      code can be changed to use column layout code directly.
      Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
      Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  31. 11 Apr, 2012 1 commit
  32. 09 Apr, 2012 1 commit
  33. 30 Mar, 2012 1 commit
  34. 13 Dec, 2011 1 commit
    • Jeff King's avatar
      credentials: add "store" helper · 71e1b4b6
      Jeff King authored
      This is like "cache", except that we actually put the
      credentials on disk. This can be terribly insecure, of
      course, but we do what we can to protect them by filesystem
      permissions, and we warn the user in the documentation.
      This is not unlike using .netrc to store entries, but it's a
      little more user-friendly. Instead of putting credentials in
      place ahead of time, we transparently store them after
      prompting the user for them once.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  35. 12 Dec, 2011 1 commit
    • Jeff King's avatar
      credentials: add "cache" helper · e2770979
      Jeff King authored
      If you access repositories over smart-http using http
      authentication, then it can be annoying to have git ask you
      for your password repeatedly. We cache credentials in
      memory, of course, but git is composed of many small
      programs. Having to input your password for each one can be
      This patch introduces a credential helper that will cache
      passwords in memory for a short period of time.
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>