1. 28 1月, 2010 2 次提交
  2. 27 1月, 2010 4 次提交
  3. 26 1月, 2010 8 次提交
  4. 25 1月, 2010 12 次提交
    • J
      Teach diff --submodule that modified submodule directory is dirty · 721ceec1
      Jens Lehmann 提交于
      Since commit 8e08b4 git diff does append "-dirty" to the work tree side
      if the working directory of a submodule contains new or modified files.
      Lets do the same when the --submodule option is used.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      721ceec1
    • J
      git diff: Don't test submodule dirtiness with --ignore-submodules · 4d34477f
      Jens Lehmann 提交于
      The diff family suppresses the output of submodule changes when
      requested but checks them nonetheless. But since recently submodules
      get examined for their dirtiness, which is rather expensive. There is
      no need to do that when the --ignore-submodules option is used, as
      the gathered information is never used anyway.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4d34477f
    • J
      gitweb.js: Workaround for IE8 bug · b2c2e4c2
      Jakub Narebski 提交于
      In Internet Explorer 8 (IE8) the 'blame_incremental' view, which uses
      JavaScript to generate blame info using AJAX, sometimes hang at the
      beginning (at 0%) of blaming, e.g. for larger files with long history
      like git's own gitweb/gitweb.perl.
      
      The error shown by JavaScript console is "Unspecified error" at char:2
      of the following line in gitweb/gitweb.js:
      
        if (xhr.readyState === 3 && xhr.status !== 200) {
      
      Debugging it using IE8 JScript debuger shown that the error occurs
      when trying to access xhr.status (xhr is XMLHttpRequest object).
      Watch for xhr object shows 'Unspecified error.' as "value" of
      xhr.status, and trying to access xhr.status from console throws error.
      
      This bug is some intermittent bug, depending on XMLHttpRequest timing,
      as it doesn't occur in all cases.  It is probably caused by the fact
      that handleResponse is called from timer (pollTimer), to work around
      the fact that some browsers call onreadystatechange handler only once
      for each state change, and not like required for 'blame_incremental'
      as soon as new data is available from server.  It looks like xhr
      object is not properly initialized; still it is a bug to throw an
      error when accessing xhr.status (and not use 'null' or 'undefined' as
      value).
      
      Work around this bug in IE8 by using try-catch block when accessing
      xhr.status.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b2c2e4c2
    • J
      Merge branch 'jc/fix-tree-walk' · 026680f8
      Junio C Hamano 提交于
      * jc/fix-tree-walk:
        read-tree --debug-unpack
        unpack-trees.c: look ahead in the index
        unpack-trees.c: prepare for looking ahead in the index
        Aggressive three-way merge: fix D/F case
        traverse_trees(): handle D/F conflict case sanely
        more D/F conflict tests
        tests: move convenience regexp to match object names to test-lib.sh
      
      Conflicts:
      	builtin-read-tree.c
      	unpack-trees.c
      	unpack-trees.h
      026680f8
    • J
      Make test numbers unique · eca9388f
      Johannes Sixt 提交于
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      eca9388f
    • J
      Merge branch 'maint' · 01ddb1ff
      Junio C Hamano 提交于
      * maint:
        git-gui: work from the .git dir
        git-gui: Fix applying a line when all following lines are deletions
        git-gui: Correct file_states when unstaging partly staged entry
        git-gui: Fix gitk for branch whose name matches local file
        git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
        git-gui: handle really long error messages in updateindex.
        git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
        git-gui: Makefile: consolidate .FORCE-* targets
      01ddb1ff
    • J
      Merge branch 'maint' of git://git.spearce.org/git-gui into maint · b30ccd75
      Junio C Hamano 提交于
      * 'maint' of git://git.spearce.org/git-gui:
        git-gui: work from the .git dir
        git-gui: Fix applying a line when all following lines are deletions
        git-gui: Correct file_states when unstaging partly staged entry
        git-gui: Fix gitk for branch whose name matches local file
        git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync
        git-gui: handle really long error messages in updateindex.
        git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
        git-gui: Makefile: consolidate .FORCE-* targets
      b30ccd75
    • M
      Windows: Remove dependency on pthreadGC2.dll · 767f8b31
      Michael Lukashov 提交于
      Commit 44626dc7 (MSVC: Windows-native implementation for subset
      of threads API, 2010-01-15) introduces builtin replacement of
      pthreadGC2.dll functionality, thus we can completely drop
      dependency on this dll.
      Signed-off-by: NMichael Lukashov <michael.lukashov@gmail.com>
      Acked-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      767f8b31
    • T
      Documentation: move away misplaced 'push --upstream' description · 0ed3a111
      Thomas Rast 提交于
      e9fcd1e2 (Add push --set-upstream, 2010-01-16) inadvertently patched
      the description of --upstream in the middle of that of --repo.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0ed3a111
    • T
      Documentation: add missing :: in config.txt · 88955ed2
      Thomas Rast 提交于
      bed575e4 (commit: support commit.status, --status, and --no-status,
      2009-12-07) forgot to add the :: that sets off an item from the
      paragraph that explains it, breaking the layout.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      88955ed2
    • J
      Merge branch 'doc-style/for-next' of git://repo.or.cz/git/trast · 77b3b796
      Junio C Hamano 提交于
      * 'doc-style/for-next' of git://repo.or.cz/git/trast:
        Documentation: merge: use MERGE_HEAD to refer to the remote branch
        Documentation: simplify How Merge Works
        Documentation: merge: add a section about fast-forward
        Documentation: emphasize when git merge terminates early
        Documentation: merge: add an overview
        Documentation: merge: move merge strategy list to end
        Documentation: suggest `reset --merge` in How Merge Works section
        Documentation: merge: move configuration section to end
        Documentation: emphasise 'git shortlog' in its synopsis
        Documentation: show-files is now called git-ls-files
        Documentation: tiny git config manual tweaks
        Documentation: git gc packs refs by default now
      
      Conflicts:
      	Documentation/config.txt
      77b3b796
    • J
      pull: re-fix command line generation · 7ecee331
      Junio C Hamano 提交于
      14e5d40c (pull: Fix parsing of -X<option>, 2010-01-17) forgot that
      merge_name needs to stay as a single non-interpolated string.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ecee331
  5. 24 1月, 2010 14 次提交
    • J
      Documentation: merge: use MERGE_HEAD to refer to the remote branch · 3588cf94
      Jonathan Nieder 提交于
      commit 57bddb11 (Documentation/git-merge: reword references to
      "remote" and "pull", 2010-01-07) fixed the manual to drop the
      assumption that the other branch being merged is from a remote
      repository.  Unfortunately, in a few places, to do so it
      introduced the antecedentless phrase "their versions".  Worse, in
      passages like the following, 'they' is playing two roles.
      
      |   highlighting changes from both the HEAD and their versions.
      |
      | * Look at the diffs on their own. 'git log --merge -p <path>'
      
      Using HEAD and MERGE_HEAD nicely assigns terminology to "our" and
      "their" sides.  It also provides the reader with practice using
      names that git will recognize on the command line.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      3588cf94
    • J
      Documentation: simplify How Merge Works · ebef7e50
      Jonathan Nieder 提交于
      The user most likely does not care about the exact order of
      operations because he cannot see it happening anyway.  Instead,
      try to explain what it means to merge two commits into a single
      tree.
      
      While at it:
      
       - Change the heading to TRUE MERGE.  The entire manual page is
         about how merges work.
      
       - Document MERGE_HEAD.  It is a useful feature, since it makes
         the parents of the intended merge commit easier to refer to.
      
       - Do not assume commits named on the 'git merge' command line come
         from another repository.  For simplicity, the discussion of
         conflicts still does assume that there is only one and it is a
         branch head.
      
       - Do not start list items with `code`.  Otherwise, a toolchain bug
         produces a line break in the generated nroff, resulting in odd
         extra space.
      Suggested-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      ebef7e50
    • J
      Documentation: merge: add a section about fast-forward · 29280311
      Jonathan Nieder 提交于
      Novices sometimes find the behavior of 'git merge' in the
      fast-forward case surprising.  Describe it thoroughly.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      29280311
    • J
      Documentation: emphasize when git merge terminates early · 30f2bade
      Jonathan Nieder 提交于
      A merge-based operation in git can fail in two ways: one that
      stops before touching anything, or one that goes ahead and
      results in conflicts.
      
      As the 'git merge' manual explains:
      
      | A merge is always between the current `HEAD` and one or more
      | commits (usually, branch head or tag), and the index file must
      | match the tree of `HEAD` commit (i.e. the contents of the last commit)
      | when it starts out.
      
      Unfortunately, the placement of this sentence makes it easy to
      skip over, and its formulation leaves the important point, that
      any other attempted merge will be gracefully aborted, unspoken.
      
      So give this point its own section and expand upon it.
      
      Probably this could be simplified somewhat: after all, a change
      registered in the index is just a special kind of local
      uncommited change, so the second added paragraph is only a
      special case of the first.  It seemed more helpful to be explicit
      here.
      
      Inspired by <http://gitster.livejournal.com/25801.html>.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      30f2bade
    • J
      Documentation: merge: add an overview · b40bb374
      Jonathan Nieder 提交于
      The reader unfamiliar with the concepts of branching and merging
      would have been completely lost.  Try to help him with a diagram.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      b40bb374
    • J
      Documentation: merge: move merge strategy list to end · a4081bac
      Jonathan Nieder 提交于
      So the section layout changes as follows:
      
       NAME
       SYNOPSIS
       DESCRIPTION
       OPTIONS
      -MERGE STRATEGIES
       HOW MERGE WORKS
       HOW CONFLICTS ARE PRESENTED
       HOW TO RESOLVE CONFLICTS
       EXAMPLES
      +MERGE STRATEGIES
       CONFIGURATION
       SEE ALSO
       AUTHOR
       DOCUMENTATION
       GIT
       NOTES
      
      The first-time user will care more about conflicts than about
      strategies other than 'recursive'.
      
      One of the examples uses -s ours, but I do not think this hinders
      readability.
      Suggested-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      a4081bac
    • J
      Documentation: suggest `reset --merge` in How Merge Works section · ed4a6baa
      Jonathan Nieder 提交于
      The 'merge' manual suggests 'reset' to cancel a merge at the end
      of the Merge Strategies list.  It is more logical to explain this
      right before explaining how merge conflicts work, so the daunted
      reader can have a way out when he or she needs it most.
      
      While at it, make the advice more dependable and self-contained
      by providing the --merge option.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      ed4a6baa
    • J
      Documentation: merge: move configuration section to end · 35e9d630
      Jonathan Nieder 提交于
      Configuration and environment variables belong to the back matter
      of a manual page.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Acked-by: NPetr Baudis <pasky@suse.cz>
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      35e9d630
    • J
      Make ce_uptodate() trustworthy again · 125fd984
      Junio C Hamano 提交于
      The rule has always been that a cache entry that is ce_uptodate(ce)
      means that we already have checked the work tree entity and we know
      there is no change in the work tree compared to the index, and nobody
      should have to double check.  Note that false ce_uptodate(ce) does not
      mean it is known to be dirty---it only means we don't know if it is
      clean.
      
      There are a few codepaths (refresh-index and preload-index are among
      them) that mark a cache entry as up-to-date based solely on the return
      value from ie_match_stat(); this function uses lstat() to see if the
      work tree entity has been touched, and for a submodule entry, if its
      HEAD points at the same commit as the commit recorded in the index of
      the superproject (a submodule that is not even cloned is considered
      clean).
      
      A submodule is no longer considered unmodified merely because its HEAD
      matches the index of the superproject these days, in order to prevent
      people from forgetting to commit in the submodule and updating the
      superproject index with the new submodule commit, before commiting the
      state in the superproject.  However, the patch to do so didn't update
      the codepath that marks cache entries up-to-date based on the updated
      definition and instead worked it around by saying "we don't trust the
      return value of ce_uptodate() for submodules."
      
      This makes ce_uptodate() trustworthy again by not marking submodule
      entries up-to-date.
      
      The next step _could_ be to introduce a few "in-core" flag bits to
      cache_entry structure to record "this entry is _known_ to be dirty",
      call is_submodule_modified() from ie_match_stat(), and use these new
      bits to avoid running this rather expensive check more than once, but
      that can be a separate patch.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      125fd984
    • J
      rebase -i: Export GIT_AUTHOR_* variables explicitly · 76c9c0db
      Junio C Hamano 提交于
      There is no point doing self-assignments of these variables.  Instead,
      just export them to the environment, but do so in a sub-shell, because
      
      	VAR1=VAL1 VAR2=VAL2 ... command arg1 arg2...
      
      does not mark the variables exported if command that is run
      is a shell function, according to POSIX.1.
      
      The callers of do_with_author do not rely on seeing the effect of any
      shell variable assignments that may happen inside what was called through
      this shell function (currently "output" is the only one), so running it in
      the subshell doesn't have an adverse semantic effect.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      76c9c0db
    • G
      git-gui: work from the .git dir · 87cd09f4
      Giuseppe Bilotta 提交于
      When git-gui is run from a .git dir, _gitdir would be set to "." by
      rev-parse, something that confuses the worktree detection.
      
      Fix by expanding the value of _gitdir to pwd in this special case.
      Signed-off-by: NGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      87cd09f4
    • J
      git-gui: Fix applying a line when all following lines are deletions · 390425bd
      Jeff Epler 提交于
      If a diff looked like:
      
       @@
        context
       -del1
       -del2
      
      and you wanted to stage the deletion 'del1', the generated patch
      wouldn't apply because it was missing the line 'del2' converted to
      context, but this line was counted in the @@-line
      Signed-off-by: NJeff Epler <jepler@unpythonic.net>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      390425bd
    • J
      git-gui: Correct file_states when unstaging partly staged entry · 7ec2b69f
      Jens Lehmann 提交于
      When unstaging a partly staged file or submodule, the file_states
      list was not updated properly (unless unstaged linewise). Its
      index_info part did not contain the former head_info as it should
      have but kept its old value.
      
      This seems not to have had any bad effects but diminishes the value
      of the file_states list for future enhancements.
      Signed-off-by: NJens Lehmann <Jens.Lehmann@web.de>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      7ec2b69f
    • P
      git-gui: Fix gitk for branch whose name matches local file · e27d106e
      Peter Krefting 提交于
      When trying to run gitk on a branch name whose name matches a local
      file, it will toss an error saying that the name is ambiguous. Adding
      a pair of dashes will make gitk parse the options to the left of
      it as branch names. Since wish eats the first pair of dashes we
      throw at it, we need to add a second one to ensure they get through.
      Signed-off-by: NPeter Krefting <peter@softwolves.pp.se>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      e27d106e