1. 28 5月, 2011 2 次提交
    • J
      rebase: write a reflog entry when finishing · 53f2ffa8
      Jeff King 提交于
      When we finish a rebase, our detached HEAD is at the final
      result. We update the original branch ref with this result,
      and then point the HEAD symbolic ref at the updated branch.
      We write a reflog for the branch update, but not for the
      update of HEAD.
      
      Because we're already at the final result on the detached
      HEAD, moving to the branch actually doesn't change our
      commit sha1 at all. So in that sense, a reflog entry would
      be pointless.
      
      However, humans do read reflogs, and an entry saying "rebase
      finished: returning to refs/heads/master" can be helpful in
      understanding what is going on.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53f2ffa8
    • C
      rebase: create HEAD reflog entry when aborting · ea69619c
      Csaba Henk 提交于
      When we abort a rebase, we return to the original value of
      HEAD. Failing to write a reflog entry means we create a
      gap in the reflog (which can cause "git show
      HEAD@{5.minutes.ago}" to issue a warning). Plus having the
      extra entry makes the reflog easier to follow for a human.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ea69619c
  2. 27 5月, 2011 27 次提交
  3. 26 5月, 2011 7 次提交
  4. 25 5月, 2011 4 次提交
    • J
      doc: discuss textconv versus external diff drivers · 55601c6a
      Jeff King 提交于
      We already talk about how to use each one and how they work,
      but it is a reasonable question to wonder why one might use
      one over the other.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      55601c6a
    • J
      require-work-tree wants more than what its name says · e2eb5273
      Junio C Hamano 提交于
      Somebody tried "git pull" from a random place completely outside the work
      tree, while exporting GIT_DIR and GIT_WORK_TREE that are set to correct
      places, e.g.
      
          GIT_WORK_TREE=$HOME/git.git
          GIT_DIR=$GIT_WORK_TREE/.git
          export GIT_WORK_TREE GIT_DIR
          cd /tmp
          git pull
      
      At the beginning of git-pull, we check "require-work-tree" and then
      "cd-to-toplevel".  I _think_ the original intention when I wrote the
      command was "we MUST have a work tree, our $(cwd) might not be at the
      top-level directory of it", and no stronger than that.  That check is a
      very sensible thing to do before doing cd-to-toplevel.  We check that the
      place we would want to go exists, and then go there.
      
      But the implementation of require_work_tree we have today is quite
      different.  I don't have energy to dig the history, but currently it says:
      
          test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
          die "fatal: $0 cannot be used without a working tree."
      
      Which is completely bogus.  Even though we may happen to be just outside
      of it right now, we may have a working tree that we can cd_to_toplevel
      back to.
      
      Add a function "require_work_tree_exists" that implements the check
      this function originally intended (this is so that third-party scripts
      that rely on the current behaviour do not have to get broken).
      
      For now, update _no_ in-tree scripts, not even "git pull", as nobody on
      the list seems to really care about the above corner case workflow that
      triggered this. Scripts can be updated after vetting that they do want the
      "we want to make sure the place we are going to go actually exists"
      semantics.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e2eb5273
    • J
      gitweb: Make JavaScript ability to adjust timezones configurable · 2e987f92
      Jakub Narebski 提交于
      Configure JavaScript-based ability to select common timezone for git
      dates via %feature mechanism, namely 'javascript-timezone' feature.
      
      The following settings are configurable:
      * default timezone (defaults to 'local' i.e. browser timezone);
        this also can function as a way to disable this ability,
        by setting it to false-ish value (undef or '')
      * name of cookie to store user's choice of timezone
      * class name to mark dates
      
      NOTE: This is a bit of abuse of %feature system, which can store only
      sequence of values, rather than dictionary (hash); usually but not
      always only a single value is used.
      Based-on-code-by: NJohn 'Warthog9' Hawley <warthog9@eaglescrag.net>
      Helped-by: NKevin Cernekee <cernekee@gmail.com>
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2e987f92
    • J
      gitweb.js: Add UI for selecting common timezone to display dates · 2ae8da25
      John 'Warthog9' Hawley 提交于
      This will modify HTML, add CSS rules and add DOM event handlers so
      that clicking on any date (the common part, not the localtime part)
      will display a drop down menu to choose the timezone to change to.
      
      Currently menu displays only the following timezones:
      
        utc
        local
        -1200
        -1100
        ...
        +1100
        +1200
        +1300
        +1400
      
      In timezone selection menu each timezone is +1hr to the previous.  The
      code is capable of handling fractional timezones, but those have not
      been added to the menu.
      
      All changes are saved to a cookie, so page changes and closing /
      reopening browser retains the last known timezone setting used.
      
      [jn: Changed from innerHTML to DOM, moved to event delegation for
      onclick to trigger menu, added close button and cookie refreshing]
      Helped-by: NKevin Cernekee <cernekee@gmail.com>
      Signed-off-by: NJohn 'Warthog9' Hawley <warthog9@eaglescrag.net>
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2ae8da25