1. 30 4月, 2015 6 次提交
    • J
      merge: do not check argc to determine number of remote heads · eaa4e59c
      Junio C Hamano 提交于
      To reject merging multiple commits into an unborn branch, we check
      argc, thinking that collect_parents() that reads the remaining
      command line arguments from <argc, argv> will give us the same
      number of commits as its input, i.e. argc.
      
      Because what we really care about is the number of commits, let the
      function run and then make sure it returns only one commit instead.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      eaa4e59c
    • J
      merge: clarify "pulling into void" special case · 1faac1ce
      Junio C Hamano 提交于
      Instead of having it as one of the three if/elseif/.. case arms,
      test the condition and handle this special case upfront.  This makes
      it easier to follow the flow of logic.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1faac1ce
    • J
      t5520: test pulling an octopus into an unborn branch · 7ad39a27
      Junio C Hamano 提交于
      The code comment for "git merge" in builtin/merge.c, we say
      
          If the merged head is a valid one there is no reason
          to forbid "git merge" into a branch yet to be born.
          We do the same for "git pull".
      
      and t5520 does have an existing test for that behaviour.  However,
      there was no test to make sure that 'git pull' to pull multiple
      branches into an unborn branch must fail.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ad39a27
    • J
      t5520: style fixes · 55691133
      Junio C Hamano 提交于
      Fix style funnies in early part of this test script that checks "git
      pull" into an unborn branch.  The primary change is that 'chdir' to
      a newly created empty test repository is now protected by being done
      in a subshell to make it more robust without having to chdir back to
      the original place.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55691133
    • J
      merge: simplify code flow · 00c7e7e7
      Junio C Hamano 提交于
      One of the first things cmd_merge() does is to see if the "--abort"
      option is given and run "reset --merge" and exit.  When the control
      reaches this point, we know "--abort" was not given.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      00c7e7e7
    • J
      merge: test the top-level merge driver · 9e62316d
      Junio C Hamano 提交于
      We seem to have tests for specific merge strategy backends
      (e.g. recursive), but not much test coverage for the "git merge"
      itself.  As I am planning to update the semantics of merging
      "FETCH_HEAD" in such a way that these two
      
          git pull . topic_a topic_b...
      
      vs.
      
          git fetch . topic_a topic_b...
          git merge FETCH_HEAD
      
      are truly equivalent, let me add a few test cases to cover the
      tricky ones.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9e62316d
  2. 13 1月, 2015 7 次提交
  3. 08 1月, 2015 5 次提交
  4. 30 12月, 2014 1 次提交
    • J
      is_hfs_dotgit: loosen over-eager match of \u{..47} · 6aaf956b
      Jeff King 提交于
      Our is_hfs_dotgit function relies on the hackily-implemented
      next_hfs_char to give us the next character that an HFS+
      filename comparison would look at. It's hacky because it
      doesn't implement the full case-folding table of HFS+; it
      gives us just enough to see if the path matches ".git".
      
      At the end of next_hfs_char, we use tolower() to convert our
      32-bit code point to lowercase. Our tolower() implementation
      only takes an 8-bit char, though; it throws away the upper
      24 bits. This means we can't have any false negatives for
      is_hfs_dotgit. We only care about matching 7-bit ASCII
      characters in ".git", and we will correctly process 'G' or
      'g'.
      
      However, we _can_ have false positives. Because we throw
      away the upper bits, code point \u{0147} (for example) will
      look like 'G' and get downcased to 'g'. It's not known
      whether a sequence of code points whose truncation ends up
      as ".git" is meaningful in any language, but it does not
      hurt to be more accurate here. We can just pass out the full
      32-bit code point, and compare it manually to the upper and
      lowercase characters we care about.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6aaf956b
  5. 23 12月, 2014 13 次提交
  6. 18 12月, 2014 8 次提交
    • J
      Git 2.2.1 · 9b7cbb31
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9b7cbb31
    • J
      Sync with v2.1.4 · 77933f44
      Junio C Hamano 提交于
      * maint-2.1:
        Git 2.1.4
        Git 2.0.5
        Git 1.9.5
        Git 1.8.5.6
        fsck: complain about NTFS ".git" aliases in trees
        read-cache: optionally disallow NTFS .git variants
        path: add is_ntfs_dotgit() helper
        fsck: complain about HFS+ ".git" aliases in trees
        read-cache: optionally disallow HFS+ .git variants
        utf8: add is_hfs_dotgit() helper
        fsck: notice .git case-insensitively
        t1450: refactor ".", "..", and ".git" fsck tests
        verify_dotfile(): reject .git case-insensitively
        read-tree: add tests for confusing paths like ".." and ".git"
        unpack-trees: propagate errors adding entries to the index
      77933f44
    • J
      Git 2.1.4 · 8e36a6d5
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8e36a6d5
    • J
      Sync with v2.0.5 · 58f1d950
      Junio C Hamano 提交于
      * maint-2.0:
        Git 2.0.5
        Git 1.9.5
        Git 1.8.5.6
        fsck: complain about NTFS ".git" aliases in trees
        read-cache: optionally disallow NTFS .git variants
        path: add is_ntfs_dotgit() helper
        fsck: complain about HFS+ ".git" aliases in trees
        read-cache: optionally disallow HFS+ .git variants
        utf8: add is_hfs_dotgit() helper
        fsck: notice .git case-insensitively
        t1450: refactor ".", "..", and ".git" fsck tests
        verify_dotfile(): reject .git case-insensitively
        read-tree: add tests for confusing paths like ".." and ".git"
        unpack-trees: propagate errors adding entries to the index
      58f1d950
    • J
      Git 2.0.5 · 9a8c2b67
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a8c2b67
    • J
      Sync with v1.9.5 · 5e519fb8
      Junio C Hamano 提交于
      * maint-1.9:
        Git 1.9.5
        Git 1.8.5.6
        fsck: complain about NTFS ".git" aliases in trees
        read-cache: optionally disallow NTFS .git variants
        path: add is_ntfs_dotgit() helper
        fsck: complain about HFS+ ".git" aliases in trees
        read-cache: optionally disallow HFS+ .git variants
        utf8: add is_hfs_dotgit() helper
        fsck: notice .git case-insensitively
        t1450: refactor ".", "..", and ".git" fsck tests
        verify_dotfile(): reject .git case-insensitively
        read-tree: add tests for confusing paths like ".." and ".git"
        unpack-trees: propagate errors adding entries to the index
      5e519fb8
    • J
      Git 1.9.5 · 83332636
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      83332636
    • J
      Sync with v1.8.5.6 · 6898b797
      Junio C Hamano 提交于
      * maint-1.8.5:
        Git 1.8.5.6
        fsck: complain about NTFS ".git" aliases in trees
        read-cache: optionally disallow NTFS .git variants
        path: add is_ntfs_dotgit() helper
        fsck: complain about HFS+ ".git" aliases in trees
        read-cache: optionally disallow HFS+ .git variants
        utf8: add is_hfs_dotgit() helper
        fsck: notice .git case-insensitively
        t1450: refactor ".", "..", and ".git" fsck tests
        verify_dotfile(): reject .git case-insensitively
        read-tree: add tests for confusing paths like ".." and ".git"
        unpack-trees: propagate errors adding entries to the index
      6898b797