1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 11:46:11 +02:00
Commit Graph

48344 Commits

Author SHA1 Message Date
Nguyễn Thái Ngọc Duy 073cf63c52 revision.c: use refs_for_each*() instead of for_each_*_submodule()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:52:33 -07:00
Nguyễn Thái Ngọc Duy 62f0b399e0 refs: add refs_head_ref()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:47:31 -07:00
Nguyễn Thái Ngọc Duy 29babbeeb3 refs: move submodule slash stripping code to get_submodule_ref_store
This is a better place that will benefit all submodule callers instead
of just resolve_gitlink_ref()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:46:50 -07:00
Nguyễn Thái Ngọc Duy 2c616c172d refs.c: refactor get_submodule_ref_store(), share common free block
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:46:02 -07:00
Nguyễn Thái Ngọc Duy be489d02d2 revision.c: --indexed-objects add objects from all worktrees
This is the result of single_worktree flag never being set (no way to up
until now). To get objects from current index only, set single_worktree.

The other add_index_objects_to_pending's caller is mark_reachable_objects()
(e.g. "git prune") which also mark objects from all indexes.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:44:41 -07:00
Nguyễn Thái Ngọc Duy 6c3d818154 revision.c: refactor add_index_objects_to_pending()
The core code is factored out and take 'struct index_state *' instead so
that we can reuse it to add objects from index files other than .git/index
in the next patch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:42:45 -07:00
Nguyễn Thái Ngọc Duy ee394bd376 refs.c: use is_dir_sep() in resolve_gitlink_ref()
The "submodule" argument in this function is a path, which can have
either '/' or '\\' as a separator. Use is_dir_sep() to support both.

Noticed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:42:24 -07:00
Nguyễn Thái Ngọc Duy ff9445be47 revision.h: new flag in struct rev_info wrt. worktree-related refs
The revision walker can walk through per-worktree refs like HEAD or
SHA-1 references in the index. These currently are from the current
worktree only. This new flag is added to change rev-list behavior in
this regard:

When single_worktree is set, only current worktree is considered. When
it is not set (which is the default), all worktrees are considered.

The default is chosen so because the two big components that rev-list
works with are object database (entirely shared between worktrees) and
refs (mostly shared). It makes sense that default behavior goes per-repo
too instead of per-worktree.

The flag will eventually be exposed as a rev-list argument with
documents. For now it stays internal until the new behavior is fully
implemented.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 14:42:21 -07:00
Junio C Hamano 3dc57ebfbd The fourth batch post 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-24 10:37:44 -07:00
Junio C Hamano 16e842bcf5 Merge branch 'jk/doc-the-this'
Doc clean-up.

* jk/doc-the-this:
  doc: fix typo in sendemail.identity
2017-08-24 10:20:04 -07:00
Junio C Hamano 985b2cfc7b Merge branch 'rs/commit-h-single-parent-cleanup'
Code clean-up.

* rs/commit-h-single-parent-cleanup:
  commit: remove unused inline function single_parent()
2017-08-24 10:20:03 -07:00
Junio C Hamano d33a433236 Merge branch 'jc/simplify-progress'
The API to start showing progress meter after a short delay has
been simplified.

* jc/simplify-progress:
  progress: simplify "delayed" progress API
2017-08-24 10:20:02 -07:00
Junio C Hamano 6ea13d8845 Merge branch 'tc/curl-with-backports'
Updates to the HTTP layer we made recently unconditionally used
features of libCurl without checking the existence of them, causing
compilation errors, which has been fixed.  Also migrate the code to
check feature macros, not version numbers, to cope better with
libCurl that vendor ships with backported features.

* tc/curl-with-backports:
  http: use a feature check to enable GSSAPI delegation control
  http: fix handling of missing CURLPROTO_*
2017-08-24 10:20:02 -07:00
Junio C Hamano d1615f93ac Merge branch 'cc/subprocess-handshake-missing-capabilities'
When handshake with a subprocess filter notices that the process
asked for an unknown capability, Git did not report what program
the offending subprocess was running.  This has been corrected.

* cc/subprocess-handshake-missing-capabilities:
  sub-process: print the cmd when a capability is unsupported
