1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 13:26:29 +02:00
Commit Graph

45608 Commits

Author SHA1 Message Date
René Scharfe 35d803bc9a use SWAP macro
Apply the semantic patch swap.cocci to convert hand-rolled swaps to use
the macro SWAP.  The resulting code is shorter and easier to read, the
object code is effectively unchanged.

The patch for object.c had to be hand-edited in order to preserve the
comment before the change; Coccinelle tried to eat it for some reason.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-30 14:17:00 -08:00
René Scharfe db10199141 apply: use SWAP macro
Use the exported macro SWAP instead of the file-scoped macro swap and
remove the latter's definition.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-30 14:07:52 -08:00
René Scharfe 568edcb95a add SWAP macro
Add a macro for exchanging the values of variables.  It allows users
to avoid repetition and takes care of the temporary variable for them.
It also makes sure that the storage sizes of its two parameters are the
same.  Its memcpy(1) calls are optimized away by current compilers.

Also add a conservative semantic patch for transforming only swaps of
variables of the same type.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-30 14:07:45 -08:00
Junio C Hamano 4e59582ff7 Seventh batch for 2.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23 16:00:40 -08:00
Junio C Hamano 71db0cf0c7 Merge branch 'ws/request-pull-code-cleanup'
Code clean-up.

* ws/request-pull-code-cleanup:
  request-pull: drop old USAGE stuff
2017-01-23 15:59:23 -08:00
Junio C Hamano 831bd5e775 Merge branch 'rh/diff-orderfile-doc'
Documentation fix.

* rh/diff-orderfile-doc:
  diff: document the format of the -O (diff.orderFile) file
  diff: document behavior of relative diff.orderFile
2017-01-23 15:59:23 -08:00
Junio C Hamano e11c8261ba Merge branch 'sb/cd-then-git-can-be-written-as-git-c'
Test clean-up.

* sb/cd-then-git-can-be-written-as-git-c:
  lib-submodule-update.sh: reduce use of subshell by using "git -C"
2017-01-23 15:59:22 -08:00
Junio C Hamano e945770395 Merge branch 'ad/bisect-terms'
Documentation fix.

* ad/bisect-terms:
  Documentation/bisect: improve on (bad|new) and (good|bad)
2017-01-23 15:59:22 -08:00
Junio C Hamano 1ac244d5b2 Merge branch 'sg/fix-versioncmp-with-common-suffix'
The prereleaseSuffix feature of version comparison that is used in
"git tag -l" did not correctly when two or more prereleases for the
same release were present (e.g. when 2.0, 2.0-beta1, and 2.0-beta2
are there and the code needs to compare 2.0-beta1 and 2.0-beta2).

* sg/fix-versioncmp-with-common-suffix:
  versioncmp: generalize version sort suffix reordering
  versioncmp: factor out helper for suffix matching
  versioncmp: use earliest-longest contained suffix to determine sorting order
  versioncmp: cope with common part overlapping with prerelease suffix
  versioncmp: pass full tagnames to swap_prereleases()
  t7004-tag: add version sort tests to show prerelease reordering issues
  t7004-tag: use test_config helper
  t7004-tag: delete unnecessary tags with test_when_finished
2017-01-23 15:59:21 -08:00
Junio C Hamano 8ec68d1ae2 Merge branch 'vn/diff-ihc-config'
"git diff" learned diff.interHunkContext configuration variable
that gives the default value for its --inter-hunk-context option.

* vn/diff-ihc-config:
  diff: add interhunk context config option
2017-01-23 15:59:21 -08:00
Junio C Hamano e801be066c Merge branch 'sb/submodule-init'
Error message fix.

* sb/submodule-init:
  submodule update --init: display correct path from submodule
2017-01-23 15:59:21 -08:00
Junio C Hamano 9dc7f78149 Merge branch 'sb/submodule-embed-gitdir'
Help-text fix.

* sb/submodule-embed-gitdir:
  submodule absorbgitdirs: mention in docstring help
2017-01-23 15:59:20 -08:00
Junio C Hamano 972dfda5f6 Merge branch 'sb/submodule-config-tests'
Test updates.

* sb/submodule-config-tests:
  t7411: test lookup of uninitialized submodules
  t7411: quote URLs
2017-01-23 15:59:20 -08:00
Junio C Hamano 38f13709a6 Merge branch 'jk/grep-e-could-be-extended-beyond-posix'
Tighten a test to avoid mistaking an extended ERE regexp engine as
a PRE regexp engine.

* jk/grep-e-could-be-extended-beyond-posix:
  t7810: avoid assumption about invalid regex syntax
