Skip to content
Snippets Groups Projects
  1. Aug 03, 2015
  2. Jul 27, 2015
  3. Jul 15, 2015
  4. Jul 09, 2015
  5. Jul 08, 2015
    • Jeff King's avatar
      check_and_freshen_file: fix reversed success-check · 3096b2ec
      Jeff King authored
      
      When we want to write out a loose object file, we have
      always first made sure we don't already have the object
      somewhere. Since 33d4221c (write_sha1_file: freshen existing
      objects, 2014-10-15), we also update the timestamp on the
      file, so that a simultaneous prune knows somebody is
      likely to reference it soon.
      
      If our utime() call fails, we treat this the same as not
      having the object in the first place; the safe thing to do
      is write out another copy. However, the loose-object check
      accidentally inverts the utime() check; it returns failure
      _only_ when the utime() call actually succeeded. Thus it was
      failing to protect us there, and in the normal case where
      utime() succeeds, it caused us to pointlessly write out and
      link the object.
      
      This passed our freshening tests, because writing out the
      new object is certainly _one_ way of updating its utime. So
      the normal case was inefficient, but not wrong.
      
      While we're here, let's also drop a comment in front of the
      check_and_freshen functions, making a note of their return
      type (since it is not our usual "0 for success, -1 for
      error").
      
      Signed-off-by: default avatarJeff King <peff@peff.net>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      3096b2ec
    • Clemens Buchacher's avatar
      rebase: return non-zero error code if format-patch fails · 60d708b2
      Clemens Buchacher authored
      
      Since e481af06 (rebase: Handle cases where format-patch fails) we
      notice if format-patch fails and return immediately from
      git-rebase--am. We save the return value with ret=$?, but then we
      return $?, which is usually zero in this case.
      
      Fix this by returning $ret instead.
      
      Cc: Andrew Wong <andrew.kw.w@gmail.com>
      Signed-off-by: default avatarClemens Buchacher <clemens.buchacher@intel.com>
      Helped-by: default avatarJorge Nunes <jorge.nunes@intel.com>
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
      60d708b2
  6. Jul 06, 2015
  7. Jul 04, 2015
Loading