2017-08-24 10:20:02 -07:00
Junio C Hamano 11bd95604a Merge branch 'rs/object-id'
Conversion from uchar[20] to struct object_id continues.

* rs/object-id:
  tree-walk: convert fill_tree_descriptor() to object_id
2017-08-24 10:20:02 -07:00
Junio C Hamano bdfc15fb21 Merge branch 'lg/merge-signoff'
"git merge" learned a "--signoff" option to add the Signed-off-by:
trailer with the committer's name.

* lg/merge-signoff:
  merge: add a --signoff flag
2017-08-24 10:20:02 -07:00
Junio C Hamano 3956649422 Sync with maint
* maint:
  Prepare for 2.14.2
2017-08-23 14:36:38 -07:00
Junio C Hamano edc74bc7f0 Prepare for 2.14.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-23 14:36:03 -07:00
Junio C Hamano 0f41b92c79 Merge branch 'jt/t1450-fsck-corrupt-packfile' into maint
A test update.

* jt/t1450-fsck-corrupt-packfile:
  tests: ensure fsck fails on corrupt packfiles
2017-08-23 14:33:52 -07:00
Junio C Hamano 86bf8e45b2 Merge branch 'jb/t8008-cleanup' into maint
Code clean-up.

* jb/t8008-cleanup:
  t8008: rely on rev-parse'd HEAD instead of sha1 value
2017-08-23 14:33:52 -07:00
Junio C Hamano df2dd28316 Merge branch 'jt/subprocess-handshake' into maint
Code cleanup.

* jt/subprocess-handshake:
  sub-process: refactor handshake to common function
  Documentation: migrate sub-process docs to header
  convert: add "status=delayed" to filter process protocol
  convert: refactor capabilities negotiation
  convert: move multiple file filter error handling to separate function
  convert: put the flags field before the flag itself for consistent style
  t0021: write "OUT <size>" only on success
  t0021: make debug log file name configurable
  t0021: keep filter log files on comparison
2017-08-23 14:33:52 -07:00
Junio C Hamano de55703672 Merge branch 'dc/fmt-merge-msg-microcleanup' into maint
Code cleanup.

* dc/fmt-merge-msg-microcleanup:
  fmt-merge-msg: fix coding style
2017-08-23 14:33:52 -07:00
Junio C Hamano b55b936038 Merge branch 'ah/doc-wserrorhighlight' into maint
Doc update.

* ah/doc-wserrorhighlight:
  doc: add missing values "none" and "default" for diff.wsErrorHighlight
2017-08-23 14:33:51 -07:00
Junio C Hamano d0dffcacf3 Merge branch 'cc/ref-is-hidden-microcleanup' into maint
Code cleanup.

* cc/ref-is-hidden-microcleanup:
  refs: use skip_prefix() in ref_is_hidden()
2017-08-23 14:33:50 -07:00
Junio C Hamano 0869277033 Merge branch 'js/run-process-parallel-api-fix' into maint
API fix.

* js/run-process-parallel-api-fix:
  run_processes_parallel: change confusing task_cb convention
2017-08-23 14:33:49 -07:00
Junio C Hamano e22a48c4c0 Merge branch 'rs/pack-objects-pbase-cleanup' into maint
Code clean-up.

* rs/pack-objects-pbase-cleanup:
  pack-objects: remove unnecessary NULL check
2017-08-23 14:33:48 -07:00
Junio C Hamano 697f11b638 Merge branch 'jt/fsck-code-cleanup' into maint
Code clean-up.

* jt/fsck-code-cleanup:
  fsck: cleanup unused variable
  object: remove "used" field from struct object
  fsck: remove redundant parse_tree() invocation
2017-08-23 14:33:48 -07:00
Junio C Hamano 0d824bc7f6 Merge branch 'rs/stat-data-unaligned-reads-fix' into maint
Code clean-up.

* rs/stat-data-unaligned-reads-fix:
  dir: support platforms that require aligned reads
2017-08-23 14:33:48 -07:00
Junio C Hamano d3b7ee087e Merge branch 'rs/move-array' into maint
Code clean-up.

