1. 14 5月, 2011 4 次提交
  2. 06 5月, 2011 4 次提交
  3. 05 5月, 2011 12 次提交
  4. 30 4月, 2011 5 次提交
    • J
      merge-one-file: fix broken merges with alternate work trees · 6aaeca90
      Jeff King 提交于
      The merge-one-file tool predates the invention of
      GIT_WORK_TREE. By the time GIT_WORK_TREE was invented, most
      people were using the merge-recursive strategy, which
      handles resolving internally. Therefore these features have
      had very little testing together.
      
      For the most part, merge-one-file just works with
      GIT_WORK_TREE; most of its heavy lifting is done by plumbing
      commands which do respect GIT_WORK_TREE properly. The one
      exception is a shell redirection which touches the worktree
      directly, writing results to the wrong place in the presence
      of a GIT_WORK_TREE variable.
      
      This means that merges won't even fail; they will silently
      produce incorrect results, throwing out the entire "theirs"
      side of files which need content-level merging!
      
      This patch makes merge-one-file chdir to the toplevel of the
      working tree (and exit if we don't have one). This most
      closely matches the assumption made by the original script
      (before separate work trees were invented), and matches what
      happens when the script is called as part of a merge
      strategy.
      
      While we're at it, we'll also error-check the call to cat.
      Merging a file in a subdirectory could in fact fail, as the
      redirection relies on the "checkout-index" call just prior
      to create leading directories. But we never noticed, since
      we ignored the error return from running cat.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6aaeca90
    • J
      add tests for merge-index / merge-one-file · cf1af1b1
      Jeff King 提交于
      There were no tests for either, except a brief use in
      t1200-tutorial.
      
      These tools are not used much these days, as most people
      use the merge-recursive strategy, which handles everything
      internally. However, they are used by the "octopus" and
      "resolve" strategies, as well as any custom strategies
      or merge scripts people have built around them.
      
      For example, together with read-tree, they are the simplest
      way to do a basic content-level merge without checking out
      the entire repository contents beforehand.
      
      This script adds a basic test of the tools to perform one
      content-level merge. It also shows a failure of the tools to
      work properly in the face of GIT_WORK_TREE or core.worktree.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cf1af1b1
    • J
      Start 1.7.5.1 maintenance track · 65f13f20
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      65f13f20
    • J
      Merge branch 'mg/x-years-12-months' into maint · 04a67dc6
      Junio C Hamano 提交于
      * mg/x-years-12-months:
        date: avoid "X years, 12 months" in relative dates
      04a67dc6
    • S
      git-send-email: fix missing space in error message · a1dd7e16
      Sylvain Rabot 提交于
      When the command cannot make a connection to the SMTP server the error
      message to diagnose the broken configuration is issued.  However, when an
      optional smtp-server-port is given and needs to be reported, the message
      lacked a space between "hello=<smtp-domain>" and "port=<smtp-server-port>".
      Signed-off-by: NSylvain Rabot <sylvain@abstraction.fr>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a1dd7e16
  5. 27 4月, 2011 1 次提交
  6. 24 4月, 2011 5 次提交
  7. 21 4月, 2011 1 次提交
    • M
      date: avoid "X years, 12 months" in relative dates · f1e9c548
      Michael J Gruber 提交于
      When relative dates are more than about a year ago, we start
      writing them as "Y years, M months".  At the point where we
      calculate Y and M, we have the time delta specified as a
      number of days. We calculate these integers as:
      
        Y = days / 365
        M = (days % 365 + 15) / 30
      
      This rounds days in the latter half of a month up to the
      nearest month, so that day 16 is "1 month" (or day 381 is "1
      year, 1 month").
      
      We don't round the year at all, though, meaning we can end
      up with "1 year, 12 months", which is silly; it should just
      be "2 years".
      
      Implement this differently with months of size
      
        onemonth = 365/12
      
      so that
      
        totalmonths = (long)( (days + onemonth/2)/onemonth )
        years = totalmonths / 12
        months = totalmonths % 12
      
      In order to do this without floats, we write the first formula as
      
        totalmonths = (days*12*2 + 365) / (365*2)
      
      Tests and inspiration by Jeff King.
      Helped-by: NJeff King <peff@peff.net>
      Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f1e9c548
  8. 20 4月, 2011 4 次提交
  9. 19 4月, 2011 1 次提交
  10. 15 4月, 2011 3 次提交