1. 17 5月, 2013 16 次提交
    • K
      revision.c: make default history consider bottom commits · 141efdba
      Kevin Bracey 提交于
      Previously, the default history treated bottom commits the same as any
      other UNINTERESTING commit, which could force it down side branches.
      
      Consider the following history:
      
         *A--*B---D--*F         * marks !TREESAME parent paths
           \     /*
            `-C-'
      
      When requesting "B..F", B is UNINTERESTING but TREESAME to D. C is
      !UNINTERESTING.
      
      So default following would go from D into the irrelevant side branch C
      to A, rather than to B.  Note also that if there had been an extra
      !UNINTERESTING commit B1 between B and D, it wouldn't have gone down C.
      
      Change the default following to test relevant_commit() instead of
      !UNINTERESTING, so it can proceed straight from D to B, thus finishing
      the traversal of that path.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      141efdba
    • K
      revision.c: don't show all merges for --parents · bf3418b0
      Kevin Bracey 提交于
      When using --parents or --children, get_commit_action() previously showed
      all merges, even if TREESAME to both parents.
      
      This was intended to tie together the topology of the rewritten parents,
      but it was excessive - in fact we only need to show merges that have two
      or more relevant parents. Merges at the boundary do not necessarily need
      to be shown.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bf3418b0
    • K
      revision.c: discount side branches when computing TREESAME · 4d826608
      Kevin Bracey 提交于
      Use the BOTTOM flag to define relevance for pruning. Relevant commits
      are those that are !UNINTERESTING or BOTTOM, and this allows us to
      identify irrelevant side branches (UNINTERESTING && !BOTTOM).
      
      If a merge has relevant parents, and it is TREESAME to them, then do not
      let irrelevant parents cause the merge to be treated as !TREESAME.
      
      When considering simplification, don't always include all merges -
      merges with exactly one relevant parent can be simplified, if TREESAME
      according to the above rule.
      
      These two changes greatly increase simplification in limited, pruned
      revision lists.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4d826608
    • K
      revision.c: add BOTTOM flag for commits · 7f34a46f
      Kevin Bracey 提交于
      When performing edge-based operations on the revision graph, it can be
      useful to be able to identify the INTERESTING graph's connection(s) to
      the bottom commit(s) specified by the user.
      
      Conceptually when the user specifies "A..B" (== B ^A), they are asking
      for the history from A to B. The first connection from A onto the
      INTERESTING graph is part of that history, and should be considered. If
      we consider only INTERESTING nodes and their connections, then we're
      really only considering the history from A's immediate descendants to B.
      
      This patch does not change behaviour, but adds a new BOTTOM flag to
      indicate the bottom commits specified by the user, ready to be used by
      following patches.
      
      We immediately use the BOTTOM flag to return collect_bottom_commits() to
      its original approach of examining the pending commit list rather than
      the command line. This will ensure alignment of the definition of
      "bottom" with future patches.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7f34a46f
    • K
      simplify-merges: drop merge from irrelevant side branch · 143f1eaf
      Kevin Bracey 提交于
      Reimplement commit 4b7f53da on top of the new simplify-merges
      infrastructure, tightening the condition to only consider root parents;
      the original version incorrectly dropped parents that were TREESAME to
      anything.
      
      Original log message follows.
      
      The merge simplification rule stated in 6546b593 (revision traversal:
      show full history with merge simplification, 2008-07-31) still
      treated merge commits too specially.  Namely, in a history with this
      shape:
      
      	---o---o---M
      	          /
               x---x---x
      
      where three 'x' were on a history completely unrelated to the main
      history 'o' and do not touch any of the paths we are following, we
      still said that after simplifying all of the parents of M, 'x'
      (which is the leftmost 'x' that rightmost 'x simplifies down to) and
      'o' (which would be the last commit on the main history that touches
      the paths we are following) are independent from each other, and
      both need to be kept.
      
      That is incorrect; when the side branch 'x' never touches the paths,
      it should be removed to allow M to simplify down to the last commit
      on the main history that touches the paths.
      Suggested-by: NJunio C Hamano <gitster@pobox.com>
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      143f1eaf
    • K
      simplify-merges: never remove all TREESAME parents · 9c129eab
      Kevin Bracey 提交于
      When simplifying an odd merge, such as one that used "-s ours", we may
      find ourselves TREESAME to apparently redundant parents. Prevent
      simplify_merges() from removing every TREESAME parent; if this would
      happen reinstate the first TREESAME parent - the one that the default
      log would have followed.
      
      This avoids producing a totally disjoint history from the default log
      when the default log is a better explanation of the end result, and aids
      visualisation of odd merges.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9c129eab
    • J
      d5d2fc8b
    • K
      revision.c: Make --full-history consider more merges · d0af663e
      Kevin Bracey 提交于
      History simplification previously always treated merges as TREESAME
      if they were TREESAME to any parent.
      
      While this was consistent with the default behaviour, this could be
      extremely unhelpful when searching detailed history, and could not be
      overridden. For example, if a merge had ignored a change, as if by "-s
      ours", then:
      
        git log -m -p --full-history -Schange file
      
      would successfully locate "change"'s addition but would not locate the
      merge that resolved against it.
      
      Futher, simplify_merges could drop the actual parent that a commit
      was TREESAME to, leaving it as a normal commit marked TREESAME that
      isn't actually TREESAME to its remaining parent.
      
      Now redefine a commit's TREESAME flag to be true only if a commit is
      TREESAME to _all_ of its parents. This doesn't affect either the default
      simplify_history behaviour (because partially TREESAME merges are turned
      into normal commits), or full-history with parent rewriting (because all
      merges are output). But it does affect other modes. The clearest
      difference is that --full-history will show more merges - sufficient to
      ensure that -m -p --full-history log searches can really explain every
      change to the file, including those changes' ultimate fate in merges.
      
      Also modify simplify_merges to recalculate TREESAME after removing
      a parent. This is achieved by storing per-parent TREESAME flags on the
      initial scan, so the combined flag can be easily recomputed.
      
      This fixes some t6111 failures, but creates a couple of new ones -
      we are now showing some merges that don't need to be shown.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d0af663e
    • K
      Documentation: avoid "uninteresting" · e32db66d
      Kevin Bracey 提交于
      The documentation of --boundary uses the term "uninteresting", which is
      not used or defined anywhere else in the documentation. This is
      unhelpful and confusing to anyone who hasn't seen the UNINTERESTING
      flag in the source code.
      
      Change to use "excluded", as per revisions.txt.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e32db66d
    • K
      rev-list-options.txt: correct TREESAME for P · 617f50cb
      Kevin Bracey 提交于
      In the example given, P is not TREESAME to E. This doesn't affect the
      current result, but it will matter when we change behaviour.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      617f50cb
    • K
      t6111: add parents to tests · 53e38358
      Kevin Bracey 提交于
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53e38358
    • J
      t6111: allow checking the parents as well · e16f434a
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e16f434a
    • K
      t6111: new TREESAME test set · abdea96e
      Kevin Bracey 提交于
      Some side branching and odd merging to illustrate various flaws in
      revision list scans, particularly when limiting the list.
      
      Many expected failures, which will be gone by the end of the "history
      traversal refinements" series.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      abdea96e
    • K
      t6019: test file dropped in -s ours merge · c72424b1
      Kevin Bracey 提交于
      In preparation for upcoming TREESAME work, check the result for G.t,
      which is dropped in "-s ours" merge L. The default rev-list is empty, as
      expected - it follows the first parent path where it never existed.
      
      Unfortunately, --ancestry-path is also empty. Merges H J and L are all
      TREESAME to 1 parent, so are treated as TREESAME and not shown. This is
      clearly undesirable in the case of merge L, which dropped our G.t by
      taking the non-ancestry-path version. Document this as a known failure,
      and expect "H J L", the 3 merges along the path that had to chose G.t
      versions.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c72424b1
    • K
      decorate.c: compact table when growing · 83f0412f
      Kevin Bracey 提交于
      When growing the table, take the opportunity to "compact" it by removing
      entries with NULL decoration.
      
      Users may have "removed" decorations by passing NULL to
      insert_decoration. An object's table entry can't actually be removed
      during normal operation, as it would break the linear hash collision
      search. But we can remove NULL decoration entries when rebuilding the
      table.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      83f0412f
    • K
      revision.c: treat A...B merge bases as if manually specified · a765499a
      Kevin Bracey 提交于
      The documentation assures users that "A...B" is defined as "A B --not
      $(git merge-base --all A B)". This wasn't in fact quite true, because
      the calculated merge bases were not sent to add_rev_cmdline().
      
      The main effect of this was that although
      
        git rev-list --ancestry-path A B --not $(git merge-base --all A B)
      
      worked, the simpler form
      
        git rev-list --ancestry-path A...B
      
      failed with a "no bottom commits" error.
      
      Other potential users of bottom commits could also be affected by this
      problem, if they examine revs->cmdline_info; I came across the issue in
      my proposed history traversal refinements series.
      
      So ensure that the calculated merge bases are sent to add_rev_cmdline(),
      flagged with new 'whence' enum value REV_CMD_MERGE_BASE.
      Signed-off-by: NKevin Bracey <kevin@bracey.fi>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a765499a
  2. 14 5月, 2013 1 次提交
  3. 12 5月, 2013 2 次提交
  4. 10 5月, 2013 9 次提交
    • J
      Sync with v1.8.2.3 · b387c77b
      Junio C Hamano 提交于
      * maint:
        Git 1.8.2.3
        t5004: avoid using tar for checking emptiness of archive
        t5004: ignore pax global header file
        mergetools/kdiff3: do not use --auto when diffing
        transport-helper: trivial style cleanup
      b387c77b
    • J
      Git 1.8.2.3 · 92758dd2
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      92758dd2
    • J
      Merge branch 'mv/sequencer-pick-error-diag' · faf8fde5
      Junio C Hamano 提交于
      Fix "git cherry-pick $annotated_tag", which was mistakenly rejected.
      
      * mv/sequencer-pick-error-diag:
        cherry-pick: picking a tag that resolves to a commit is OK
      faf8fde5
    • J
      cherry-pick: picking a tag that resolves to a commit is OK · 7c0b0d8d
      Junio C Hamano 提交于
      Earlier, 21246dbb (cherry-pick: make sure all input objects are
      commits, 2013-04-11) tried to catch an unlikely "git cherry-pick $blob"
      as an error, but broke a more important use case to cherry-pick a
      tag that points at a commit.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7c0b0d8d
    • J
      Merge branch 'tr/copy-revisions-from-stdin' into maint · 07e03d46
      Junio C Hamano 提交于
      * tr/copy-revisions-from-stdin:
        read_revisions_from_stdin: make copies for handle_revision_arg
      07e03d46
    • R
      t5004: avoid using tar for checking emptiness of archive · ea2d20d4
      René Scharfe 提交于
      Test 2 of t5004 checks if a supposedly empty tar archive really
      contains no files.  24676f02 (t5004: fix issue with empty archive test
      and bsdtar) removed our commit hash to make it work with bsdtar, but
      the test still fails on NetBSD and OpenBSD, which use their own tar
      that considers a tar file containing only NULs as broken.
      
      Here's what the different archivers do when asked to create a tar
      file without entries:
      
      	$ uname -v
      	NetBSD 6.0.1 (GENERIC)
      	$ gtar --version | head -1
      	tar (GNU tar) 1.26
      	$ bsdtar --version
      	bsdtar 2.8.4 - libarchive 2.8.4
      
      	$ : >zero.tar
      	$ perl -e 'print "\0" x 10240' >tenk.tar
      	$ sha1 zero.tar tenk.tar
      	SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709
      	SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
      
      	$ : | tar cf - -T - | sha1
      	da39a3ee5e6b4b0d3255bfef95601890afd80709
      	$ : | gtar cf - -T - | sha1
      	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
      	$ : | bsdtar cf - -T - | sha1
      	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
      
      So NetBSD's native tar creates an empty file, while GNU tar and bsdtar
      both give us 10KB of NULs -- just like git archive with an empty tree.
      Now let's see how the archivers handle these two kinds of empty tar
      files:
      
      	$ tar tf zero.tar; echo $?
      	tar: Unexpected EOF on archive file
      	1
      	$ gtar tf zero.tar; echo $?
      	gtar: This does not look like a tar archive
      	gtar: Exiting with failure status due to previous errors
      	2
      	$ bsdtar tf zero.tar; echo $?
      	0
      
      	$ tar tf tenk.tar; echo $?
      	tar: Cannot identify format. Searching...
      	tar: End of archive volume 1 reached
      	tar: Sorry, unable to determine archive format.
      	1
      	$ gtar tf tenk.tar; echo $?
      	0
      	$ bsdtar tf tenk.tar; echo $?
      	0
      
      NetBSD's tar complains about both, bsdtar happily accepts any of them
      and GNU tar doesn't like zero-length archive files.  So the safest
      course of action is to stay with our block-of-NULs format which is
      compatible with GNU tar and bsdtar, as we can't make NetBSD's native
      tar happy anyway.
      
      We can simplify our test, however, by taking tar out of the picture.
      Instead of extracting the archive and checking for the non-presence of
      files, check if the file has a size of 10KB and contains only NULs.
      This makes t5004 pass on NetBSD and OpenBSD.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ea2d20d4
    • R
      t5004: ignore pax global header file · abdb9b2e
      René Scharfe 提交于
      Versions of tar that don't know pax headers -- like the ones in NetBSD 6
      and OpenBSD 5.2 -- extract them as regular files.  Explicitly ignore the
      file created for our global header when checking the list of extracted
      files, as this is normal and harmless fall-back behaviour.  This fixes
      test 3 of t5004 on these platforms.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      abdb9b2e
    • D
      mergetools/kdiff3: do not use --auto when diffing · e2161bc3
      David Aguilar 提交于
      The `kdiff3 --auto` help message is, "No GUI if all conflicts are auto-
      solvable."  This flag was carried over from the original mergetool
      commands.  diff_cmd() is for two-way comparisons only so remove the
      superfluous flag.
      Signed-off-by: NDavid Aguilar <davvid@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e2161bc3
    • F
      b120ef3e
  5. 09 5月, 2013 3 次提交
  6. 08 5月, 2013 6 次提交
  7. 07 5月, 2013 3 次提交
    • J
      Merge branch 'jk/merge-tree-added-identically' · 423ecb0b
      Junio C Hamano 提交于
      * jk/merge-tree-added-identically:
        merge-tree: handle directory/empty conflict correctly
      423ecb0b
    • J
      merge-tree: handle directory/empty conflict correctly · 94883b43
      John Keeping 提交于
      git-merge-tree causes a null pointer dereference when a directory
      entry exists in only one or two of the three trees being compared with
      no corresponding entry in the other tree(s).
      
      When this happens, we want to handle the entry as a directory and not
      attempt to mark it as a file merge.  Do this by setting the entries bit
      in the directory mask when the entry is missing or when it is a
      directory, only performing the file comparison when we know that a file
      entry exists.
      Reported-by: NAndreas Jacobsen <andreas@andreasjacobsen.com>
      Signed-off-by: NJohn Keeping <john@keeping.me.uk>
      Tested-by: NAndreas Jacobsen <andreas@andreasjacobsen.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      94883b43
    • J
      Merge branch 'fc/remote-bzr' · bba53671
      Junio C Hamano 提交于
      * fc/remote-bzr:
        remote-bzr: avoid bad refs
        remote-bzr: convert all unicode keys to str
        remote-bzr: access branches only when needed
        remote-bzr: delay peer branch usage
        remote-bzr: iterate revisions properly
        remote-bzr: improve progress reporting
        remote-bzr: add option to specify branches
        remote-bzr: add custom method to find branches
        remote-bzr: improve author sanitazion
        remote-bzr: add support for shared repo
        remote-bzr: fix branch names
        remote-bzr: add support for bzr repos
        remote-bzr: use branch variable when appropriate
        remote-bzr: fix partially pushed merge
        remote-bzr: fixes for branch diverge
        remote-bzr: add support to push merges
        remote-bzr: always try to update the worktree
        remote-bzr: fix order of locking in CustomTree
        remote-bzr: delay blob fetching until the very end
        remote-bzr: cleanup CustomTree
      bba53671