1. 29 Nov, 2010 1 commit
  2. 08 Oct, 2010 1 commit
  3. 01 Sep, 2010 1 commit
  4. 31 Aug, 2010 1 commit
  5. 25 Aug, 2010 1 commit
    • Linus Torvalds's avatar
      Fix 'git log' early pager startup error case · 1fda91b5
      Linus Torvalds authored
      We start the pager too early for several git commands, which results in
      the errors sometimes going to the pager rather than show up as errors.
      This is often hidden by the fact that we pass in '-X' to less by default,
      which causes 'less' to exit for small output, but if you do
        export LESS=-S
      you can then clearly see the problem by doing
        git log --prretty
      which shows the error message ("fatal: unrecognized argument: --prretty")
      being sent to the pager.
      This happens for pretty much all git commands that use USE_PAGER, and then
      check arguments separately. But "git diff" does it too early too (even
      though it does an explicit setup_pager() call)
      This only fixes it for the trivial "git log" family case.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  6. 24 Aug, 2010 1 commit
    • Jeff King's avatar
      pass "git -c foo=bar" params through environment · 2b64fc89
      Jeff King authored
      Git uses the "-c foo=bar" parameters to set a config
      variable for a single git invocation. We currently do this
      by making a list in the current process and consulting that
      list in git_config.
      This works fine for built-ins, but the config changes are
      silently ignored by subprocesses, including dashed externals
      and invocations to "git config" from shell scripts.
      This patch instead puts them in an environment variable
      which we consult when looking at config (both internally and
      via calls "git config").
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  7. 16 Aug, 2010 7 commits
  8. 11 Aug, 2010 5 commits
  9. 27 Jul, 2010 1 commit
  10. 14 Jul, 2010 1 commit
    • Jonathan Nieder's avatar
      git --paginate: paginate external commands again · 030149a4
      Jonathan Nieder authored
      73e25e7c (git --paginate: do not commit pager choice too early,
      2010-06-26) failed to take some cases into account.
      1b. Builtins that do not use RUN_SETUP (like git config) do
          not find GIT_DIR set correctly when the pager is launched
          from run_builtin().  So the core.pager configuration is
          not honored from subdirectories of the toplevel for them.
      4a. External git commands (like git request-pull) relied on the
          early pager launch to take care of handling the -p option.
          Ever since 73e25e7c, they do not honor the -p option at all.
      4b. Commands invoked through ! aliases (like ls) were also relying
          on the early pager launch.
      Fix (4a) by launching the pager (if requested) before running such a
      “dashed external”.  For simplicity, this still does not search for a
      .git directory before running the external command; when run from a
      subdirectory of the toplevel, therefore, the “[core] pager”
      configuration is still not honored.
      Fix (4b) by launching pager if requested before carrying out such an
      alias.  Actually doing this has no effect, since the pager (if any)
      would have already been launched in a failed attempt to try a
      dashed external first.  The choice-of-pager-not-honored-from-
      subdirectory bug still applies here, too.
      (1b) is not a regression.  There is no need to fix it yet.
      Noticed by Junio.
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  11. 28 Jun, 2010 1 commit
    • Duy Nguyen's avatar
      git --paginate: do not commit pager choice too early · 73e25e7c
      Duy Nguyen authored
      When git is passed the --paginate option, starting up a pager requires
      deciding what pager to start, which requires access to the core.pager
      At the relevant moment, the repository has not been searched for yet.
      Attempting to access the configuration at this point results in
      git_dir being set to .git [*], which is almost certainly not what was
      wanted.  In particular, when run from a subdirectory of the toplevel,
      git --paginate does not respect the core.pager setting from the
      current repository.
      [*] unless GIT_DIR or GIT_CONFIG is set
      So delay the pager startup when possible:
      1. run_argv() already commits pager choice inside run_builtin() if a
         command is found.  For commands that use RUN_SETUP, waiting until
         then fixes the problem described above: once git knows where to
         look, it happily respects the core.pager setting.
      2. list_common_cmds_help() prints out 29 lines and exits.  This can
         benefit from pagination, so we need to commit the pager choice
         before writing this output.
         Luckily ‘git’ without subcommand has no other reason to access a
         repository, so it would be intuitive to ignore repository-local
         configuration in this case.  Simpler for now to choose a pager
         using the funny code that notices a repository that happens to be
         at .git.  That this accesses a repository when it is very
         convenient to is a bug but not an important one.
      3. help_unknown_cmd() prints out a few lines to stderr.  It is not
         important to paginate this, so don’t.
      Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
      Acked-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  12. 13 Jun, 2010 1 commit
  13. 28 Mar, 2010 1 commit
  14. 02 Mar, 2010 1 commit
  15. 16 Feb, 2010 1 commit
  16. 14 Feb, 2010 1 commit
    • Johan Herland's avatar
      Builtin-ify git-notes · cd067d3b
      Johan Herland authored
      The builtin-ification includes some minor behavioural changes to the
      command-line interface: It is no longer allowed to mix the -m and -F
      arguments, and it is not allowed to use multiple -F options.
      As part of the builtin-ification, we add the commit_notes() function
      to the builtin API. This function (together with the notes.h API) can
      be easily used from other builtins to manipulate the notes tree.
      Also includes needed changes to t3301.
      This patch has been improved by the following contributions:
      - Stephen Boyd: Use die() instead of fprintf(stderr, ...) followed by exit(1)
      Cc: Stephen Boyd <bebarino@gmail.com>
      Signed-off-by: default avatarJohan Herland <johan@herland.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  17. 13 Feb, 2010 1 commit
  18. 05 Feb, 2010 1 commit
  19. 22 Jan, 2010 9 commits
  20. 18 Jan, 2010 1 commit
  21. 15 Jan, 2010 1 commit
    • Junio C Hamano's avatar
      grep: prepare to run outside of a work tree · 7e622650
      Junio C Hamano authored
      This moves the call to setup_git_directory() for running "grep" from
      the "git" wrapper to the implementation of the "grep" subcommand.  A
      new variable "use_index" is always true at this stage in the series,
      and when it is on, we require that we are in a directory that is under
      git control.  To make sure we die the same way, we make a second call
      into setup_git_directory() when we detect this situation.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  22. 21 Nov, 2009 1 commit