1. 10 7月, 2013 1 次提交
    • N
      Convert "struct cache_entry *" to "const ..." wherever possible · 9c5e6c80
      Nguyễn Thái Ngọc Duy 提交于
      I attempted to make index_state->cache[] a "const struct cache_entry **"
      to find out how existing entries in index are modified and where. The
      question I have is what do we do if we really need to keep track of on-disk
      changes in the index. The result is
      
       - diff-lib.c: setting CE_UPTODATE
      
       - name-hash.c: setting CE_HASHED
      
       - preload-index.c, read-cache.c, unpack-trees.c and
         builtin/update-index: obvious
      
       - entry.c: write_entry() may refresh the checked out entry via
         fill_stat_cache_info(). This causes "non-const struct cache_entry
         *" in builtin/apply.c, builtin/checkout-index.c and
         builtin/checkout.c
      
       - builtin/ls-files.c: --with-tree changes stagemask and may set
         CE_UPDATE
      
      Of these, write_entry() and its call sites are probably most
      interesting because it modifies on-disk info. But this is stat info
      and can be retrieved via refresh, at least for porcelain
      commands. Other just uses ce_flags for local purposes.
      
      So, keeping track of "dirty" entries is just a matter of setting a
      flag in index modification functions exposed by read-cache.c. Except
      unpack-trees, the rest of the code base does not do anything funny
      behind read-cache's back.
      
      The actual patch is less valueable than the summary above. But if
      anyone wants to re-identify the above sites. Applying this patch, then
      this:
      
          diff --git a/cache.h b/cache.h
          index 430d021..1692891 100644
          --- a/cache.h
          +++ b/cache.h
          @@ -267,7 +267,7 @@ static inline unsigned int canon_mode(unsigned int mode)
           #define cache_entry_size(len) (offsetof(struct cache_entry,name) + (len) + 1)
      
           struct index_state {
          -	struct cache_entry **cache;
          +	const struct cache_entry **cache;
           	unsigned int version;
           	unsigned int cache_nr, cache_alloc, cache_changed;
           	struct string_list *resolve_undo;
      
      will help quickly identify them without bogus warnings.
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9c5e6c80
  2. 05 7月, 2013 2 次提交
    • J
      Merge branch 'maint' · f8abaeba
      Junio C Hamano 提交于
      * maint:
        fixup-builtins: retire an old transition helper script
      f8abaeba
    • J
      Merge branch 'tr/test-v-and-v-subtest-only' · 04f2ddda
      Junio C Hamano 提交于
      Allows N instances of tests run in parallel, each running 1/N parts
      of the test suite under Valgrind, to speed things up.
      
      * tr/test-v-and-v-subtest-only:
        perf-lib: fix start/stop of perf tests
        test-lib: support running tests under valgrind in parallel
        test-lib: allow prefixing a custom string before "ok N" etc.
        test-lib: valgrind for only tests matching a pattern
        test-lib: verbose mode for only tests matching a pattern
        test-lib: self-test that --verbose works
        test-lib: rearrange start/end of test_expect_* and test_skip
        test-lib: refactor $GIT_SKIP_TESTS matching
        test-lib: enable MALLOC_* for the actual tests
      04f2ddda
  3. 04 7月, 2013 21 次提交
  4. 02 7月, 2013 16 次提交
    • J
      Merge branch 'maint' · 8c4e4ec3
      Junio C Hamano 提交于
      * maint:
        t7500: fix flipped actual/expect
        lib-rebase: document exec_ in FAKE_LINES
      8c4e4ec3
    • J
      Update draft release notes to 1.8.4 · 51f11d69
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      51f11d69
    • J
      Merge branch 'rr/remote-branch-config-refresh' · 7e5ad06f
      Junio C Hamano 提交于
      The original way to specify remote repository using .git/branches/
      used to have a nifty feature.  The code to support the feature was
      still in a function but the caller was changed not to call it 5
      years ago, breaking that feature and leaving the supporting code
      unreachable.
      
      * rr/remote-branch-config-refresh:
        t/t5505-remote: test multiple push/pull in remotes-file
        ls-remote doc: don't encourage use of branches-file
        ls-remote doc: rewrite <repository> paragraph
        ls-remote doc: fix example invocation on git.git
        t/t5505-remote: test url-with-# in branches-file
        remote: remove dead code in read_branches_file()
        t/t5505-remote: use test_path_is_missing
        t/t5505-remote: test push-refspec in branches-file
        t/t5505-remote: modernize style
      7e5ad06f
    • J
      Merge branch 'ed/color-prompt' · 46b04591
      Junio C Hamano 提交于
      Code clean-up for in-prompt status script (in contrib/).
      
      * ed/color-prompt:
        git-prompt.sh: add missing information in comments
        git-prompt.sh: do not print duplicate clean color code
        t9903: remove redundant tests
        git-prompt.sh: refactor colored prompt code
        t9903: add tests for git-prompt pcmode
      46b04591
    • J
      Merge branch 'ap/rebase-multiple-fixups' · eb3a4fc1
      Junio C Hamano 提交于
      Having multiple "fixup!" on a line in the rebase instruction sheet
      did not work very well with "git rebase -i --autosquash".
      
      * ap/rebase-multiple-fixups:
        lib-rebase: style: use write_script, <<-\EOF
        rebase -i: handle fixup! fixup! in --autosquash
      eb3a4fc1
    • J
      Merge branch 'kb/am-deprecate-resolved' · 4b9a0ded
      Junio C Hamano 提交于
      Promote "git am --continue" over "git am --resolved" for UI
      consistency.
      
      * kb/am-deprecate-resolved:
        am: replace uses of --resolved with --continue
      4b9a0ded
    • J
      Merge branch 'rr/column-doc' · 66929c42
      Junio C Hamano 提交于
      * rr/column-doc:
        column doc: rewrite documentation for column.ui
      66929c42
    • J
      Merge branch 'ft/doc-git-transport' · 43f25ae7
      Junio C Hamano 提交于
      * ft/doc-git-transport:
        documentation: add git:// transport security notice
      43f25ae7
    • J
      Merge branch 'sb/mailmap-merijn-brand' · 22930a0a
      Junio C Hamano 提交于
      * sb/mailmap-merijn-brand:
        .mailmap: Map "H.Merijn Brand" to "H. Merijn Brand"
      22930a0a
    • J
      Merge branch 'sg/bash-prompt' · 69350208
      Junio C Hamano 提交于
      * sg/bash-prompt:
        bash prompt: mention that PROMPT_COMMAND mode is faster
        bash prompt: avoid command substitution when finalizing gitstring
        bash prompt: avoid command substitution when checking for untracked files
        bash prompt: use bash builtins to check stash state
        bash prompt: use bash builtins to check for unborn branch for dirty state
        bash prompt: combine 'git rev-parse' for detached head
        bash prompt: combine 'git rev-parse' executions in the main code path
        bash prompt: use bash builtins to find out current branch
        bash prompt: use bash builtins to find out rebase state
        bash prompt: run 'git rev-parse --git-dir' directly instead of __gitdir()
        bash prompt: return early from __git_ps1() when not in a git repository
        bash prompt: print unique detached HEAD abbreviated object name
        bash prompt: add a test for symbolic link symbolic refs
        completion, bash prompt: move __gitdir() tests to completion test suite
        bash prompt: use 'write_script' helper in interactive rebase test
        bash prompt: fix redirection coding style in tests
      69350208
    • J
      Merge branch 'wk/doc-in-linux-3.x-era' · 0d07e98e
      Junio C Hamano 提交于
      Update documentation to match more recent realities.
      
      * wk/doc-in-linux-3.x-era:
        Documentation: Update 'linux-2.6.git' -> 'linux.git'
        Documentation: Update the NFS remote examples to use the staging repo
        doc/clone: Pick more compelling paths for the --reference example
        doc/clone: Remove the '--bare -l -s' example
      0d07e98e
    • J
      Merge branch 'jc/topo-author-date-sort' · 534f0e09
      Junio C Hamano 提交于
      "git log" learned the "--author-date-order" option, with which the
      output is topologically sorted and commits in parallel histories
      are shown intermixed together based on the author timestamp.
      
      * jc/topo-author-date-sort:
        t6003: add --author-date-order test
        topology tests: teach a helper to set author dates as well
        t6003: add --date-order test
        topology tests: teach a helper to take abbreviated timestamps
        t/lib-t6000: style fixes
        log: --author-date-order
        sort-in-topological-order: use prio-queue
        prio-queue: priority queue of pointers to structs
        toposort: rename "lifo" field
      534f0e09
    • J
      Merge branch 'jk/commit-info-slab' · 55f34c8d
      Junio C Hamano 提交于
      Allow adding custom information to commit objects in order to
      represent unbound number of flag bits etc.
      
      * jk/commit-info-slab:
        commit-slab: introduce a macro to define a slab for new type
        commit-slab: avoid large realloc
        commit: allow associating auxiliary info on-demand
      55f34c8d
    • A
      a4952815
    • A
      t7500: fix flipped actual/expect · f66d000b
      Andrew Pimlott 提交于
      Signed-off-by: NAndrew Pimlott <andrew@pimlott.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f66d000b
    • A
      lib-rebase: document exec_ in FAKE_LINES · 296fa993
      Andrew Pimlott 提交于
      Signed-off-by: NAndrew Pimlott <andrew@pimlott.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      296fa993