Commit Graph

50833 Commits

Author SHA1 Message Date
Junio C Hamano
1819630707 Merge branch 'cc/perf-aggregate-sort'
Perf-test update.

* cc/perf-aggregate-sort:
  perf/aggregate: add --sort-by=regression option
  perf/aggregate: add display_dir()
2018-04-11 13:09:54 +09:00
Junio C Hamano
d877975e12 Merge branch 'ab/doc-hash-brokenness'
Doc updates.

* ab/doc-hash-brokenness:
  doc hash-function-transition: clarify what SHAttered means
  doc hash-function-transition: clarify how older gits die on NewHash
2018-04-11 13:09:54 +09:00
Junio C Hamano
709f9f5b4b Merge branch 'bc/hash-independent-tests'
Tests that rely on the exact hardcoded values of object names have
been updated in preparation for hash function migration.

* bc/hash-independent-tests:
  t2107: abstract away SHA-1-specific constants
  t2101: abstract away SHA-1-specific constants
  t2101: modernize test style
  t2020: abstract away SHA-1 specific constants
  t1507: abstract away SHA-1-specific constants
  t1411: abstract away SHA-1-specific constants
  t1405: sort reflog entries in a hash-independent way
  t1300: abstract away SHA-1-specific constants
  t1304: abstract away SHA-1-specific constants
  t1011: abstract away SHA-1-specific constants
