1. 30 5月, 2011 1 次提交
  2. 27 5月, 2011 27 次提交
  3. 26 5月, 2011 7 次提交
  4. 25 5月, 2011 5 次提交
    • 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
    • J
      gitweb: JavaScript ability to adjust time based on timezone · 291e52bd
      John 'Warthog9' Hawley 提交于
      This patch is based on Kevin Cernekee's <cernekee@gmail.com>
      patch series entitled "gitweb: introduce localtime feature".  While
      Kevin's patch changed the server side output so that the timezone
      was output from gitweb itself, this has a number of drawbacks, in
      particular with respect to gitweb-caching.
      
      This patch takes the same basic goal, display the appropriate times in
      a given common timezone, and implements it in JavaScript.  This
      requires adding / using a new class, "datetime", to be able to find
      elements to be adjusted from JavaScript.  Appropriate dates are
      wrapped in a span with this class.
      
      Timezone to be used can be retrieved from "gitweb_tz" cookie, though
      currently there is no way to set / manipulate this cookie from gitweb;
      this is left for later commit.
      
      Valid timezones, currently, are: "utc", "local" (which means that
      timezone is taken from browser), and "+/-ZZZZ" numeric timezone as in
      RFC-2822.  Default timezone is "local" (currently not configurable,
      left for later commit).
      
      Fallback (should JavaScript not be enabled) is to treat dates as they
      have been and display them, only, in UTC.
      
      Pages affected:
      * 'summary' view, "last change" field (commit time from latest change)
      * 'log' view, author time
      * 'commit' and 'commitdiff' views, author/committer time
      * 'tag' view, tagger time
      
      Based-on-code-from: Kevin 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>
      291e52bd