2017-01-23 15:59:20 -08:00
Junio C Hamano a06b4c337c Merge branch 'bw/read-blob-data-does-not-modify-index-state'
Code clean-up.

* bw/read-blob-data-does-not-modify-index-state:
  index: improve constness for reading blob data
2017-01-23 15:59:19 -08:00
Junio C Hamano 787f75f056 Sixth batch for 2.12 2017-01-18 15:15:36 -08:00
Junio C Hamano 6903f33c40 Merge branch 'sb/remove-gitview'
Retire long unused/unmaintained gitview from the contrib/ area.

* sb/remove-gitview:
  doc: git-gui browser does not default to HEAD
  doc: gitk: add the upstream repo location
  doc: gitk: remove gitview reference
  contrib: remove gitview
2017-01-18 15:12:18 -08:00
Junio C Hamano 0abfede3ae Merge branch 'js/asciidoctor-tweaks'
Adjust documentation to help AsciiDoctor render better while not
breaking the rendering done by AsciiDoc.

* js/asciidoctor-tweaks:
  asciidoctor: fix user-manual to be built by `asciidoctor`
  giteveryday: unbreak rendering with AsciiDoctor
2017-01-18 15:12:17 -08:00
Junio C Hamano 0c0e0fd0ca Merge branch 'sb/unpack-trees-cleanup'
Code cleanup.

* sb/unpack-trees-cleanup:
  unpack-trees: factor progress setup out of check_updates
  unpack-trees: remove unneeded continue
  unpack-trees: move checkout state into check_updates
2017-01-18 15:12:17 -08:00
Junio C Hamano 7cef7fadab Merge branch 'rh/mergetool-regression-fix'
"git mergetool" without any pathspec on the command line that is
run from a subdirectory became no-op in Git v2.11 by mistake, which
has been fixed.

* rh/mergetool-regression-fix:
  mergetool: fix running in subdir when rerere enabled
  mergetool: take the "-O" out of $orderfile
  t7610: add test case for rerere+mergetool+subdir bug
  t7610: spell 'git reset --hard' consistently
  t7610: don't assume the checked-out commit
  t7610: always work on a test-specific branch
  t7610: delete some now-unnecessary 'git reset --hard' lines
  t7610: run 'git reset --hard' after each test to clean up
  t7610: don't rely on state from previous test
  t7610: use test_when_finished for cleanup tasks
  t7610: move setup code to the 'setup' test case
  t7610: update branch names to match test number
  rev-parse doc: pass "--" to rev-parse in the --prefix example
  .mailmap: record canonical email for Richard Hansen
2017-01-18 15:12:16 -08:00
Junio C Hamano 1c16df23b1 Merge branch 'bw/realpath-wo-chdir'
The implementation of "real_path()" was to go there with chdir(2)
and call getcwd(3), but this obviously wouldn't be usable in a
threaded environment.  Rewrite it to manually resolve relative
paths including symbolic links in path components.

* bw/realpath-wo-chdir:
  real_path: set errno when max number of symlinks is exceeded
  real_path: prevent redefinition of MAXSYMLINKS
2017-01-18 15:12:16 -08:00
Junio C Hamano 5918bdcf26 Merge branch 'jk/execv-dashed-external'
Typing ^C to pager, which usually does not kill it, killed Git and
took the pager down as a collateral damage in certain process-tree
structure.  This has been fixed.

* jk/execv-dashed-external:
  execv_dashed_external: wait for child on signal death
  execv_dashed_external: stop exiting with negative code
  execv_dashed_external: use child_process struct
2017-01-18 15:12:16 -08:00
Junio C Hamano 60dae46e42 Merge branch 'sp/cygwin-build-fixes'
Build updates for Cygwin.

* sp/cygwin-build-fixes:
  Makefile: put LIBS after LDFLAGS for imap-send
  Makefile: POSIX windres
2017-01-18 15:12:15 -08:00
Junio C Hamano 00880a17dd Merge branch 'sb/pathspec-errors'
Running "git add a/b" when "a" is a submodule correctly errored
out, but without a meaningful error message.

* sb/pathspec-errors:
  pathspec: give better message for submodule related pathspec error
2017-01-18 15:12:15 -08:00
Junio C Hamano c7f352f31a Merge branch 'pb/test-must-fail-is-for-git'
Test cleanup.

* pb/test-must-fail-is-for-git:
  t9813: avoid using pipes
  don't use test_must_fail with grep
2017-01-18 15:12:15 -08:00
Junio C Hamano fe9ec8bdf6 Merge branch 'bw/pathspec-cleanup'
Code clean-up in the pathspec API.

