Commit graph

47048 commits

Author SHA1 Message Date
Jeff Smith 09002f1b31 blame: move scoreboard setup to libgit
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:23 +09:00
Jeff Smith b543bb1cdf blame: move scoreboard-related methods to libgit
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:23 +09:00
Jeff Smith 072bf4321f blame: move fake-commit-related methods to libgit
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:23 +09:00
Jeff Smith f5dd754c36 blame: move origin-related methods to libgit
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith dc076ae5d9 blame: move core structures to header
The origin, entry, and scoreboard structures are core to the blame
interface and need to be exposed for blame functionality.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith e94f77f0e2 blame: create entry prepend function
Create function that populates a blame_entry and prepends it to a list.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith d0d0ef1f67 blame: create scoreboard setup function
Create function that completes setting up blame_scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith 6e4c9b5bcf blame: create scoreboard init function
Create function that initializes blame_scoreboard to default values.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith 835c49f7d1 blame: rework methods that determine 'final' commit
Either prepare_initial or prepare_final is used to determine which
commit is marked as 'final'. Call the underlying methods directly to
make this more clear.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith 78b06e66be blame: wrap blame_sort and compare_blame_final
The new method's interface is marginally cleaner than blame_sort, and
will avoid the need to expose the compare_blame_final method.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:22 +09:00
Jeff Smith 8c59921dbf blame: move progress updates to a scoreboard callback
Allow the interface user to decide how to handle a progress update.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-25 13:08:08 +09:00
Jeff Smith 4149c1860b blame: make sanity_check use a callback in scoreboard
Allow the interface user to decide how to handle a failed sanity check,
whether that be to output with the current state or to do nothing.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 1f44129b21 blame: move no_whole_file_rename flag to scoreboard
The no_whole_file_rename flag is used in parts of blame that are being
moved to libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 73e1c299e5 blame: move xdl_opts flags to scoreboard
The xdl_opts flags are used in parts of blame that are being moved to
libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 2cf8337432 blame: move show_root flag to scoreboard
The show_root flag is used in parts of blame that are being moved to
libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith f81d70e940 blame: move reverse flag to scoreboard
The reverse flag is used in parts of blame that are being moved to
libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 84be875e61 blame: move contents_from to scoreboard
The argument from --contents is used in parts of blame that are being
moved to libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 18ec0d62ee blame: move copy/move thresholds to scoreboard
Copy and move score thresholds are used in parts of blame that are being
moved to libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 8449528deb blame: move stat counters to scoreboard
Statistic counters are used in parts of blame that are being moved to
libgit, and should be accessible via the scoreboard structure.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 935202bdf4 blame: rename nth_line function
Functions that will be publicly exposed should have names that better
reflect what they are a part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 1a31a2d98a blame: rename ent_score function
Functions that will be publicly exposed should have names that better
reflect what they are a part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith c697136229 blame: rename coalesce function
Functions that will be publicly exposed should have names that better
reflect what they are a part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 006a074499 blame: rename origin-related functions
Functions related to blame_origin that will be publicly exposed should
have names that better reflect what they are a part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith 9807b3d65d blame: rename scoreboard structure to blame_scoreboard
The scoreboard structure is core to the blame interface. Since
scoreboard will become more exposed, rename it to blame_scoreboard to
clarify what it is a part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:51 +09:00
Jeff Smith f84afb9c4e blame: rename origin structure to blame_origin
The origin structure is core to the blame interface.  Since origin will
become more exposed, rename it to blame_origin to clarify what it is a
part of.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:50 +09:00
Jeff Smith 8265921c3c blame: remove unused parameters
Clean up blame code before moving it into libgit

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:50 +09:00
Jeff Smith 3a35cb2ea8 blame: move textconv_object with related functions
textconv_object is used in places other than blame.c and should be moved
to a more appropriate location.  Other textconv related functions are
located in diff.c so that seems as good a place as any.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:50 +09:00
Jeff Smith b84bc9c367 blame: remove unneeded dependency on blob.h
With commit 21666f1 ("convert object type handling from a string to a
number", 2007-02-26), there was no longer a need for blame.c to include
blob.h but it was not removed.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-24 15:41:50 +09:00
Junio C Hamano b15667bbdc Merge branch 'js/larger-timestamps'
Some platforms have ulong that is smaller than time_t, and our
historical use of ulong for timestamp would mean they cannot
represent some timestamp that the platform allows.  Invent a
separate and dedicated timestamp_t (so that we can distingiuish
timestamps and a vanilla ulongs, which along is already a good
move), and then declare uintmax_t is the type to be used as the
timestamp_t.

* js/larger-timestamps:
  archive-tar: fix a sparse 'constant too large' warning
  use uintmax_t for timestamps
  date.c: abort if the system time cannot handle one of our timestamps
  timestamp_t: a new data type for timestamps
  PRItime: introduce a new "printf format" for timestamps
  parse_timestamp(): specify explicitly where we parse timestamps
  t0006 & t5000: skip "far in the future" test when time_t is too limited
  t0006 & t5000: prepare for 64-bit timestamps
  ref-filter: avoid using `unsigned long` for catch-all data type
2017-05-16 11:51:59 +09:00
Junio C Hamano afc5f2ce63 Merge branch 'jc/apply-fix-mismerge'
* jc/apply-fix-mismerge:
  apply.c: fix whitespace-only mismerge
2017-05-16 11:51:59 +09:00
Junio C Hamano 5cea6ffdf2 Merge branch 'ab/aix-needs-compat-regex'
Build fix.

* ab/aix-needs-compat-regex:
  config.mak.uname: set NO_REGEX=NeedsStartEnd on AIX
2017-05-16 11:51:58 +09:00
Junio C Hamano 0df3550d59 Merge branch 'jn/credential-doc-on-clear'
Doc update.

* jn/credential-doc-on-clear:
  credential doc: make multiple-helper behavior more prominent
2017-05-16 11:51:57 +09:00
Junio C Hamano 883247c2fc Merge branch 'jn/clone-add-empty-config-from-command-line'
"git clone --config var=val" is a way to populate the
per-repository configuration file of the new repository, but it did
not work well when val is an empty string.  This has been fixed.

* jn/clone-add-empty-config-from-command-line:
  clone: handle empty config values in -c
2017-05-16 11:51:56 +09:00
Junio C Hamano 4875663703 Merge branch 'bw/submodule-has-commits-update'
Code clean-up and duplicate removal.

* bw/submodule-has-commits-update:
  submodule: refactor logic to determine changed submodules
  submodule: improve submodule_has_commits()
  submodule: change string_list changed_submodule_paths
  submodule: remove add_oid_to_argv()
  submodule: rename free_submodules_sha1s()
  submodule: rename add_sha1_to_array()
2017-05-16 11:51:56 +09:00
Junio C Hamano c773da2e63 Merge branch 'ls/travis-doc-asciidoctor'
Travis CI gained a task to format the documentation with both
AsciiDoc and AsciiDoctor.

* ls/travis-doc-asciidoctor:
  travis-ci: check AsciiDoc/AsciiDoctor stderr output
  travis-ci: unset compiler for jobs that do not need one
  travis-ci: parallelize documentation build
  travis-ci: build documentation with AsciiDoc and Asciidoctor
2017-05-16 11:51:55 +09:00
Junio C Hamano f0858342fe Merge branch 'rs/large-zip'
"git archive --format=zip" learned to use zip64 extension when
necessary to go beyond the 4GB limit.

* rs/large-zip:
  t5004: require 64-bit support for big ZIP tests
  archive-zip: set version field for big files correctly
  archive-zip: support files bigger than 4GB
  archive-zip: support archives bigger than 4GB
  archive-zip: write ZIP dir entry directly to strbuf
  archive-zip: use strbuf for ZIP directory
  archive-zip: add tests for big ZIP archives
2017-05-16 11:51:55 +09:00
Junio C Hamano a1fdc85f41 Merge branch 'ab/clone-no-tags'
"git clone" learned the "--no-tags" option not to fetch all tags
initially, and also set up the tagopt not to follow any tags in
subsequent fetches.

* ab/clone-no-tags:
  tests: rename a test having to do with shallow submodules
  clone: add a --no-tags option to clone without tags
  tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"
2017-05-16 11:51:54 +09:00
Junio C Hamano 3900254bf2 Merge branch 'sk/status-short-branch-color-config'
The colors in which "git status --short --branch" showed the names
of the current branch and its remote-tracking branch are now
configurable.

* sk/status-short-branch-color-config:
  status: add color config slots for branch info in "--short --branch"
  status: fix missing newline when comment chars are disabled
2017-05-16 11:51:53 +09:00
Junio C Hamano db3b1d5843 Merge branch 'jk/am-leakfix'
The codepath in "git am" that is used when running "git rebase"
leaked memory held for the log message of the commits being rebased.

* jk/am-leakfix:
  am: shorten ident_split variable name in get_commit_info()
  am: simplify allocations in get_commit_info()
  am: fix commit buffer leak in get_commit_info()
2017-05-16 11:51:53 +09:00
Junio C Hamano 6ebfa10439 Merge branch 'jt/use-trailer-api-in-commands'
"git cherry-pick" and other uses of the sequencer machinery
mishandled a trailer block whose last line is an incomplete line.
This has been fixed so that an additional sign-off etc. are added
after completing the existing incomplete line.

* jt/use-trailer-api-in-commands:
  sequencer: add newline before adding footers
2017-05-16 11:51:52 +09:00
Junio C Hamano 4b44b7b1df Merge branch 'nd/worktree-kill-parse-ref'
"git gc" did not interact well with "git worktree"-managed
per-worktree refs.

* nd/worktree-kill-parse-ref:
  refs: kill set_worktree_head_symref()
  worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
  refs: introduce get_worktree_ref_store()
  refs: add REFS_STORE_ALL_CAPS
  refs.c: make submodule ref store hashmap generic
  environment.c: fix potential segfault by get_git_common_dir()
2017-05-16 11:51:51 +09:00
Junio C Hamano a0ab83ebd8 Merge branch 'dt/gc-ignore-old-gc-logs'
Attempt to allow us notice "fishy" situation where we fail to
remove the temporary directory used during the test.

* dt/gc-ignore-old-gc-logs:
  test-lib: retire $remove_trash variable
  test-lib.sh: do not barf under --debug at the end of the test
  test-lib: abort when can't remove trash directory
2017-05-16 11:51:51 +09:00
Junio C Hamano f767178a5a Merge branch 'jk/no-null-sha1-in-cache-tree'
Code to update the cache-tree has been tightened so that we won't
accidentally write out any 0{40} entry in the tree object.

* jk/no-null-sha1-in-cache-tree:
  cache-tree: reject entries with null sha1
2017-05-16 11:51:50 +09:00
Junio C Hamano d97141b0b9 Merge branch 'dt/raise-core-packed-git-limit'
The default packed-git limit value has been raised on larger
platforms to save "git fetch" from a (recoverable) failure while
"gc" is running in parallel.

* dt/raise-core-packed-git-limit:
  Increase core.packedGitLimit
2017-05-16 11:51:49 +09:00
Junio C Hamano b06d364310 Git 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-09 23:26:02 +09:00
Junio C Hamano 951ea7656e l10n for Git 2.13.0 round 2.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZEc7uAAoJEMek6Rt1RHooON8P/jehsG5LJuY2HMhR1S6KjfYW
 sqFQ8Qhee5U9eK9HUJflqjVPDFiIVnKAdcV08TO3Zh3LPn4Bxrg6I+ivR8dxz6S2
 FDxQMU0QuAMfxbb+ZMyxBNR1NV4axOw5KiSuT6vDba1kQboby/BjIIgTALmxXtMn
 U1UU3rDZiZNqCEjwxzcYw+p3vtRJT0LLc88KTIHVcsjrjRpGZnINoJ5N7dGG7yaB
 yYf4RX91UXnPC5/la5wnxFKosOdetSk3qXmjOt9HqFIPu0AMpQ/jGPCWyFwmDEe+
 0WLZ3Wz3+UFFgxmdXRMMycYgR6XD5PpY6JCB9lJohQ70ugqlxUMYwTc0vE46FCXv
 Oa+iRWnUZOHqz9rQ2FzvpLiqNhaWpu/ifKu8BhjAKzJBmqpqtgr5ZlE7fPKEz5uv
 v3DkdAGXiuFcBRLTcDAjKVS0/ZWFXjeMuM6ZIV80qNTL+0IB54pXxm0e49fBh4HV
 8WTUZoJxEfQBZsBcqdBD37RDGuB/PgzzCpk9doHZ2WWOFhAqqD01VPrXPKGagBgd
 N6nU8EnZB8US0Zi4YNn6txF+baagQCgnLHM68iDmqGX1GpO9W7SJqY6tPtcjLSkf
 NRX8SbT9gLYcRQ2ovZ/TK3PNVV0OhL3zXRGuSt6ORqBfLoHF2V1aqNyjrgjaaknl
 AOctWapWexpaPPg7tjpa
 =sP38
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po

l10n for Git 2.13.0 round 2.1

* tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 2
  l10n: sv.po: Update Swedish translation (3195t0f0u)
  l10n: zh_CN: review for git v2.13.0 l10n round 1
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3195t)
  l10n: fr.po v2.13 rnd 2
  l10n: de.po: translate 4 new messages
  l10n: de.po: update German translation
  l10n: de.po: lower case after semi-colon
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2
  l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)
2017-05-09 23:25:26 +09:00
Jiang Xin 961f9c8b1b Merge branch 'master' of git://github.com/nafmo/git-l10n-sv
* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (3195t0f0u)
2017-05-09 22:12:34 +08:00
Jiang Xin 60638e9816 l10n: zh_CN: for git v2.13.0 l10n round 2
Translate 4 messages (3195t0f0u) for git v2.13.0-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2017-05-09 21:55:38 +08:00
Peter Krefting 6402d7fcd5 l10n: sv.po: Update Swedish translation (3195t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2017-05-09 08:05:09 +01:00
Junio C Hamano 09fc7aff1a Sync with v2.12.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-05-08 20:20:21 -07:00