1. 17 9月, 2011 1 次提交
    • J
      branch --set-upstream: regression fix · fa799376
      Junio C Hamano 提交于
      The "git branch" command, while not in listing mode, calls create_branch()
      even when the target branch already exists, and it does so even when it is
      not interested in updating the value of the branch (i.e. the name of the
      commit object that sits at the tip of the existing branch). This happens
      when the command is run with "--set-upstream" option.
      
      The earlier safety-measure to prevent "git branch -f $branch $commit" from
      updating the currently checked out branch did not take it into account,
      and we no longer can update the tracking information of the current branch.
      
      Minimally fix this regression by telling the validation code if it is
      called to really update the value of a potentially existing branch, or if
      the caller merely is interested in updating auxiliary aspects of a branch.
      
      Reported-and-Tested-by: Jay Soffian
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fa799376
  2. 23 8月, 2011 4 次提交
  3. 19 8月, 2011 1 次提交
  4. 18 8月, 2011 1 次提交
  5. 17 8月, 2011 23 次提交
  6. 09 8月, 2011 3 次提交
  7. 06 8月, 2011 1 次提交
    • J
      fast-export: quote paths in output · 6280dfdc
      Jeff King 提交于
      Many pathnames in a fast-import stream need to be quoted. In
      particular:
      
        1. Pathnames at the end of an "M" or "D" line need quoting
           if they contain a LF or start with double-quote.
      
        2. Pathnames on a "C" or "R" line need quoting as above,
           but also if they contain spaces.
      
      For (1), we weren't quoting at all. For (2), we put
      double-quotes around the paths to handle spaces, but ignored
      the possibility that they would need further quoting.
      
      This patch checks whether each pathname needs c-style
      quoting, and uses it. This is slightly overkill for (1),
      which doesn't actually need to quote many characters that
      vanilla c-style quoting does. However, it shouldn't hurt, as
      any implementation needs to be ready to handle quoted
      strings anyway.
      
      In addition to adding a test, we have to tweak a test which
      blindly assumed that case (2) would always use
      double-quotes, whether it needed to or not.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6280dfdc
  8. 04 8月, 2011 3 次提交
  9. 02 8月, 2011 3 次提交