1. 09 5月, 2019 1 次提交
  2. 11 12月, 2018 2 次提交
    • M
      7642e5b9
    • J
      Restore pre-2.20.0 `git help` output · 9bb5ffa9
      Jacob Bednarz 提交于
      After upgrading to Git 2.20.0, all operations that relied on `hub alias`
      would indefinitely hang. It can be reproduced using the following:
      
      1. Create a new alias such as `st` for `git status`.
      2. Run `hub <alias>` in a git repository.
      
        ```
        $ hub st
      
        ... hangs forever
        ```
      
      Inspecting the running process shows that it is executing `git help -a`
      and not able to proceed. Digging into the `hub` shows that the `help`
      command is called within `IsBuiltInGitCommand`. Once this entrypoint was
      found, I started bisecting and found this works in 2.19.x but fails in
      2.20.x. Sure enough, the Git 2.20.0 release notes mention a
      corresponding change[1].
      
      >  * "git help -a" now gives verbose output (same as "git help -av").
      >    Those who want the old output may say "git help --no-verbose -a".
      
      It was even nice enough to include the backwards compatibility fix :)
      
      To fix the hanging, I've restored the existing behaviour by including
      the `--no-verbose` flag that mimics the 2.19.x behaviour.
      
      Fixes #1963
      
      [1]: https://github.com/git/git/blob/master/Documentation/RelNotes/2.20.0.txt#L17-L18
      9bb5ffa9
  3. 30 1月, 2018 1 次提交
  4. 01 8月, 2017 1 次提交
  5. 31 7月, 2017 1 次提交
    • M
      Refactor how commented sections are added to contents of text editor · 4837835d
      Mislav Marohnić 提交于
      Before, the code outside of `editor.go` was responsible for prefixing
      lines of the commented section with the comment char. The code to do
      this was scattered all over the codebase and was difficult to refactor
      re: adding support for `commentchar=auto`.
      
      Now, Editor has a `AddCommentedSection()` method that allows for
      declarative adding of a commented section. Furthermore, the caller
      doesn't have to query git to determine the comment char.
      4837835d
  6. 27 6月, 2017 2 次提交
  7. 07 11月, 2016 1 次提交
  8. 21 10月, 2016 1 次提交
  9. 04 10月, 2016 1 次提交
    • N
      Add a --push flag to hub pull-request. · 05d20393
      Natalie Weizenbaum 提交于
      This removes an extra step from the process of publishing a pull
      request. It also gives the user a chance to back out of the entire
      process by saving an empty pull request message.
      05d20393
  10. 12 9月, 2016 1 次提交
  11. 11 9月, 2016 1 次提交
    • M
      Fix printing content on Windows after successful run · 0c4689c6
      Mislav Marohnić 提交于
      The old `args.After("echo", ...)` approach won't cut it on Windows since
      there is no `echo` executable. Thus, nothing was printed on Windows.
      
      Instead, expand Args type with extra functionality that allows Go
      callbacks after all commands in the chain have been run.
      
      Also, the new `args.NoForward()` is now preferred to `os.Exit()` since
      it's more descriptive and allows `defer` in the calling function.
      0c4689c6
  12. 09 9月, 2016 1 次提交
  13. 08 8月, 2016 1 次提交
  14. 12 7月, 2016 1 次提交
  15. 28 2月, 2016 1 次提交
    • M
      Infer project name from git workdir root name instead of PWD · 0d3617fd
      Mislav Marohnić 提交于
      The `create` and `remote` commands needs to infer the current project
      name from the project's directory. Instead of using the current working
      directory, which doesn't necessarily match the project's toplevel
      directory, use `git rev-parse --show-toplevel` which also respects the
      `-C` global flag setting.
      
      Fixes #1105, closes #1114
      0d3617fd
  16. 24 1月, 2016 1 次提交
  17. 22 1月, 2016 2 次提交
    • M
      7bb98364
    • M
      Improve detecting local clone resources · c3ddec32
      Mislav Marohnić 提交于
      In `hub clone NAME`, "NAME" was previously considered a local resource
      if a directory of the same name existed, and the clone command was left
      unchanged.
      
      That worked for a while, but some users were surprised that they
      couldn't clone their repo named "NAME", only to discover that there was
      an unrelated directory "NAME" in the current working directory.
      
      Also, a git bundle is a valid cloneable resource, but is a file and not
      a directory.
      
      This refines the detection of cloneable resources. "NAME" is considered
      to be locally cloneable if one of the following is true:
      
      - "NAME/.git" exists
      - "NAME" is a bare git repo
      - "NAME" is a file whose first line includes "git bundle"
      c3ddec32
  18. 01 11月, 2015 1 次提交
    • M
      Cache result of `git rev-parse --git-dir` · e6823e8d
      Mislav Marohnić 提交于
      It's invoked often from different methods, but always has the same
      results. Cache it after the 1st run so subsequent runs are no-ops.
      
      Before:
      
          HUB_VERBOSE=1 git browse
          $ git config alias.browse
          $ git rev-parse -q --git-dir
          $ git rev-parse -q --git-dir
          $ git remote -v
          $ git rev-parse -q --git-dir
          $ git config hub.host
          $ git rev-parse -q --git-dir
          $ git config push.default
          $ git rev-parse -q --git-path refs/remotes/origin/no-angular
          $ git rev-parse -q --git-dir
          $ git rev-parse -q --git-dir
          $ git rev-parse -q --git-dir
      
      After (6 fewer invocations):
      
          HUB_VERBOSE=1 git browse
          $ git config alias.browse
          $ git rev-parse -q --git-dir
          $ git remote -v
          $ git config hub.host
          $ git config push.default
          $ git rev-parse -q --git-path refs/remotes/origin/no-angular
      e6823e8d
  19. 31 10月, 2015 2 次提交
    • M
      Go formatting fixes · 923402ad
      Mislav Marohnić 提交于
      [ci skip]
      923402ad
    • M
      Properly support `-C` git global flag · b51be1cf
      Mislav Marohnić 提交于
      From git documentation:
      
          -C <path> : Run as if git was started in <path> instead of the
                      current working directory. When multiple -C options are
                      given, each subsequent non-absolute -C <path> is
                      interpreted relative to the preceding -C <path>.
      
      We correctly forwarded the `-C <path>` values as git global flags to git
      invocations such as `git rev-parse --git-dir`, but that command is
      designed to return the result as a relative path to the value computed
      from `-C`. This adds an extra step to transform this relative path to an
      absolute one by applying values of `-C` as the base directory.
      b51be1cf
  20. 26 9月, 2015 2 次提交
    • M
      Detect `git rev-parse` output when on git version < 2.5 · 0e1ae6fd
      Mislav Marohnić 提交于
      We can't use `--git-path` on git versions older than 2.5. Those versions
      will simply echo `--git-path` as the first line of the output. Instead
      of stat'ing that as a file, skip this case and proceed immediately to
      fallback for other git versions.
      0e1ae6fd
    • J
      Handle git worktrees when computing the head repo · bb550cec
      Jason Zaugg 提交于
      Git 1.5.0 introduces support for worktrees. A worktree has a
      .git file, rather than a folder. (The file contents points to to a
      .git folder buried underneath the .git folder of the main repository.)
      
      A new option has been added to resolve paths within the git dir,
      `git rev-parse --git-path foo/bar`.
      
      The commit uses this new facility, but falls back to the old approach
      for backwards compability.
      
      Fixes #969
      bb550cec
  21. 07 4月, 2015 1 次提交
  22. 15 1月, 2015 1 次提交
  23. 13 1月, 2015 2 次提交
  24. 01 12月, 2014 3 次提交
  25. 17 7月, 2014 1 次提交
  26. 16 7月, 2014 1 次提交
  27. 20 2月, 2014 1 次提交
  28. 11 2月, 2014 1 次提交
  29. 06 1月, 2014 2 次提交
  30. 31 12月, 2013 1 次提交
  31. 28 12月, 2013 1 次提交