* bw/pathspec-cleanup:
  pathspec: rename prefix_pathspec to init_pathspec_item
  pathspec: small readability changes
  pathspec: create strip submodule slash helpers
  pathspec: create parse_element_magic helper
  pathspec: create parse_long_magic function
  pathspec: create parse_short_magic function
  pathspec: factor global magic into its own function
  pathspec: simpler logic to prefix original pathspec elements
  pathspec: always show mnemonic and name in unsupported_magic
  pathspec: remove unused variable from unsupported_magic
  pathspec: copy and free owned memory
  pathspec: remove the deprecated get_pathspec function
  ls-tree: convert show_recursive to use the pathspec struct interface
  dir: convert fill_directory to use the pathspec struct interface
  dir: remove struct path_simplify
  mv: remove use of deprecated 'get_pathspec()'
2017-01-18 15:12:15 -08:00
Junio C Hamano e51058ffc5 Merge branch 'js/mingw-test-push-unc-path'
"git push \\server\share\dir" has recently regressed and then
fixed.  A test has retroactively been added for this breakage.

* js/mingw-test-push-unc-path:
  mingw: add a regression test for pushing to UNC paths
2017-01-18 15:12:14 -08:00
Junio C Hamano 8b5b0e8db5 Merge branch 'sb/submodule-cleanup-export-git-dir-env'
Code cleanup.

* sb/submodule-cleanup-export-git-dir-env:
  submodule.c: use GIT_DIR_ENVIRONMENT consistently
2017-01-18 15:12:14 -08:00
Junio C Hamano b85f79c7dd Merge branch 'km/branch-get-push-while-detached'
"git <cmd> @{push}" on a detached HEAD used to segfault; it has
been corrected to error out with a message.

* km/branch-get-push-while-detached:
  branch_get_push: do not segfault when HEAD is detached
2017-01-18 15:12:14 -08:00
Junio C Hamano 5c924692cd Merge branch 'jk/rebase-i-squash-count-fix'
"git rebase -i" with a recent update started showing an incorrect
count when squashing more than 10 commits.

* jk/rebase-i-squash-count-fix:
  rebase--interactive: count squash commits above 10 correctly
2017-01-18 15:12:13 -08:00
Junio C Hamano 256d3dabbd Merge branch 'jk/blame-fixes'
"git blame --porcelain" misidentified the "previous" <commit, path>
pair (aka "source") when contents came from two or more files.

* jk/blame-fixes:
  blame: output porcelain "previous" header for each file
  blame: handle --no-abbrev
  blame: fix alignment with --abbrev=40
2017-01-18 15:12:13 -08:00
Junio C Hamano 0f650e1479 Merge branch 'jk/archive-zip-userdiff-config'
"git archive" did not read the standard configuration files, and
failed to notice a file that is marked as binary via the userdiff
driver configuration.

* jk/archive-zip-userdiff-config:
  archive-zip: load userdiff config
2017-01-18 15:12:12 -08:00
Junio C Hamano cf417e2c1f Merge branch 'dt/disable-bitmap-in-auto-gc'
It is natural that "git gc --auto" may not attempt to pack
everything into a single pack, and there is no point in warning
when the user has configured the system to use the pack bitmap,
leading to disabling further "gc".

* dt/disable-bitmap-in-auto-gc:
  repack: die on incremental + write-bitmap-index
  auto gc: don't write bitmaps for incremental repacks
2017-01-18 15:12:12 -08:00
Junio C Hamano 74f7427f8a Merge branch 'ls/p4-retry-thrice'
A recent updates to "git p4" was not usable for older p4 but it
could be made to work with minimum changes.  Do so.

* ls/p4-retry-thrice:
  git-p4: do not pass '-r 0' to p4 commands
2017-01-18 15:12:12 -08:00
Junio C Hamano 3ccd681c2a Merge branch 'sb/submodule-rm-absorb'
"git rm" used to refuse to remove a submodule when it has its own
git repository embedded in its working tree.  It learned to move
the repository away to $GIT_DIR/modules/ of the superproject
instead, and allow the submodule to be deleted (as long as there
will be no loss of local modifications, that is).

* sb/submodule-rm-absorb:
  rm: absorb a submodules git dir before deletion
  submodule: rename and add flags to ok_to_remove_submodule
  submodule: modernize ok_to_remove_submodule to use argv_array
  submodule.h: add extern keyword to functions
2017-01-18 15:12:11 -08:00
Junio C Hamano 55d128ae06 Merge branch 'bw/grep-recurse-submodules'
"git grep" has been taught to optionally recurse into submodules.