* rs/move-array:
  ls-files: don't try to prune an empty index
  apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
  use MOVE_ARRAY
  add MOVE_ARRAY
2017-08-23 14:33:46 -07:00
Junio C Hamano 752732c6d8 Merge branch 'rs/bswap-ubsan-fix' into maint
Code clean-up.

* rs/bswap-ubsan-fix:
  bswap: convert get_be16, get_be32 and put_be32 to inline functions
  bswap: convert to unsigned before shifting in get_be32
2017-08-23 14:33:46 -07:00
Junio C Hamano cdc55aad7d Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint
A recently added test for the "credential-cache" helper revealed
that EOF detection done around the time the connection to the cache
daemon is torn down were flaky.  This was fixed by reacting to
ECONNRESET and behaving as if we got an EOF.

* dl/credential-cache-socket-in-xdg-cache:
  credential-cache: interpret an ECONNRESET as an EOF
2017-08-23 14:33:45 -07:00
Junio C Hamano b9e56be086 Merge branch 'hb/gitweb-project-list' into maint
When a directory is not readable, "gitweb" fails to build the
project list.  Work this around by skipping such a directory.

It might end up hiding a problem under the rug and a better
solution might be to loudly complain to the administrator pointing
out the problematic directory, but this will at least make it
"work".

* hb/gitweb-project-list:
  gitweb: skip unreadable subdirectories
2017-08-23 14:33:44 -07:00
Junio C Hamano 01ced48994 Merge branch 'ks/commit-abort-on-empty-message-fix' into maint
"git commit" when seeing an totally empty message said "you did not
edit the message", which is clearly wrong.  The message has been
corrected.

* ks/commit-abort-on-empty-message-fix:
  commit: check for empty message before the check for untouched template
2017-08-23 14:33:44 -07:00
Junio C Hamano 0cb526e031 Merge branch 'jk/reflog-walk' into maint
Numerous bugs in walking of reflogs via "log -g" and friends have
been fixed.

* jk/reflog-walk:
  reflog-walk: apply --since/--until to reflog dates
  reflog-walk: stop using fake parents
  rev-list: check reflog_info before showing usage
  get_revision_1(): replace do-while with an early return
  log: do not free parents when walking reflog
  log: clarify comment about reflog cycles
  revision: disallow reflog walking with revs->limited
  t1414: document some reflog-walk oddities
2017-08-23 14:33:44 -07:00
Junio C Hamano 72140a7319 Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint
The http.{sslkey,sslCert} configuration variables are to be
interpreted as a pathname that honors "~[username]/" prefix, but
weren't, which has been fixed.

* jc/http-sslkey-and-ssl-cert-are-paths:
  http.c: http.sslcert and http.sslkey are both pathnames
2017-08-23 14:33:43 -07:00
Junio C Hamano 447f80f508 Merge branch 'jk/ref-filter-colors' into maint
"%C(color name)" in the pretty print format always produced ANSI
color escape codes, which was an early design mistake.  They now
honor the configuration (e.g. "color.ui = never") and also tty-ness
of the output medium.

* jk/ref-filter-colors:
  ref-filter: consult want_color() before emitting colors
  pretty: respect color settings for %C placeholders
  rev-list: pass diffopt->use_colors through to pretty-print
  for-each-ref: load config earlier
  color: check color.ui in git_default_config()
  ref-filter: pass ref_format struct to atom parsers
  ref-filter: factor out the parsing of sorting atoms
  ref-filter: make parse_ref_filter_atom a private function
  ref-filter: provide a function for parsing sort options
  ref-filter: move need_color_reset_at_eol into ref_format
  ref-filter: abstract ref format into its own struct
  ref-filter: simplify automatic color reset
  t: use test_decode_color rather than literal ANSI codes
  docs/for-each-ref: update pointer to color syntax
  check return value of verify_ref_format()
2017-08-23 14:33:42 -07:00
Junio C Hamano f613b251da Merge branch 'js/git-gui-msgfmt-on-windows' into maint
Because recent Git for Windows do come with a real msgfmt, the
build procedure for git-gui has been updated to use it instead of a
hand-rolled substitute.