2018-04-11 13:09:54 +09:00
Junio C Hamano
cd94dd02a6 Merge branch 'ab/drop-contrib-examples'
* ab/drop-contrib-examples:
  Remove contrib/examples/*
2018-04-11 13:09:54 +09:00
Junio C Hamano
0b0cc9f867 The second batch for 2.18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-10 16:32:49 +09:00
Junio C Hamano
aa1c2b6804 Merge branch 'ys/bisect-object-id-missing-conversion-fix'
Code clean-up.

* ys/bisect-object-id-missing-conversion-fix:
  bisect: use oid_to_hex() for converting object_id hashes to hex strings
2018-04-10 16:28:24 +09:00
Junio C Hamano
9aa3a4c406 Merge branch 'yk/filter-branch-non-committish-refs'
when refs that do not point at committish are given, "git
filter-branch" gave a misleading error messages.  This has been
corrected.

* yk/filter-branch-non-committish-refs:
  filter-branch: fix errors caused by refs that point at non-committish
2018-04-10 16:28:23 +09:00
Junio C Hamano
e8cb62f190 Merge branch 'nd/trace-with-env'
Code cleanup.

* nd/trace-with-env:
  run-command: use strbuf_addstr() for adding a string to a strbuf
2018-04-10 16:28:22 +09:00
Junio C Hamano
ef06d74b45 Merge branch 'nd/parseopt-completion-more'
The mechanism to use parse-options API to automate the command line
completion continues to get extended and polished.

* nd/parseopt-completion-more:
  completion: use __gitcomp_builtin in _git_cherry
  completion: use __gitcomp_builtin in _git_ls_tree
  completion: delete option-only completion commands
  completion: add --option completion for most builtin commands
  completion: factor out _git_xxx calling code
  completion: mention the oldest version we need to support
  git.c: add hidden option --list-parseopt-builtins
  git.c: move cmd_struct declaration up
2018-04-10 16:28:22 +09:00
Junio C Hamano
51f813c6b3 Merge branch 'ds/bsearch-hash'
Code to find the length to uniquely abbreviate object names based
on packfile content, which is a relatively recent addtion, has been
optimized to use the same fan-out table.

* ds/bsearch-hash:
  sha1_name: use bsearch_pack() in unique_in_pack()
  sha1_name: use bsearch_pack() for abbreviations
  packfile: define and use bsearch_pack()
  sha1_name: convert struct min_abbrev_data to object_id
2018-04-10 16:28:22 +09:00
Junio C Hamano
57e4b1c67a Merge branch 'ws/rebase-p'
Code clean-up.

* ws/rebase-p:
  rebase: remove merges_option and a blank line
  rebase: remove unused code paths from git_rebase__interactive__preserve_merges
  rebase: remove unused code paths from git_rebase__interactive
  rebase: add and use git_rebase__interactive__preserve_merges
  rebase: extract functions out of git_rebase__interactive
  rebase: reindent function git_rebase__interactive
  rebase: update invocation of rebase dot-sourced scripts
  rebase-interactive: simplify pick_on_preserving_merges
2018-04-10 16:28:21 +09:00
Junio C Hamano
d19e556529 Merge branch 'jk/diff-highlight-graph-fix'
"diff-highlight" filter (in contrib/) learned to undertand "git log
--graph" output better.

* jk/diff-highlight-graph-fix:
  diff-highlight: detect --graph by indent
  diff-highlight: use flush() helper consistently
  diff-highlight: test graphs with --color
  diff-highlight: test interleaved parallel lines of history
  diff-highlight: prefer "echo" to "cat" in tests
  diff-highlight: use test_tick in graph test
  diff-highlight: correct test graph diagram
2018-04-10 16:28:21 +09:00
Junio C Hamano
0873c393c7 Merge branch 'nd/remove-ignore-env-field'
Code clean-up for the "repository" abstraction.

* nd/remove-ignore-env-field:
  repository.h: add comment and clarify repo_set_gitdir
  repository: delete ignore_env member
  sha1_file.c: move delayed getenv(altdb) back to setup_git_env()
  repository.c: delete dead functions
  repository.c: move env-related setup code back to environment.c
  repository: initialize the_repository in main()
2018-04-10 16:28:20 +09:00
Junio C Hamano
62c0fd46a8 Merge branch 'ps/contains-id-error-message'
"git tag --contains no-such-commit" gave a full list of options
after giving an error message.

* ps/contains-id-error-message:
  parse-options: do not show usage upon invalid option value
2018-04-10 16:28:20 +09:00
Junio C Hamano
69d71ec443 The first batch for 2.18 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-10 08:31:17 +09:00
Junio C Hamano
cbf0339439 Merge branch 'tg/stash-untracked-with-pathspec-fix'
"git stash push -u -- <pathspec>" gave an unnecessary and confusing
error message when there was no tracked files that match the
<pathspec>, which has been fixed.

* tg/stash-untracked-with-pathspec-fix:
  stash: drop superfluos pathspec parameter
  stash push -u: don't create empty stash
  stash push: avoid printing errors
  stash: fix nonsense pipeline
2018-04-10 08:25:45 +09:00
Junio C Hamano
ca923f7265 Merge branch 'nd/worktree-prune'
The way "git worktree prune" worked internally has been simplified,
by assuming how "git worktree move" moves an existing worktree to a
different place.

* nd/worktree-prune:
  worktree prune: improve prune logic when worktree is moved
  worktree: delete dead code
  gc.txt: more details about what gc does
2018-04-10 08:25:45 +09:00
Junio C Hamano
a5bbc29994 Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues.

* bc/object-id: (36 commits)
  convert: convert to struct object_id
  sha1_file: introduce a constant for max header length
  Convert lookup_replace_object to struct object_id
  sha1_file: convert read_sha1_file to struct object_id
  sha1_file: convert read_object_with_reference to object_id
  tree-walk: convert tree entry functions to object_id
  streaming: convert istream internals to struct object_id
  tree-walk: convert get_tree_entry_follow_symlinks internals to object_id
  builtin/notes: convert static functions to object_id
  builtin/fmt-merge-msg: convert remaining code to object_id
  sha1_file: convert sha1_object_info* to object_id
  Convert remaining callers of sha1_object_info_extended to object_id
  packfile: convert unpack_entry to struct object_id
  sha1_file: convert retry_bad_packed_offset to struct object_id
  sha1_file: convert assert_sha1_type to object_id
  builtin/mktree: convert to struct object_id
  streaming: convert open_istream to use struct object_id
  sha1_file: convert check_sha1_signature to struct object_id
  sha1_file: convert read_loose_object to use struct object_id
  builtin/index-pack: convert struct ref_delta_entry to object_id
  ...
2018-04-10 08:25:45 +09:00
Junio C Hamano
78c20b8fca Merge branch 'ma/shortlog-revparse'
"git shortlog cruft" aborted with a BUG message when run outside a
Git repository.  The command has been taught to complain about
extra and unwanted arguments on its command line instead in such a
case.

* ma/shortlog-revparse:
  shortlog: disallow left-over arguments outside repo
  shortlog: add usage-string for stdin-reading
  git-shortlog.txt: reorder usages
2018-04-10 08:25:44 +09:00
Junio C Hamano
a26e1f4b59 Merge branch 'ab/install-symlinks'
The build procedure learned to optionally use symbolic links
(instead of hardlinks and copies) to install "git-foo" for built-in
commands, whose binaries are all identical.

* ab/install-symlinks:
  Makefile: optionally symlink libexec/git-core binaries to bin/git
  Makefile: add a gitexecdir_relative variable
  Makefile: fix broken bindir_relative variable
2018-04-10 08:25:44 +09:00
Junio C Hamano
cb3e97dae8 Merge branch 'ml/filter-branch-no-op-error'
"git filter-branch" learned to use a different exit code to allow
the callers to tell the case where there was no new commits to
rewrite from other error cases.

* ml/filter-branch-no-op-error:
  filter-branch: return 2 when nothing to rewrite
2018-04-10 08:25:44 +09:00
Junio C Hamano
cac5351363 Merge branch 'ab/pcre-v2'
Git can be built to use either v1 or v2 of the PCRE library, and so
far, the build-time configuration USE_LIBPCRE=YesPlease instructed
the build procedure to use v1, but now it means v2.  USE_LIBPCRE1
and USE_LIBPCRE2 can be used to explicitly choose which version to
use, as before.

* ab/pcre-v2:
  Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1
  configure: detect redundant --with-libpcre & --with-libpcre1
  configure: fix a regression in PCRE v1 detection
2018-04-10 08:25:43 +09:00
Junio C Hamano
5d806b74d5 Merge branch 'ti/fetch-everything-local-optim'
A "git fetch" from a repository with insane number of refs into a
repository that is already up-to-date still wasted too many cycles
making many lstat(2) calls to see if these objects at the tips
exist as loose objects locally.  These lstat(2) calls are optimized
away by enumerating all loose objects beforehand.

It is unknown if the new strategy negatively affects existing use
cases, fetching into a repository with many loose objects from a
repository with small number of refs.

* ti/fetch-everything-local-optim:
  fetch-pack.c: use oidset to check existence of loose object
2018-04-10 08:25:43 +09:00
Junio C Hamano
e4bb62fa1e Merge branch 'en/rename-directory-detection'
Rename detection logic in "diff" family that is used in "merge" has
learned to guess when all of x/a, x/b and x/c have moved to z/a,
z/b and z/c, it is likely that x/d added in the meantime would also
want to move to z/d by taking the hint that the entire directory
'x' moved to 'z'.  A bug causing dirty files involved in a rename
to be overwritten during merge has also been fixed as part of this
work.

* en/rename-directory-detection: (29 commits)
  merge-recursive: ensure we write updates for directory-renamed file
  merge-recursive: avoid spurious rename/rename conflict from dir renames
  directory rename detection: new testcases showcasing a pair of bugs
  merge-recursive: fix remaining directory rename + dirty overwrite cases
  merge-recursive: fix overwriting dirty files involved in renames
  merge-recursive: avoid clobbering untracked files with directory renames
  merge-recursive: apply necessary modifications for directory renames
  merge-recursive: when comparing files, don't include trees
  merge-recursive: check for file level conflicts then get new name
  merge-recursive: add computation of collisions due to dir rename & merging
  merge-recursive: check for directory level conflicts
  merge-recursive: add get_directory_renames()
  merge-recursive: make a helper function for cleanup for handle_renames
  merge-recursive: split out code for determining diff_filepairs
  merge-recursive: make !o->detect_rename codepath more obvious
  merge-recursive: fix leaks of allocated renames and diff_filepairs
  merge-recursive: introduce new functions to handle rename logic
  merge-recursive: move the get_renames() function
  directory rename detection: tests for handling overwriting dirty files
  directory rename detection: tests for handling overwriting untracked files
  ...
2018-04-10 08:25:43 +09:00
Junio C Hamano
468165c1d8 Git 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-02 10:13:35 -07:00
Junio C Hamano
1614dd0fbc l10n for Git 2.17.0 round 1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJawLbqAAoJEMek6Rt1RHoou0AP/RKpAATgtMBPprgvwbMoJ1Mu
 Q1Lh56tRweg8ZjbXTJkRL15vRZNYwv3j+hM8H5wc7HHf8QFTYfQNK9KjWH5vyD5a
 ZR/akqdpVugiHt1mdCSRbp/A+qoj8mpX0SRTMqzYNX0BiZSb31ScShy1bCTY/BJl
 rmyWwmFtdgrzOrhDCYKVcoruRD1B13ZBvxmlcXrUiGuC5EwVHwR5GCcrG4hWILyq
 2MblmVrJU1liA9q0F8rBkTZYTk4rMo9g/Tz+xZvCVUTttwVvvMUA4V680ECIHL30
 wiip1nAhEBDGL9RyB4aOlNu75fzY6RJ8KL/yBBwG4FfckQ0LIQg5f3UecqV2gAdx
 P+LA70hU+0FguVn2GtOJZWg1m/adnc3aovp1wxQlUOmp+TiaOPmTl8CRdMxgu8dz
 O8hnorvTP9MFCySkJ0QB2ZkFJU9+szgF0AqoxT627byAv6/ROSLYUxAbOnUoboxL
 ec09C/vzSj6qkP6I+CX/hZBeFAqTN2j9CnJwXhm/niArkH+yTVQ/JBSesjygVvu0
 NilepolgTpfSpGQEJvIQOIHMQbueP3XII0YJE3oDn5vWl/ZYaCVXhyTAlElmP/pa
 lttgIYJ8bK2zJGspLN/FydGXCgOTr9OoE/202q1CaHKeRhKTVC4RuBpoei+ik9SZ
 xVBykNEymi5S0CRUeJlP
 =xKC7
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po

l10n for Git 2.17.0 round 1

* tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po:
  l10n: de.po: translate 132 new messages
  l10n: zh_CN: review for git v2.17.0 l10n round 1
  l10n: zh_CN: for git v2.17.0 l10n round 1
  l10n: ko.po: Update Korean translation
  l10n: fr.po: v2.17.0 no fuzzy
  l10n: sv.po: Update Swedish translation (3376t0f0u)
  l10n: Update Catalan translation
  l10n: fr.po v2.17.0 round 1
  l10n: vi.po(3376t): Updated Vietnamese translation for v2.17
  l10n: bg.po: Updated Bulgarian translation (3376t)
  l10n: es.po: Update Spanish translation 2.17.0
  l10n: git.pot: v2.17.0 round 1 (132 new, 44 removed)
  l10n: es.po: fixes to Spanish translation
2018-04-02 10:12:38 -07:00
Junio C Hamano
5f9441769f Merge branch 'pw/add-p-single'
Hotfix.

* pw/add-p-single:
  add -p: fix 2.17.0-rc* regression due to moved code
2018-04-02 10:10:55 -07:00
Ævar Arnfjörð Bjarmason
fd2fb4aa0c add -p: fix 2.17.0-rc* regression due to moved code
Fix a regression in 88f6ffc1c2 ("add -p: only bind search key if
there's more than one hunk", 2018-02-13) which is present in
2.17.0-rc*, but not 2.16.0.

In Perl, regex variables like $1 always refer to the last regex
match. When the aforementioned change added a new regex match between
the old match and the corresponding code that was expecting $1, the $1
variable would always be undef, since the newly inserted regex match
doesn't have any captures.

As a result the "/" feature to search for a string in a hunk by regex
completely broke, on git.git:

    $ perl -pi -e 's/Git/Tig/g' README.md
    $ ./git --exec-path=$PWD add -p
    [..]
    Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? s
    Split into 4 hunks.
    [...]
    Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? /Many
    Use of uninitialized value $1 in string eq at /home/avar/g/git/git-add--interactive line 1568, <STDIN> line 1.
    search for regex? Many

I.e. the initial "/regex" command wouldn't work, and would always emit
a warning and ask again for a regex, now it works as intended again.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-31 21:54:28 -07:00
Ralf Thielow
8bb6d60dd6 l10n: de.po: translate 132 new messages
Translate 132 new messages came from git.pot update in abc8de64d (l10n:
git.pot: v2.17.0 round 1 (132 new, 44 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2018-03-31 13:21:09 +02:00
Junio C Hamano
c2a499e6c3 Merge branch 'jh/partial-clone'
Hotfix.

* jh/partial-clone:
  upload-pack: disable object filtering when disabled by config
  unpack-trees: release oid_array after use in check_updates()
2018-03-29 15:39:59 -07:00
Jonathan Nieder
c7620bd0f3 upload-pack: disable object filtering when disabled by config
When upload-pack gained partial clone support (v2.17.0-rc0~132^2~12,
2017-12-08), it was guarded by the uploadpack.allowFilter config item
to allow server operators to control when they start supporting it.

That config item didn't go far enough, though: it controls whether the
'filter' capability is advertised, but if a (custom) client ignores
the capability advertisement and passes a filter specification anyway,
the server would handle that despite allowFilter being false.

This is particularly significant if a security bug is discovered in
this new experimental partial clone code.  Installations without
uploadpack.allowFilter ought not to be affected since they don't
intend to support partial clone, but they would be swept up into being
vulnerable.

Simplify and limit the attack surface by making uploadpack.allowFilter
disable the feature, not just the advertisement of it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-29 15:39:31 -07:00
Ray Chen
610f8099cd l10n: zh_CN: review for git v2.17.0 l10n round 1
Signed-off-by: Ray Chen <oldsharp@gmail.com>
2018-03-29 22:09:39 +08:00
Jiang Xin
31e5e17b22 l10n: zh_CN: for git v2.17.0 l10n round 1
Translate 132 new messages (3376t0f0u) for git 2.17.0-rc0.

Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2018-03-29 22:09:39 +08:00
Junio C Hamano
03df495947 Git 2.17-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-28 11:05:14 -07:00
Junio C Hamano
72d30c71a3 Merge branch 'tg/stash-doc-typofix'
Hotfix.

* tg/stash-doc-typofix:
  git-stash.txt: remove extra square bracket
2018-03-28 11:04:25 -07:00
Junio C Hamano
2081fa73b4 Merge branch 'pc/submodule-helper'
Hotfix.

* pc/submodule-helper:
  submodule deinit: handle non existing pathspecs gracefully
2018-03-28 11:04:25 -07:00
Junio C Hamano
87cc76fa3a Merge branch 'nd/parseopt-completion'
Hotfix for recently graduated topic that give help to completion
scripts from the Git subcommands that are being completed

* nd/parseopt-completion:
  t9902: disable test on the list of merge-strategies under GETTEXT_POISON
  completion: clear cached --options when sourcing the completion script
2018-03-28 11:04:24 -07:00
Changwoo Ryu
1be5ae8a4b l10n: ko.po: Update Korean translation
Signed-off-by: Changwoo Ryu <cwryu@debian.org>
Signed-off-by: Sihyeon Jang <uneedsihyeon@gmail.com>
Signed-off-by: Gwan-gyeong Mun <elongbug@gmail.com>
Reviewed-by: Changwoo Ryu <cwryu@debian.org>
2018-03-28 23:41:20 +09:00
Stefan Beller
9748e39d0c submodule deinit: handle non existing pathspecs gracefully
This fixes a regression introduced in 2e612731b5 (submodule: port
submodule subcommand 'deinit' from shell to C, 2018-01-15), when
handling pathspecs that do not exist gracefully. This restores the
historic behavior of reporting the pathspec as unknown and returning
instead of reporting a bug.

Reported-by: Peter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 22:07:13 -07:00
Thomas Gummerer
0a790f09c6 git-stash.txt: remove extra square bracket
In 1ada5020b3 ("stash: use stash_push for no verb form", 2017-02-28),
when the pathspec argument was introduced in 'git stash', that was also
documented.  However I forgot to remove an extra square bracket after
the '--message' argument, even though the square bracket should have
been after the pathspec argument (where it was also added).

Remove the extra square bracket after the '--message' argument, to show
that the pathspec argument should be used with the 'push' verb.

While the pathspec argument can be used without the push verb, that's a
special case described later in the man page, and removing the first extra
square bracket instead of the second one makes the synopis easier to
understand.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 19:09:13 -07:00
Ævar Arnfjörð Bjarmason
5988eb631a doc hash-function-transition: clarify what SHAttered means
Attempt to clarify what the SHAttered attack means in practice for
Git. The previous version of the text made no mention whatsoever of
Git already having a mitigation for this specific attack, which the
SHAttered researchers claim will detect cryptanalytic collision
attacks.

I may have gotten some of the nuances wrong, but as far as I know this
new text accurately summarizes the current situation with SHA-1 in
git. I.e. git doesn't really use SHA-1 anymore, it uses
Hardened-SHA-1 (they just so happen to produce the same outputs
99.99999999999...% of the time).

Thus the previous text was incorrect in asserting that:

    [...]As a result [of SHAttered], SHA-1 cannot be considered
    cryptographically secure any more[...]

That's not the case. We have a mitigation against SHAttered, *however*
we consider it prudent to move to work towards a NewHash should future
vulnerabilities in either SHA-1 or Hardened-SHA-1 emerge.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 19:08:31 -07:00
Ævar Arnfjörð Bjarmason
45fa195ff0 doc hash-function-transition: clarify how older gits die on NewHash
Change the "Repository format extension" to accurately describe what
happens with different versions of Git when they encounter NewHash
repositories, instead of only saying what happens with versions v2.7.0
and later.

See ab9cb76f66 ("Repository format version check.", 2005-11-25) and
00a09d57eb ("introduce "extensions" form of
core.repositoryformatversion", 2015-06-23) for the relevant changes to
the setup code where these variables are checked.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 19:07:51 -07:00
Christian Couder
2e3efd0613 perf/aggregate: add --sort-by=regression option
One of the most interesting thing one can be interested in when
looking at performance test results is possible performance
regressions.

This new option makes it easy to spot such possible regressions.

This new option is named '--sort-by=regression' to make it
possible and easy to add other ways to sort the results, like for
example '--sort-by=utime'.

If we would like to sort according to how much the stime regressed
we could also add a new option called '--sort-by=regression:stime'.
Then '--sort-by=regression' could become a synonym for
'--sort-by=regression:rtime'.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 17:04:07 -07:00
Christian Couder
c94b6ac50f perf/aggregate: add display_dir()
This new helper function will be reused in a subsequent
commit.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 17:04:06 -07:00
brian m. carlson
31bdb1f28e t2107: abstract away SHA-1-specific constants
Use the $EMPTY_BLOB variable instead of hard-coding a hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00
brian m. carlson
736f2efcfb t2101: abstract away SHA-1-specific constants
Adjust the test so that it uses variables and command substitution for
blobs instead of hard-coded hashes.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00
brian m. carlson
7cbae724a4 t2101: modernize test style
Most of our tests start with the opening quote of the test body on the
same line as the test_expect_success call.  Additionally, our tests are
usually indented with a single tab.  Update this test to be the same as
most others, which will make it easier to use inline heredocs in the
future.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00
brian m. carlson
ae2f8d5bd6 t2020: abstract away SHA-1 specific constants
Adjust the test so that it uses variables for the revisions we're
checking out instead of hard-coded hashes.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00
brian m. carlson
60e0dc0bd8 t1507: abstract away SHA-1-specific constants
Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00
brian m. carlson
d3438d1a09 t1411: abstract away SHA-1-specific constants
Adjust the test so that it uses a variable consisting of the current
HEAD instead of a hard-coded hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-26 15:10:48 -07:00