1. 01 Jun, 2018 1 commit
  2. 10 May, 2018 2 commits
    • Duy Nguyen's avatar
      Remove common-cmds.h · 60f487ac
      Duy Nguyen authored
      After the last patch, common-cmds.h is no longer used (and it was
      actually broken). Remove all related code. command-list.h will take
      its place from now on.
      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>
      60f487ac
    • Duy Nguyen's avatar
      generate-cmds.sh: export all commands to command-list.h · f318d739
      Duy Nguyen authored
      The current generate-cmds.sh generates just enough to print "git help"
      output. That is, it only extracts help text for common commands.
      
      The script is now updated to extract help text for all commands and
      keep command classification a new file, command-list.h. This will be
      useful later:
      
      - "git help -a" could print a short summary of all commands instead of
        just the common ones.
      
      - "git" could produce a list of commands of one or more category. One
        of its use is to reduce another command classification embedded in
        git-completion.bash.
      
      The new file can be generated but is not used anywhere yet. The plan
      is we migrate away from common-cmds.h. Then we can kill off
      common-cmds.h build rules and generation code (and also delete
      duplicate content in command-list.h which we keep for now to not mess
      generate-cmds.sh up too much).
      
      PS. The new fixed column requirement on command-list.txt is
      technically not needed. But it helps simplify the code a bit at this
      stage. We could lift this restriction later if we want to.
      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>
      f318d739
  3. 11 Apr, 2018 1 commit
    • Dan Jacques's avatar
      Makefile: generate Perl header from template file · f6a0ad4b
      Dan Jacques authored
      Currently, the generated Perl script headers are emitted by commands in
      the Makefile. This mechanism restricts options to introduce alternative
      header content, needed by Perl runtime prefix support, and obscures the
      origin of the Perl script header.
      
      Change the Makefile to generate a header by processing a template file and
      move the header content into the "perl/" subdirectory. The generated
      header content will now be stored in the "GIT-PERL-HEADER" file. This
      allows the content of the Perl header to be controlled by changing the path
      of the template in the Makefile.
      Signed-off-by: default avatarDan Jacques <dnj@google.com>
      Thanks-to: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
      Thanks-to: Johannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      f6a0ad4b
  4. 02 Apr, 2018 1 commit
  5. 15 Mar, 2018 1 commit
    • Brandon Williams's avatar
      serve: introduce git-serve · ed10cb95
      Brandon Williams authored
      Introduce git-serve, the base server for protocol version 2.
      
      Protocol version 2 is intended to be a replacement for Git's current
      wire protocol.  The intention is that it will be a simpler, less
      wasteful protocol which can evolve over time.
      
      Protocol version 2 improves upon version 1 by eliminating the initial
      ref advertisement.  In its place a server will export a list of
      capabilities and commands which it supports in a capability
      advertisement.  A client can then request that a particular command be
      executed by providing a number of capabilities and command specific
      parameters.  At the completion of a command, a client can request that
      another command be executed or can terminate the connection by sending a
      flush packet.
      Signed-off-by: default avatarBrandon Williams <bmwill@google.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      ed10cb95
  6. 09 Feb, 2017 1 commit
    • Johannes Schindelin's avatar
      rebase--helper: add a builtin helper for interactive rebases · 4557f1ad
      Johannes Schindelin authored
      Git's interactive rebase is still implemented as a shell script, despite
      its complexity. This implies that it suffers from the portability point
      of view, from lack of expressibility, and of course also from
      performance. The latter issue is particularly serious on Windows, where
      we pay a hefty price for relying so much on POSIX.
      
      Unfortunately, being such a huge shell script also means that we missed
      the train when it would have been relatively easy to port it to C, and
      instead piled feature upon feature onto that poor script that originally
      never intended to be more than a slightly pimped cherry-pick in a loop.
      
      To open the road toward better performance (in addition to all the other
      benefits of C over shell scripts), let's just start *somewhere*.
      
      The approach taken here is to add a builtin helper that at first intends
      to take care of the parts of the interactive rebase that are most
      affected by the performance penalties mentioned above.
      
      In particular, after we spent all those efforts on preparing the sequencer
      to process rebase -i's git-rebase-todo scripts, we implement the `git
      rebase -i --continue` functionality as a new builtin, git-rebase--helper.
      
      Once that is in place, we can work gradually on tackling the rest of the
      technical debt.
      
      Note that the rebase--helper needs to learn about the transient
      --ff/--no-ff options of git-rebase, as the corresponding flag is not
      persisted to, and re-read from, the state directory.
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      4557f1ad
  7. 25 Jan, 2017 1 commit
  8. 19 Jan, 2017 1 commit
  9. 17 Jan, 2017 1 commit
  10. 14 Dec, 2016 1 commit
  11. 15 Apr, 2016 1 commit
  12. 08 Feb, 2016 1 commit
  13. 03 Sep, 2015 1 commit
    • Stefan Beller's avatar
      submodule: rewrite `module_list` shell function in C · 74703a1e
      Stefan Beller authored
      Most of the submodule operations work on a set of submodules.
      Calculating and using this set is usually done via:
      
             module_list "$@" | {
                 while read mode sha1 stage sm_path
                 do
                      # the actual operation
                 done
             }
      
      Currently the function `module_list` is implemented in the
      git-submodule.sh as a shell script wrapping a perl script.
      The rewrite is in C, such that it is faster and can later be
      easily adapted when other functions are rewritten in C.
      
      git-submodule.sh, similar to the builtin commands, will navigate
      to the top-most directory of the repository and keep the
      subdirectory as a variable. As the helper is called from
      within the git-submodule.sh script, we are already navigated
      to the root level, but the path arguments are still relative
      to the subdirectory we were in when calling git-submodule.sh.
      That's why there is a `--prefix` option pointing to an alternative
      path which to anchor relative path arguments.
      Signed-off-by: Stefan Beller's avatarStefan Beller <sbeller@google.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      74703a1e
  14. 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
      worktree).
      
      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
         revision.
      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>
      959b5455
  15. 29 Jun, 2015 1 commit
  16. 12 Mar, 2015 1 commit
  17. 13 Oct, 2014 1 commit
  18. 01 Oct, 2014 1 commit
  19. 29 Jul, 2014 1 commit
  20. 15 Jul, 2014 1 commit
  21. 13 Jun, 2014 1 commit
  22. 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>
      9c94389c
  23. 24 Feb, 2014 1 commit
  24. 18 Nov, 2013 1 commit
  25. 12 Nov, 2013 4 commits
  26. 05 Aug, 2013 1 commit
  27. 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>
      226ad348
  28. 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>
      b4b594a3
  29. 10 Jun, 2013 1 commit
  30. 04 Jun, 2013 1 commit
  31. 28 Apr, 2013 1 commit
  32. 30 Jan, 2013 1 commit
  33. 10 Jan, 2013 1 commit
  34. 06 Jan, 2013 1 commit
  35. 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>
      96a4647f
  36. 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
      maintainer.
      
      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>
      8f26aa44