* js/git-gui-msgfmt-on-windows:
  git-gui (MinGW): make use of MSys2's msgfmt
  git gui: allow for a long recentrepo list
  git gui: de-dup selected repo from recentrepo history
  git gui: cope with duplicates in _get_recentrepo
  git-gui: remove duplicate entries from .gitconfig's gui.recentrepo
2017-08-23 14:33:42 -07:00
Junio C Hamano ab86f93d68 The third batch post 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-23 14:16:00 -07:00
Junio C Hamano 883bac8f7f Merge branch 'mg/format-ref-doc-fix'
Doc fix.

* mg/format-ref-doc-fix:
  Documentation/git-for-each-ref: clarify peeling of tags for --format
  Documentation: use proper wording for ref format strings
2017-08-23 14:13:15 -07:00
Junio C Hamano 4add209e2c Merge branch 'sb/submodule-parallel-update'
Code clean-up.

* sb/submodule-parallel-update:
  submodule.sh: remove unused variable
2017-08-23 14:13:14 -07:00
Junio C Hamano 0f8472a497 Merge branch 'jc/diff-sane-truncate-no-more'
Code clean-up.

* jc/diff-sane-truncate-no-more:
  diff: retire sane_truncate_fn
2017-08-23 14:13:13 -07:00
Junio C Hamano 45121b9e30 Merge branch 'hv/t5526-andand-chain-fix'
Test fix.

* hv/t5526-andand-chain-fix:
  t5526: fix some broken && chains
2017-08-23 14:13:13 -07:00
Junio C Hamano 85c81a74e2 Merge branch 'as/grep-quiet-no-match-exit-code-fix'
"git grep -L" and "git grep --quiet -L" reported different exit
codes; this has been corrected.

* as/grep-quiet-no-match-exit-code-fix:
  git-grep: correct exit code with --quiet and -L
2017-08-23 14:13:12 -07:00
Junio C Hamano c3e034f0f0 Merge branch 'kw/commit-keep-index-when-pre-commit-is-not-run'
"git commit" used to discard the index and re-read from the filesystem
just in case the pre-commit hook has updated it in the middle; this
has been optimized out when we know we do not run the pre-commit hook.

* kw/commit-keep-index-when-pre-commit-is-not-run:
  commit: skip discarding the index if there is no pre-commit hook
2017-08-23 14:13:11 -07:00
Junio C Hamano 3830759c1c Merge branch 'sb/sha1-file-cleanup'
Code clean-up.

* sb/sha1-file-cleanup:
  sha1_file: make read_info_alternates static
2017-08-23 14:13:10 -07:00
Junio C Hamano 8a43d3bae5 Merge branch 'rs/t1002-do-not-use-sum'
Test simplification.

* rs/t1002-do-not-use-sum:
  t1002: stop using sum(1)
2017-08-23 14:13:09 -07:00
Junio C Hamano ef9408cfb5 Merge branch 'kd/stash-with-bash-4.4'
bash 4.4 or newer gave a warning on NUL byte in command
substitution done in "git stash"; this has been squelched.

* kd/stash-with-bash-4.4:
  stash: prevent warning about null bytes in input
2017-08-23 14:13:08 -07:00
Junio C Hamano 76be4487f0 Merge branch 'ah/doc-empty-string-is-false'
Doc update.

* ah/doc-empty-string-is-false:
  doc: clarify "config --bool" behaviour with empty string
2017-08-23 14:13:08 -07:00
Junio C Hamano ad7d3c3b39 Merge branch 'kw/rebase-progress'
"git rebase", especially when it is run by mistake and ends up
trying to replay many changes, spent long time in silence.  The
command has been taught to show progress report when it spends
long time preparing these many changes to replay (which would give
the user a chance to abort with ^C).

* kw/rebase-progress:
  rebase: turn on progress option by default for format-patch
  format-patch: have progress option while generating patches
2017-08-23 14:13:07 -07:00
Junio C Hamano 75010153e9 Merge branch 'ks/prepare-commit-msg-sample-fix'
An "oops" fix to a topic that is already in 'master'.

* ks/prepare-commit-msg-sample-fix:
  hook: use correct logical variable
2017-08-23 14:13:07 -07:00