1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 06:47:52 +01:00
Commit graph

38610 commits

Author SHA1 Message Date
Ralf Thielow
463243d49c l10n: de.po: translate "track" as "versionieren"
Suggested-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-01-17 18:09:56 +01:00
Jiang Xin
04cb2f28cc l10n: zh_CN: translations for git v2.3.0-rc0
Translate 13 new messages (2298t0f0u) for git v2.3.0-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2015-01-17 15:28:36 +08:00
Ramkumar Ramachandra
a94655dcfe git-svn: make it play nicely with submodules
It's a simple matter of opening the directory specified in the gitfile.

[ew: tweaked check to avoid open() on directories]

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2015-01-15 08:35:55 +00:00
Ramkumar Ramachandra
9a2bb059e7 Git::SVN: handle missing ref_id case correctly
ref_id should not match "refs/remotes/".

[ew: dropped initial hunk for GIT_SVN_ID at Ramkumar's request]

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2015-01-15 08:35:55 +00:00
Peter Krefting
2a26377047 l10n: sv.po: Update Swedish translation (2298t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2015-01-14 22:55:49 +01:00
Johannes Sixt
d0a042a186 t1050-large: generate large files without dd
For some unknown reason, the dd on my Windows box segfaults randomly,
but since recently, it does so much more often than it used to, which
makes running the test suite burdensome.

Use printf to write large files instead of dd. To emphasize that three
of the large blobs are exact copies, use cp to allocate them.

The new code makes the files a bit smaller, and they are not sparse
anymore, but the tests do not depend on these properties. We do not want
to use test-genrandom here (which is used to generate large files
elsewhere in t1050), so that the files can be compressed well (which
keeps the run-time short).

The files are now large text files, not binary files. But since they
are larger than core.bigfilethreshold they are diagnosed as binary
by Git. For this reason, the 'git diff' tests that check the output
for "Binary files differ" still pass.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-14 13:08:12 -08:00
Junio C Hamano
563d4e59bd Fifth batch for 2.3 cycle
Hopefully this will be the final feature update for 2.3-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-14 12:44:03 -08:00
Junio C Hamano
670f6a72b8 Merge branch 'po/doc-core-ignorestat'
* po/doc-core-ignorestat:
  doc: core.ignoreStat update, and clarify the --assume-unchanged effect
  doc: core.ignoreStat clarify the --assume-unchanged effect
2015-01-14 12:41:38 -08:00
Junio C Hamano
401a317aae Merge branch 'rc/for-each-ref-tracking'
* rc/for-each-ref-tracking:
  for-each-ref: always check stat_tracking_info()'s return value
2015-01-14 12:39:02 -08:00
Junio C Hamano
63a0e83ea6 Merge branch 'rh/autoconf-rhel3'
Build update for older RHEL.

* rh/autoconf-rhel3:
  configure.ac: check for HMAC_CTX_cleanup
  configure.ac: check for clock_gettime and CLOCK_MONOTONIC
  configure.ac: check 'tv_nsec' field in 'struct stat'
2015-01-14 12:37:21 -08:00
Junio C Hamano
09deda3746 Merge branch 'ak/fewer-includes'
* ak/fewer-includes:
  cat-file: remove unused includes
  git.c: remove unnecessary #includes
2015-01-14 12:37:19 -08:00
Junio C Hamano
ce8e4e3e57 Merge branch 'ak/doc-add-v-n-options'
* ak/doc-add-v-n-options:
  Documentation: list long options for -v and -n
2015-01-14 12:37:14 -08:00
Junio C Hamano
d62078e910 Merge branch 'ak/show-branch-usage-string'
* ak/show-branch-usage-string:
  show-branch: line-wrap show-branch usage
2015-01-14 12:37:07 -08:00
Junio C Hamano
601ca9287d Merge branch 'rh/test-color-avoid-terminfo-in-original-home'
We try to see if "tput" gives a useful result before switching TERM
to dumb and moving HOME to point to our fake location for stability
of the tests, and then use the command when coloring the output
from the tests, but there is no guarantee "tput" works after
switching HOME.

* rh/test-color-avoid-terminfo-in-original-home:
  test-lib.sh: do tests for color support after changing HOME
  test-lib: use 'test ...' instead of '[ ... ]'
2015-01-14 12:36:45 -08:00
Junio C Hamano
9920c71825 Merge branch 'tf/prompt-preserve-exit-status'
Using the exit status of the last command in the prompt, e.g.
PS1='$(__git_ps1) $? ', did not work well because the helper
function stomped on the exit status.

* tf/prompt-preserve-exit-status:
  git-prompt: preserve value of $? in all cases
2015-01-14 12:35:49 -08:00
Junio C Hamano
e1ef7d177c Merge branch 'rh/hide-prompt-in-ignored-directory'
* rh/hide-prompt-in-ignored-directory:
  git-prompt.sh: allow to hide prompt for ignored pwd
  git-prompt.sh: if pc mode, immediately set PS1 to a plain prompt
2015-01-14 12:34:01 -08:00
Junio C Hamano
1e7ef5d9bf Merge branch 'mm/complete-rebase-autostash'
* mm/complete-rebase-autostash:
  git-completion: add --autostash for 'git rebase'
2015-01-14 12:33:57 -08:00
Junio C Hamano
8128835f91 Merge branch 'aw/doc-smtp-ssl-cert-path'
A long overdue documentation update to match an age-old code
update.

* aw/doc-smtp-ssl-cert-path:
  correct smtp-ssl-cert-path description
2015-01-14 12:33:50 -08:00
Junio C Hamano
41753312e1 Merge branch 'sp/subtree-doc'
* sp/subtree-doc:
  subtree: fix AsciiDoc list item continuation
2015-01-14 12:33:46 -08:00
Junio C Hamano
e9f91191cc Merge branch 'km/log-usage-string-i18n'
* km/log-usage-string-i18n:
  log.c: fix translation markings
2015-01-14 12:32:39 -08:00
Junio C Hamano
2202ab1931 Merge branch 'km/imap-send-libcurl-options'
Now imap-send learned to talk to the server using cURL library,
allow the same GIT_CURL_VERBOSE environment variable to control the
verbosity of the chattering.

* km/imap-send-libcurl-options:
  imap-send.c: set CURLOPT_USE_SSL to CURLUSESSL_TRY
  imap-send.c: support GIT_CURL_VERBOSE
2015-01-14 12:31:50 -08:00
Junio C Hamano
6d9f0c7c0d Merge branch 'jk/prune-packed-server-info'
Fix recent breakage in Git 2.2 that started creating info/refs and
objects/info/packs files with permission bits tighter than user's
umask.

* jk/prune-packed-server-info:
  update-server-info: create info/* with mode 0666
  t1301: set umask in reflog sharedrepository=group test
2015-01-14 12:30:27 -08:00
Junio C Hamano
7fd92d9ed0 Merge branch 'js/remote-add-with-insteadof'
"git remote add $name $URL" is now allowed when "url.$URL.insteadOf"
is already defined.

* js/remote-add-with-insteadof:
  Add a regression test for 'git remote add <existing> <same-url>'
  git remote: allow adding remotes agreeing with url.<...>.insteadOf
2015-01-14 12:29:47 -08:00
Jeff King
f6786c8dcb http-push: trim trailing newline from remote symref
When we fetch a symbolic ref file from the remote, we get
the whole string "ref: refs/heads/master\n", recognize it by
skipping past the "ref: ", and store the rest. We should
chomp the trailing newline.

This bug was introduced in ae021d8 (use skip_prefix to avoid
magic numbers, 2014-06-18), which did not notice that the
length computation fed to xmemdupz was quietly tweaked by 1
to account for this.

We can solve it by explicitly trimming the newline, which is
more obvious. Note that we use strbuf_rtrim here, which will
actually cut off any trailing whitespace, not just a single
newline. This is a good thing, though, as it makes our
parsing more liberal (and spaces are not valid in refnames
anyway).

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-14 10:28:02 -08:00
Tony Finch
6babe76496 git-prompt: preserve value of $? in all cases
Signed-off-by: Tony Finch <dot@dotat.at>
Reviewed-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-14 10:11:49 -08:00
Alexander Kuleshov
331004836b cat-file: use "type" and "size" from outer scope
In cat_one_file(), "type" and "size" variables are defined in the
function scope, and then two variables of the same name are defined
in a block in one of the if/else statement, hiding the definitions
in the outer scope.

Because the values of the outer variables before the control enters
this scope, however, do not have to be preserved, we can remove
useless definitions of variables from the inner scope safely without
breaking anything.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 12:36:04 -08:00
Jean-Noel Avila
9905988a57 l10n: fr.po v2.3.0 round 1
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2015-01-13 20:23:41 +01:00
Lukas Fleischer
a46442f167 blame.c: fix garbled error message
The helper functions prepare_final() and prepare_initial() return a
pointer to a string that is a member of an object in the revs->pending
array. This array is later rebuilt when running prepare_revision_walk()
which potentially transforms the pointer target into a bogus string. Fix
this by maintaining a copy of the original string.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 10:05:53 -08:00
Jeff King
8c53f0719b use xstrdup_or_null to replace ternary conditionals
This replaces "x ? xstrdup(x) : NULL" with xstrdup_or_null(x).
The change is fairly mechanical, with the exception of
resolve_refdup, which can eliminate a temporary variable.

There are still a few hits grepping for "?.*xstrdup", but
these are of slightly different forms and cannot be
converted (e.g., "x ? xstrdup(x->foo) : NULL").

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 10:05:48 -08:00
Jeff King
eaa541eb59 builtin/commit.c: use xstrdup_or_null instead of envdup
The only reason for envdup to be its own function is that we
have to save the result in a temporary string. With
xstrdup_or_null, we can feed the result of getenv()
directly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 10:03:40 -08:00
Jeff King
4440690786 builtin/apply.c: use xstrdup_or_null instead of null_strdup
This file had its own identical helper that predates
xstrdup_or_null. Let's use the global one to avoid
repetition.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 10:03:38 -08:00
Jeff King
d64ea0f83b git-compat-util: add xstrdup_or_null helper
It's a common idiom to duplicate a string if it is non-NULL,
or pass a literal NULL through. This is already a one-liner
in C, but you do have to repeat the name of the string
twice. So if there's a function call, you must write:

  const char *x = some_fun(...);
  return x ? xstrdup(x) : NULL;

instead of (with this patch) just:

  return xstrdup_or_null(some_fun(...));

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13 10:03:30 -08:00
Tran Ngoc Quan
fbf5d8c3d0 l10n: vi.po(2298t): Updated and change Plural-Forms
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2015-01-13 14:23:12 +07:00
Jiang Xin
beb691f770 l10n: git.pot: v2.3.0 round 1 (13 new, 11 removed)
Generate po/git.pot from v2.3.0-rc0 for git v2.3.0 l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2015-01-13 14:05:57 +08:00
Jiang Xin
7695982c20 Merge branch 'master' of git://github.com/alexhenrie/git-po
* 'master' of git://github.com/alexhenrie/git-po:
  l10n: ca.po: various fixes
2015-01-13 14:04:57 +08:00
Philip Oakley
92be938e96 doc: core.ignoreStat update, and clarify the --assume-unchanged effect
The assume-unchanged bit, and consequently core.ignoreStat, can be
misunderstood. Be assertive about the expectation that file changes should
notified to Git.

Overhaul the general wording thus:
    1. direct description of what is ignored given first.
    2. example instruction of the user manual action required.
    3. use sideways indirection for assume-unchanged and update-index
       references.
    4. add a 'normally' to give leeway for the change detection.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-12 15:12:05 -08:00
Raphael Kubo da Costa
b6160d950c for-each-ref: always check stat_tracking_info()'s return value
The code handling %(upstream:track) and %(upstream:trackshort)
assumed that it always had a valid branch that had been sanitized
earlier in populate_value(), and thus did not check the return value
of the call to stat_tracking_info().

While there is indeed some sanitization code that basically
corresponds to stat_tracking_info() returning 0 (no base branch
set), the function can also return -1 when the base branch did exist
but has since then been deleted.

In this case, num_ours and num_theirs had undefined values and a
call to `git for-each-ref --format="%(upstream:track)"` could print
spurious values such as

  [behind -111794512]
  [ahead 38881640, behind 5103867]

even for repositories with one single commit.

Verify stat_tracking_info()'s return value and do not print anything
if it returns -1. This behavior also matches the documentation ("has
no effect if the ref does not have tracking information associated
with it").

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-12 15:10:46 -08:00
Junio C Hamano
addfb21a94 Git 2.3.0-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-12 14:12:42 -08:00
Junio C Hamano
def6dd9bc6 Sync with 2.2.2 2015-01-12 14:08:42 -08:00
Junio C Hamano
fdf96a20ac Git 2.2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-12 14:06:12 -08:00
Junio C Hamano
9f16184af5 Merge branch 'jk/read-packed-refs-without-path-max' into maint
* jk/read-packed-refs-without-path-max:
  read_packed_refs: use skip_prefix instead of static array
  read_packed_refs: pass strbuf to parse_ref_line
  read_packed_refs: use a strbuf for reading lines
2015-01-12 14:02:54 -08:00
Junio C Hamano
d0879b33a6 Merge branch 'mg/add-ignore-errors' into maint
* mg/add-ignore-errors:
  add: ignore only ignored files
2015-01-12 14:02:19 -08:00
Junio C Hamano
efc028b1f2 Merge branch 'mh/find-uniq-abbrev' into maint
* mh/find-uniq-abbrev:
  sha1_name: avoid unnecessary sha1 lookup in find_unique_abbrev
2015-01-12 14:02:05 -08:00
Junio C Hamano
9ea21fa89c Merge branch 'jk/approxidate-avoid-y-d-m-over-future-dates' into maint
* jk/approxidate-avoid-y-d-m-over-future-dates:
  approxidate: allow ISO-like dates far in the future
  pass TIME_DATE_NOW to approxidate future-check
2015-01-12 14:01:18 -08:00
Junio C Hamano
ba1edc9264 Merge branch 'rw/apply-does-not-take-ignore-date' into maint
* rw/apply-does-not-take-ignore-date:
  git-am.txt: --ignore-date flag is not passed to git-apply
2015-01-12 14:00:16 -08:00
Junio C Hamano
417a5b226c Merge branch 'jk/for-each-reflog-ent-reverse' into maint
* jk/for-each-reflog-ent-reverse:
  for_each_reflog_ent_reverse: turn leftover check into assertion
  for_each_reflog_ent_reverse: fix newlines on block boundaries
2015-01-12 12:19:17 -08:00
Junio C Hamano
832258da96 Merge branch 'bc/fetch-thin-less-aggressive-in-normal-repository'
Earlier we made "rev-list --object-edge" more aggressively list the
objects at the edge commits, in order to reduce number of objects
fetched into a shallow repository, but the change affected cases
other than "fetching into a shallow repository" and made it
unusably slow (e.g. fetching into a normal repository should not
have to suffer the overhead from extra processing).  Limit it to a
more specific case by introducing --objects-edge-aggressive, a new
option to rev-list.

* bc/fetch-thin-less-aggressive-in-normal-repository:
  pack-objects: use --objects-edge-aggressive for shallow repos
  rev-list: add an option to mark fewer edges as uninteresting
  Documentation: add missing article in rev-list-options.txt
2015-01-12 11:38:57 -08:00
Junio C Hamano
e20d5a2c44 Merge branch 'sb/doc-submitting-patches-keep-notes'
* sb/doc-submitting-patches-keep-notes:
  SubmittingPatches: explain rationale for using --notes with format-patch
2015-01-12 11:38:55 -08:00
Junio C Hamano
7a353ec965 Merge branch 'rs/simplify-transport-get'
* rs/simplify-transport-get:
  transport: simplify duplicating a substring in transport_get() using xmemdupz()
2015-01-12 11:38:53 -08:00
Junio C Hamano
acddf49432 Merge branch 'rs/simplify-parsing-commit-tree-S'
* rs/simplify-parsing-commit-tree-S:
  commit-tree: simplify parsing of option -S using skip_prefix()
2015-01-12 11:38:48 -08:00