1. 03 3月, 2008 17 次提交
  2. 02 3月, 2008 8 次提交
    • J
      Fix make_absolute_path() for parameters without a slash · e371a4c6
      Johannes Schindelin 提交于
      When passing "xyz" to make_absolute_path(), make_absolute_path()
      erroneously tried to chdir("xyz"), and then append "/xyz".  Instead,
      skip the chdir() completely when no slash was found.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e371a4c6
    • J
      diff: make sure work tree side is shown as 0{40} when different · 2b459b48
      Junio C Hamano 提交于
      Ping Yin noticed that "git diff-index --raw" shows 0{40} when work tree
      has submodule difference, but "git diff --raw" didn't correctly do so.
      
      There was a mistake in the diffcore_skip_stat_unmatch() that was meant to
      clean up the stat-only difference for running diff between the index and
      work tree and diff between the tree and the work tree, to cause it re-read
      from the submodule repository HEAD.  When ce_stat_match() says work tree
      is different, we should always say 0{40} on the work tree side.
      
      This patch fixes the issue, and adds tests.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b459b48
    • J
      diff-lib.c: constness strengthening · c8c16f28
      Junio C Hamano 提交于
      The internal implementation of diff-index codepath used to use non const
      pointer to pass sha1 around, but it did not have to.  With this, we can
      also lose the private no_sha1[] array, as we can use the public null_sha1[]
      array that exists exactly for the same purpose.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c8c16f28
    • J
      Clean up find_unique_abbrev() callers · 2efb3b06
      Junio C Hamano 提交于
      Now find_unique_abbrev() never returns NULL, there is no need for callers
      to prepare for seeing NULL and fall back to giving the full 40-hexdigits.
      
      While we are at it, drop "..." in the "git reset" output that reports the
      location of the new HEAD, between the abbreviated commit object name and
      the one line commit summary.  Because we are always showing the HEAD
      (which cannot be missing!), we never had a case where we show the full 40
      hexdigits that is not followed by three dots, and these three dots were
      stealing 3 columns from the precious horizontal screen real estate out of
      80 that can better be used for the one line commit summary.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2efb3b06
    • J
      find_unique_abbrev(): redefine semantics · b66fde9a
      Junio C Hamano 提交于
      The function returned NULL when no object that matches the name
      was found, but that made the callers more complicated, as nobody
      used that NULL return as an indication that no object with such
      a name exists.  They (at least the careful ones) instead took
      the full 40-hexdigit and used in such a case, and the careless
      ones segfaulted.
      
      With this "git rev-parse --short 5555555555555555555555555555555555555555"
      would stop segfaulting.
      
      This is based on Jeff King's rewrite to my RFC patch, but "missing"
      logic swapped to "exists".  The final logic reads:
      
          For existing objects, make sure the abbreviated string uniquely
          identifies it.  Otherwise, make sure the abbreviated string is
          long enough so that it would not name any existing object.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b66fde9a
    • M
      git rebase --abort: always restore the right commit · 48411d22
      Mike Hommey 提交于
      Previously, --abort would end by git resetting to ORIG_HEAD, but some
      commands, such as git reset --hard (which happened in git rebase --skip,
      but could just as well be typed by the user), would have already modified
      ORIG_HEAD.
      
      Just use the orig-head we store in $dotest instead.
      Signed-off-by: NMike Hommey <mh@glandium.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      48411d22
    • M
      f32086be
    • J
      CodingGuidelines: spell out how we use grep in our scripts · 009c98ee
      Junio C Hamano 提交于
      Our scripts try to stick to fairly limited subset of POSIX BRE for
      portability.  It is unclear from manual page from GNU grep which is GNU
      extension and which is portable, so let's spell it out to help new people
      to keep their contributions from hurting porters.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      009c98ee
  3. 01 3月, 2008 15 次提交