* bw/grep-recurse-submodules:
  grep: search history of moved submodules
  grep: enable recurse-submodules to work on <tree> objects
  grep: optionally recurse into submodules
  grep: add submodules as a grep source type
  submodules: load gitmodules file from commit sha1
  submodules: add helper to determine if a submodule is initialized
  submodules: add helper to determine if a submodule is populated
  real_path: canonicalize directory separators in root parts
  real_path: have callers use real_pathdup and strbuf_realpath
  real_path: create real_pathdup
  real_path: convert real_path_internal to strbuf_realpath
  real_path: resolve symlinks by hand
2017-01-18 15:12:11 -08:00
Junio C Hamano ffac48d093 Merge git://ozlabs.org/~paulus/gitk
* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Remove translated message from comments
  gitk: ru.po: Update Russian translation
  gitk: Update copyright notice to 2016
  gitk: Clear array 'commitinfo' on reload
  gitk: Remove closed file descriptors from $blobdifffd
  gitk: Turn off undo manager in the text widget
  gitk: Fix Japanese translation for "marked commit"
  gitk: Fix missing commits when using -S or -G
  gitk: Use explicit RGB green instead of "lime"
  gitk: Add Portuguese translation
  gitk: Makefile: create install bin directory
  gitk: Include commit title in branch dialog
  gitk: Allow checking out a remote branch
  gitk: Add a 'rename' option to the branch context menu
2017-01-18 10:27:59 -08:00
David Aguilar 7f03c6e328 gitk: Remove translated message from comments
"make update-po" fails because a previously untranslated string
has now been translated:

	Updating po/sv.po
	po/sv.po:1388: duplicate message definition...
	po/sv.po:380: ...this is the location of the first definition

Remove the duplicate message definition.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2017-01-18 21:12:45 +11:00
Junio C Hamano 3313b78c14 RelNotes: drop merge-later comments for maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-17 15:27:13 -08:00
Junio C Hamano 733671b0fd Merge branch 'maint' 2017-01-17 15:20:16 -08:00
Junio C Hamano ad36dc8b4b Almost ready for 2.11.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-17 15:19:11 -08:00
Junio C Hamano 647a1bcf14 Merge branch 'mm/gc-safety-doc' into maint
Doc update.

* mm/gc-safety-doc:
  git-gc.txt: expand discussion of races with other processes
2017-01-17 15:19:11 -08:00
Junio C Hamano f976c89a20 Merge branch 'mm/push-social-engineering-attack-doc' into maint
Doc update on fetching and pushing.

* mm/push-social-engineering-attack-doc:
  doc: mention transfer data leaks in more places
2017-01-17 15:19:10 -08:00
Junio C Hamano 8ee6fc96f0 Merge branch 'jt/fetch-no-redundant-tag-fetch-map' into maint
Code cleanup to avoid using redundant refspecs while fetching with
the --tags option.

* jt/fetch-no-redundant-tag-fetch-map:
  fetch: do not redundantly calculate tag refmap
2017-01-17 15:19:09 -08:00
Junio C Hamano d4a682d42f Merge branch 'ls/filter-process' into maint
Doc update.

* ls/filter-process:
  t0021: fix flaky test
  docs: warn about possible '=' in clean/smudge filter process values
2017-01-17 15:19:08 -08:00
Junio C Hamano ef6e815133 Merge branch 'kh/tutorial-grammofix' into maint
* kh/tutorial-grammofix:
  doc: omit needless "for"
  doc: make the intent of sentence clearer
  doc: add verb in front of command to run
  doc: add articles (grammar)
2017-01-17 15:19:08 -08:00
Junio C Hamano 34d5a66a61 Merge branch 'lr/doc-fix-cet' into maint
* lr/doc-fix-cet:
  date-formats.txt: Typo fix
2017-01-17 15:19:08 -08:00
Junio C Hamano 1fb4a1126a Merge branch 'sb/t3600-cleanup' into maint
Code cleanup.

* sb/t3600-cleanup:
  t3600: slightly modernize style
  t3600: remove useless redirect
2017-01-17 15:19:07 -08:00
Junio C Hamano bc7547fd92 Merge branch 'jk/readme-gmane-is-no-more' into maint
* jk/readme-gmane-is-no-more:
  README: replace gmane link with public-inbox
2017-01-17 15:19:05 -08:00
Junio C Hamano 1addc197eb Merge branch 'sb/unpack-trees-grammofix' into maint
* sb/unpack-trees-grammofix:
  unpack-trees: fix grammar for untracked files in directories
2017-01-17 15:19:05 -08:00