1. 20 2月, 2008 1 次提交
    • J
      branch: optionally setup branch.*.merge from upstream local branches · 9ed36cfa
      Jay Soffian 提交于
      "git branch" and "git checkout -b" now honor --track option even when
      the upstream branch is local.  Previously --track was silently ignored
      when forking from a local branch.  Also the command did not error out
      when --track was explicitly asked for but the forked point specified
      was not an existing branch (i.e. when there is no way to set up the
      tracking configuration), but now it correctly does.
      
      The configuration setting branch.autosetupmerge can now be set to
      "always", which is equivalent to using --track from the command line.
      Setting branch.autosetupmerge to "true" will retain the former behavior
      of only setting up branch.*.merge for remote upstream branches.
      
      Includes test cases for the new functionality.
      Signed-off-by: NJay Soffian <jaysoffian@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9ed36cfa
  2. 12 7月, 2007 1 次提交
    • J
      branch --track: code cleanup and saner handling of local branches · 6f084a56
      Johannes Schindelin 提交于
      This patch cleans up some complicated code, and replaces it with a
      cleaner version, using code from remote.[ch], which got extended a
      little in the process.  This also enables us to fix two cases:
      
      The earlier "fix" to setup tracking only when the original ref started
      with "refs/remotes" is wrong.  You are absolutely allowed to use a
      separate layout for your tracking branches.  The correct fix, of course,
      is to set up tracking information only when there is a matching
      remote.<nick>.fetch line containing a colon.
      
      Another corner case was not handled properly.  If two remotes write to
      the original ref, just warn the user and do not set up tracking.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6f084a56
  3. 09 7月, 2007 1 次提交
    • J
      branch.autosetupmerge: allow boolean values, or "all" · 4017761f
      Johannes Schindelin 提交于
      Junio noticed that switching on autosetupmerge unilaterally started
      cluttering the config for local branches.  That is not the original
      intention of branch.autosetupmerge, which was meant purely for
      convenience when branching off of remote branches, but that semantics
      got lost somewhere.
      
      If you still want that "new" behavior, you can switch
      branch.autosetupmerge to the value "all".  Otherwise, it is interpreted
      as a boolean, which triggers setting up defaults _only_ when branching
      off of a remote branch, i.e. the originally intended behavior.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4017761f
  4. 03 7月, 2007 1 次提交
  5. 16 6月, 2007 1 次提交
  6. 10 6月, 2007 1 次提交
  7. 06 6月, 2007 1 次提交
  8. 07 4月, 2007 2 次提交
  9. 06 4月, 2007 1 次提交
  10. 16 3月, 2007 1 次提交
    • P
      git-fetch, git-branch: Support local --track via a special remote '.' · 9debc324
      Paolo Bonzini 提交于
      This patch adds support for a dummy remote '.' to avoid having
      to declare a fake remote like
      
              [remote "local"]
                      url = .
                      fetch = refs/heads/*:refs/heads/*
      
      Such a builtin remote simplifies the operation of "git-fetch",
      which will populate FETCH_HEAD but will not pretend that two
      repositories are in use, will not create a thin pack, and will
      not perform any useless remapping of names.  The speed
      improvement is around 20%, and it should improve more if
      "git-fetch" is converted to a builtin.
      
      To this end, git-parse-remote is grown with a new kind of
      remote, 'builtin'.  In git-fetch.sh, we treat the builtin remote
      specially in that it needs no pack/store operations.  In fact,
      doing git-fetch on a builtin remote will simply populate
      FETCH_HEAD appropriately.
      
      The patch also improves of the --track/--no-track support,
      extending it so that branch.<name>.remote items referring '.'
      can be created.  Finally, it fixes a typo in git-checkout.sh.
      Signed-off-by: NPaolo Bonzini  <bonzini@gnu.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9debc324
  11. 11 3月, 2007 1 次提交
    • P
      git-branch, git-checkout: autosetup for remote branch tracking · 0746d19a
      Paolo Bonzini 提交于
      In order to track and build on top of a branch 'topic' you track from
      your upstream repository, you often would end up doing this sequence:
      
        git checkout -b mytopic origin/topic
        git config --add branch.mytopic.remote origin
        git config --add branch.mytopic.merge refs/heads/topic
      
      This would first fork your own 'mytopic' branch from the 'topic'
      branch you track from the 'origin' repository; then it would set up two
      configuration variables so that 'git pull' without parameters does the
      right thing while you are on your own 'mytopic' branch.
      
      This commit adds a --track option to git-branch, so that "git
      branch --track mytopic origin/topic" performs the latter two actions
      when creating your 'mytopic' branch.
      
      If the configuration variable branch.autosetupmerge is set to true, you
      do not have to pass the --track option explicitly; further patches in
      this series allow setting the variable with a "git remote add" option.
      The configuration variable is off by default, and there is a --no-track
      option to countermand it even if the variable is set.
      Signed-off-by: NPaolo Bonzini  <bonzini@gnu.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0746d19a
  12. 29 1月, 2007 1 次提交
  13. 08 1月, 2007 1 次提交
  14. 17 12月, 2006 1 次提交
  15. 06 12月, 2006 2 次提交
  16. 24 10月, 2006 1 次提交
    • J
      t3200: git-branch testsuite update · 5d9e8ee7
      Junio C Hamano 提交于
      The test expected "git branch --help" to exit successfully, but
      built-ins spawn "man" when given --help, and when the test is
      run, manpages may not be installed yet and "man" can legally
      exit non-zero in such a case.
      
      Also the new implementation logs "Created from master", instead
      of "Created from HEAD" in the reflog, which makes a lot more
      sense, so adjust the test to match that.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5d9e8ee7
  17. 26 9月, 2006 1 次提交
  18. 25 5月, 2006 1 次提交
    • S
      Test that git-branch -l works. · d7fb7a37
      Shawn Pearce 提交于
      If the user supplies -l to git-branch when creating a new branch
      then the new branch's log should be created automatically and the
      branch creation should be logged in that log.
      
      Further if a branch is being deleted and it had a log then also
      verify that the log was deleted.
      
      Test git-checkout -b foo -l for creating a new branch foo with a
      log and checking out that branch.
      
      Fixed git-checkout -b foo -l as the branch variable name was
      incorrect in the script.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d7fb7a37
  19. 14 12月, 2005 1 次提交
  20. 15 11月, 2005 1 次提交
  21. 09 9月, 2005 1 次提交
    • J
      'build' scripts before installing. · bc6146d2
      Junio C Hamano 提交于
      Earlier we renamed git-foo.sh to git-foo while installing, which
      was mostly done by inertia than anything else.  This however
      made writing tests to use scripts harder.
      
      This patch builds the scripts the same way as we build binaries
      from their sources.  As a side effect, you can now specify
      non-standard paths you have your Perl binary is in when running
      the make.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      bc6146d2
  22. 08 9月, 2005 1 次提交