OSDN Git Service
Michael Haggerty [Mon, 11 May 2015 15:25:17 +0000 (17:25 +0200)]
rename_ref(): integrate lock_ref_sha1_basic() errors into ours
Now that lock_ref_sha1_basic() gives us back its error messages via a
strbuf, incorporate its error message into our error message rather
than emitting two separate error messages.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:16 +0000 (17:25 +0200)]
lock_ref_sha1_basic(): improve diagnostics for ref D/F conflicts
If there is a failure to lock a reference that is likely caused by a
D/F conflict (e.g., trying to lock "refs/foo/bar" when reference
"refs/foo" already exists), invoke verify_refname_available() to try
to generate a more helpful error message.
That function might not detect an error. For example, some
non-reference file might be blocking the deletion of an
otherwise-empty directory tree, or there might be a race with another
process that just deleted the offending reference. In such cases,
generate the strerror-based error message like before.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:15 +0000 (17:25 +0200)]
lock_ref_sha1_basic(): report errors via a "struct strbuf *err"
For now, change the callers to spew the error to stderr like before.
But soon we will change them to incorporate the reason for the failure
into their own error messages.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:14 +0000 (17:25 +0200)]
verify_refname_available(): report errors via a "struct strbuf *err"
It shouldn't be spewing errors directly to stderr.
For now, change its callers to spew the errors to stderr.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:13 +0000 (17:25 +0200)]
verify_refname_available(): rename function
Rename is_refname_available() to verify_refname_available() and change
its return value from 1 for success to 0 for success, to be consistent
with our error-handling convention. In a moment it will also get a
"struct strbuf *err" parameter.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:12 +0000 (17:25 +0200)]
refs: check for D/F conflicts among refs created in a transaction
If two references that D/F conflict (e.g., "refs/foo" and
"refs/foo/bar") are created in a single transaction, the old code
discovered the problem only after the "commit" phase of
ref_transaction_commit() had already begun. This could leave some
references updated and others not, which violates the promise of
atomicity.
Instead, check for such conflicts during the "locking" phase:
* Teach is_refname_available() to take an "extras" parameter that can
contain extra reference names with which the specified refname must
not conflict.
* Change lock_ref_sha1_basic() to take an "extras" parameter, which it
passes through to is_refname_available().
* Change ref_transaction_commit() to pass "affected_refnames" to
lock_ref_sha1_basic() as its "extras" argument.
This change fixes a test case in t1404.
This code is a bit stricter than it needs to be. We could conceivably
allow reference "refs/foo/bar" to be created in the same transaction
as "refs/foo" is deleted (or vice versa). But that would be
complicated to implement, because it is not possible to lock
"refs/foo/bar" while "refs/foo" exists as a loose reference, but on
the other hand we don't want to delete some references before adding
others (because that could leave a gap during which required objects
are unreachable). There is also a complication that reflog files'
paths can conflict.
Any less-strict implementation would probably require tricks like the
packing of all references before the start of the real transaction, or
the use of temporary intermediate reference names.
So for now let's accept too-strict checks. Some reference update
transactions will be rejected unnecessarily, but they will be rejected
in their entirety rather than leaving the repository in an
intermediate state, as would happen now.
Please note that there is still one kind of D/F conflict that is *not*
handled correctly. If two processes are running at the same time, and
one tries to create "refs/foo" at the same time that the other tries
to create "refs/foo/bar", then they can race with each other. Both
processes can obtain their respective locks ("refs/foo.lock" and
"refs/foo/bar.lock"), proceed to the "commit" phase of
ref_transaction_commit(), and then the slower process will discover
that it cannot rename its lockfile into place (after possibly having
committed changes to other references). There appears to be no way to
fix this race without changing the locking policy, which in turn would
require a change to *all* Git clients.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:11 +0000 (17:25 +0200)]
ref_transaction_commit(): use a string_list for detecting duplicates
Detect duplicates by storing the reference names in a string_list and
sorting that, instead of sorting the ref_updates directly.
* In a moment the string_list will be used for another purpose, too.
* This removes the need for the custom comparison function
ref_update_compare().
* This means that we can carry out the updates in the order that the
user specified them instead of reordering them. This might be handy
someday if, we want to permit multiple updates to a single reference
as long as they are compatible with each other.
Note: we can't use string_list_remove_duplicates() to check for
duplicates, because we need to know the name of the reference that
appeared multiple times, to be used in the error message.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:10 +0000 (17:25 +0200)]
is_refname_available(): use dirname in first loop
In the first loop (over prefixes of refname), use dirname to keep
track of the current prefix. This is not an improvement in itself, but
in a moment we will start using dirname for a role where a
NUL-terminated string is needed.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:09 +0000 (17:25 +0200)]
struct nonmatching_ref_data: store a refname instead of a ref_entry
Now that we don't need a ref_entry to pass to
report_refname_conflict(), it is sufficient to store the refname of
the conflicting reference.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:08 +0000 (17:25 +0200)]
report_refname_conflict(): inline function
It wasn't pulling its weight. And we are about to need code similar to
this where no ref_entry is available and with more diverse error
messages. Rather than try to generalize the function, just inline it.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:07 +0000 (17:25 +0200)]
entry_matches(): inline function
It wasn't pulling its weight. And in a moment we will need similar
tests that take a refname rather than a ref_entry as parameter, which
would have made entry_matches() even less useful.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:06 +0000 (17:25 +0200)]
is_refname_available(): convert local variable "dirname" to strbuf
This change wouldn't be worth it by itself, but in a moment we will
use the strbuf for more string juggling.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:05 +0000 (17:25 +0200)]
is_refname_available(): avoid shadowing "dir" variable
The function had a "dir" parameter that was shadowed by a local "dir"
variable within a code block. Use the former in place of the latter.
(This is consistent with "dir"'s use elsewhere in the function.)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:04 +0000 (17:25 +0200)]
is_refname_available(): revamp the comments
Change the comments to a running example of running the function with
refname set to "refs/foo/bar". Add some more explanation of the logic.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Michael Haggerty [Mon, 11 May 2015 15:25:03 +0000 (17:25 +0200)]
t1404: new tests of ref D/F conflicts within transactions
Add some tests of reference D/F conflicts (by which I mean the fact
that references like "refs/foo" and "refs/foo/bar" are not allowed to
coexist) in the context of reference transactions.
The test of creating two conflicting references in the same
transaction fails, leaving the transaction half-completed. This will
be fixed later in this patch series.
Please note that the error messages emitted in the case of conflicts
are not very user-friendly. In particular, when the conflicts involve
loose references, then the errors are reported as
error: there are still refs under 'refs/foo'
fatal: Cannot lock the ref 'refs/foo'.
or
error: unable to resolve reference refs/foo/bar: Not a directory
fatal: Cannot lock the ref 'refs/foo/bar'.
This is because lock_ref_sha1_basic() fails while trying to lock the
new reference, before it even gets to the is_refname_available()
check. This situation will also be improved later in this patch
series.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Junio C Hamano [Thu, 30 Apr 2015 18:25:06 +0000 (11:25 -0700)]
Git 2.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Apr 2015 20:01:29 +0000 (13:01 -0700)]
Merge branch 'mh/multimail-renewal'
* mh/multimail-renewal:
Update git-multimail to version 1.0.2
Junio C Hamano [Tue, 28 Apr 2015 20:00:20 +0000 (13:00 -0700)]
Merge branch 'mg/show-notes-doc'
Documentation fix.
* mg/show-notes-doc:
rev-list-options.txt: complete sentence about notes matching
Junio C Hamano [Tue, 28 Apr 2015 20:00:19 +0000 (13:00 -0700)]
Merge branch 'nd/versioncmp-prereleases'
* nd/versioncmp-prereleases:
git tag: mention versionsort.prereleaseSuffix in manpage
Junio C Hamano [Tue, 28 Apr 2015 20:00:18 +0000 (13:00 -0700)]
Merge branch 'mg/status-v-v'
* mg/status-v-v:
status: document the -v/--verbose option
Michael Haggerty [Mon, 27 Apr 2015 11:17:25 +0000 (13:17 +0200)]
Update git-multimail to version 1.0.2
The only changes are to the README files, most notably the list of
maintainers and the project URL.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Apr 2015 19:26:21 +0000 (12:26 -0700)]
Sync with 2.3.7
Junio C Hamano [Mon, 27 Apr 2015 19:25:36 +0000 (12:25 -0700)]
Git 2.3.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Apr 2015 19:23:53 +0000 (12:23 -0700)]
Merge branch 'tb/connect-ipv6-parse-fix' into maint
An earlier update to the parser that disects a URL broke an
address, followed by a colon, followed by an empty string (instead
of the port number), e.g. ssh://example.com:/path/to/repo.
* tb/connect-ipv6-parse-fix:
connect.c: ignore extra colon after hostname
Junio C Hamano [Mon, 27 Apr 2015 19:23:51 +0000 (12:23 -0700)]
Merge branch 'ma/bash-completion-leaking-x' into maint
The completion script (in contrib/) contaminated global namespace
and clobbered on a shell variable $x.
* ma/bash-completion-leaking-x:
completion: fix global bash variable leak on __gitcompappend
Junio C Hamano [Mon, 27 Apr 2015 19:23:47 +0000 (12:23 -0700)]
Merge branch 'jc/push-cert' into maint
The "git push --signed" protocol extension did not limit what the
"nonce" that is a server-chosen string can contain or how long it
can be, which was unnecessarily lax. Limit both the length and the
alphabet to a reasonably small space that can still have enough
entropy.
* jc/push-cert:
push --signed: tighten what the receiving end can ask to sign
Michael Haggerty [Thu, 23 Apr 2015 12:27:46 +0000 (14:27 +0200)]
status: document the -v/--verbose option
Document `git status -v`, including its new doubled `-vv` form.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Thu, 23 Apr 2015 12:27:50 +0000 (14:27 +0200)]
RelNotes: wordsmithing
Make many textual tweaks to the 2.4.0 release notes.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Thu, 23 Apr 2015 12:27:49 +0000 (14:27 +0200)]
RelNotes: refer to the rebase -i "todo list", not "insn sheet"
"Todo list" is the name that is used in the user-facing documentation.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Thu, 23 Apr 2015 12:27:48 +0000 (14:27 +0200)]
RelNotes: correct name of versionsort.prereleaseSuffix
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Thu, 23 Apr 2015 12:27:47 +0000 (14:27 +0200)]
git tag: mention versionsort.prereleaseSuffix in manpage
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 22 Apr 2015 20:52:43 +0000 (13:52 -0700)]
Git 2.4.0-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Apr 2015 19:58:50 +0000 (12:58 -0700)]
Sync with maint
Junio C Hamano [Tue, 21 Apr 2015 19:17:09 +0000 (12:17 -0700)]
Git 2.3.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Apr 2015 19:12:25 +0000 (12:12 -0700)]
Merge branch 'jk/colors' into maint
"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle. It learned to pay attention to character boundaries
(assuming the UTF-8 payload).
* jk/colors:
diff-highlight: do not split multibyte characters
Junio C Hamano [Tue, 21 Apr 2015 19:12:24 +0000 (12:12 -0700)]
Merge branch 'jk/test-annoyances' into maint
Test fixes.
* jk/test-annoyances:
t5551: make EXPENSIVE test cheaper
t5541: move run_with_cmdline_limit to test-lib.sh
t: pass GIT_TRACE through Apache
t: redirect stderr GIT_TRACE to descriptor 4
t: translate SIGINT to an exit
Junio C Hamano [Tue, 21 Apr 2015 19:12:23 +0000 (12:12 -0700)]
Merge branch 'pt/enter-repo-comment-fix' into maint
Documentation update.
* pt/enter-repo-comment-fix:
enter_repo(): fix docs to match code
Junio C Hamano [Tue, 21 Apr 2015 19:12:22 +0000 (12:12 -0700)]
Merge branch 'jz/gitweb-conf-doc-fix' into maint
Documentation update.
* jz/gitweb-conf-doc-fix:
gitweb.conf.txt: say "build-time", not "built-time"
Junio C Hamano [Tue, 21 Apr 2015 19:12:21 +0000 (12:12 -0700)]
Merge branch 'jk/cherry-pick-docfix' into maint
* jk/cherry-pick-docfix:
cherry-pick: fix docs describing handling of empty commits
Junio C Hamano [Tue, 21 Apr 2015 19:12:20 +0000 (12:12 -0700)]
Merge branch 'iu/fix-parse-options-h-comment' into maint
* iu/fix-parse-options-h-comment:
parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval
Junio C Hamano [Tue, 21 Apr 2015 19:12:19 +0000 (12:12 -0700)]
Merge branch 'jg/cguide-we-cannot-count' into maint
* jg/cguide-we-cannot-count:
CodingGuidelines: update 'rough' rule count
Junio C Hamano [Tue, 21 Apr 2015 19:12:18 +0000 (12:12 -0700)]
Merge branch 'jk/pack-corruption-post-mortem' into maint
Documentation update.
* jk/pack-corruption-post-mortem:
howto: document more tools for recovery corruption
Junio C Hamano [Tue, 21 Apr 2015 19:12:17 +0000 (12:12 -0700)]
Merge branch 'jn/doc-fast-import-no-16-octopus-limit' into maint
Documentation update.
* jn/doc-fast-import-no-16-octopus-limit:
fast-import doc: remove suggested 16-parent limit
Junio C Hamano [Tue, 21 Apr 2015 18:09:19 +0000 (11:09 -0700)]
RelNotes: "merge --quiet" change has been reverted
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 20 Apr 2015 22:30:13 +0000 (15:30 -0700)]
Hopefully the last batch for 2.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 20 Apr 2015 22:28:34 +0000 (15:28 -0700)]
Merge branch 'ps/grep-help-all-callback-arg'
Code clean-up.
* ps/grep-help-all-callback-arg:
grep: correctly initialize help-all option
Junio C Hamano [Mon, 20 Apr 2015 22:28:33 +0000 (15:28 -0700)]
Merge branch 'tb/connect-ipv6-parse-fix'
An earlier update to the parser that disects an address broke an
address, followed by a colon, followed by an empty string (instead
of the port number).
* tb/connect-ipv6-parse-fix:
connect.c: ignore extra colon after hostname
Junio C Hamano [Mon, 20 Apr 2015 22:28:32 +0000 (15:28 -0700)]
Merge branch 'va/fix-git-p4-tests'
Test fixes for git-p4.
* va/fix-git-p4-tests:
t9814: guarantee only one source exists in git-p4 copy tests
git-p4: fix copy detection test
t9814: fix broken shell syntax in git-p4 rename test
Junio C Hamano [Mon, 20 Apr 2015 22:28:31 +0000 (15:28 -0700)]
Merge branch 'jc/push-cert'
The "git push --signed" protocol extension did not limit what the
"nonce" that is a server-chosen string can contain or how long it
can be, which was unnecessarily lax. Limit both the length and the
alphabet to a reasonably small space that can still have enough
entropy.
* jc/push-cert:
push --signed: tighten what the receiving end can ask to sign
Junio C Hamano [Mon, 20 Apr 2015 22:28:29 +0000 (15:28 -0700)]
Merge branch 'ma/bash-completion-leaking-x'
The completion script (in contrib/) contaminated global namespace
and clobbered on a shell variable $x.
* ma/bash-completion-leaking-x:
completion: fix global bash variable leak on __gitcompappend
Junio C Hamano [Sun, 19 Apr 2015 01:35:48 +0000 (18:35 -0700)]
Merge tag 'gitgui-0.20.0' of repo.or.cz/r/git-gui
git-gui 0.20.0
* tag 'gitgui-0.20.0' of http://repo.or.cz/r/git-gui:
git-gui: set version 0.20
git-gui: sv.po: Update Swedish translation (547t0f0u)
git-gui i18n: Updated Bulgarian translation (547t,0f,0u)
git-gui: Makes chooser set 'gitdir' to the resolved path
git-gui: Fixes chooser not accepting gitfiles
git-gui: reinstate support for Tcl 8.4
git-gui: fix problem with gui.maxfilesdisplayed
git-gui: fix verbose loading when git path contains spaces.
git-gui/gitk: Do not depend on Cygwin's "kill" command on Windows
git-gui: add configurable tab size to the diff view
git-gui: Make git-gui lib dir configurable at runime
git-gui i18n: Updated Bulgarian translation (520t,0f,0u)
L10n: vi.po (543t): Init translation for Vietnamese
git-gui: align the new recursive checkbox with the radiobuttons.
git-gui: Add a 'recursive' checkbox in the clone menu.
Pat Thoyts [Sat, 18 Apr 2015 11:15:32 +0000 (12:15 +0100)]
git-gui: set version 0.20
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Peter Krefting [Fri, 27 Mar 2015 09:25:32 +0000 (10:25 +0100)]
git-gui: sv.po: Update Swedish translation (547t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Alexander Shopov [Tue, 7 Apr 2015 15:29:46 +0000 (18:29 +0300)]
git-gui i18n: Updated Bulgarian translation (547t,0f,0u)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Michael J Gruber [Fri, 17 Apr 2015 14:28:56 +0000 (16:28 +0200)]
rev-list-options.txt: complete sentence about notes matching
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 16 Apr 2015 15:03:14 +0000 (08:03 -0700)]
Revert "merge: pass verbosity flag down to merge-recursive"
This reverts commit
2bf15a3330a26183adc8563dbeeacc11294b8a01, whose
intention was good, but the verbosity levels used in merge-recursive
turns out to be rather uneven. For example, a merge of two branches
with conflicting submodule updates used to report CONFLICT: output
with --quiet but no longer (which *is* desired), while the final
"Automatic merge failed; fix conflicts and then commit" message is
still shown even with --quiet (which *is* inconsistent).
Originally reported by Bryan Turner; it is too early to declare what
the concensus is, but it seems that we would need to level the
verbosity levels used in merge strategy backends before we can go
forward. In the meantime, we'd revert to the old behaviour until
that happens.
cf. $gmane/267245
Junio C Hamano [Tue, 14 Apr 2015 18:57:13 +0000 (11:57 -0700)]
Git 2.4.0-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 14 Apr 2015 18:49:13 +0000 (11:49 -0700)]
Merge branch 'jk/colors'
"diff-highlight" (in contrib/) used to show byte-by-byte
differences, which meant that multi-byte characters can be chopped
in the middle. It learned to pay attention to character boundaries
(assuming the UTF-8 payload).
* jk/colors:
diff-highlight: do not split multibyte characters
Junio C Hamano [Tue, 14 Apr 2015 18:49:12 +0000 (11:49 -0700)]
Merge branch 'jk/merge-quiet'
"git merge --quiet" did not squelch messages from the underlying
merge-recursive strategy.
* jk/merge-quiet:
merge: pass verbosity flag down to merge-recursive
Junio C Hamano [Tue, 14 Apr 2015 18:49:11 +0000 (11:49 -0700)]
Merge branch 'jk/pack-corruption-post-mortem'
Documentation update.
* jk/pack-corruption-post-mortem:
howto: document more tools for recovery corruption
Junio C Hamano [Tue, 14 Apr 2015 18:49:10 +0000 (11:49 -0700)]
Merge branch 'jc/update-instead-into-void'
A push into an unborn branch, with "receive.denyCurrentBranch" set
to "updateInstead", did not check out the working tree as expected.
* jc/update-instead-into-void:
push-to-deploy: allow pushing into an unborn branch and updating it
Junio C Hamano [Tue, 14 Apr 2015 18:49:09 +0000 (11:49 -0700)]
Merge branch 'sb/plug-streaming-leak'
* sb/plug-streaming-leak:
streaming.c: fix a memleak
Junio C Hamano [Tue, 14 Apr 2015 18:49:08 +0000 (11:49 -0700)]
Merge branch 'jn/doc-fast-import-no-16-octopus-limit'
Documentation update.
* jn/doc-fast-import-no-16-octopus-limit:
fast-import doc: remove suggested 16-parent limit
Junio C Hamano [Tue, 14 Apr 2015 18:49:07 +0000 (11:49 -0700)]
Merge branch 'sb/plug-wt-shortstatus-tracking-leak'
* sb/plug-wt-shortstatus-tracking-leak:
wt-status.c: fix a memleak
Junio C Hamano [Tue, 14 Apr 2015 17:34:05 +0000 (10:34 -0700)]
Merge branch 'pt/enter-repo-comment-fix'
* pt/enter-repo-comment-fix:
enter_repo(): fix docs to match code
Junio C Hamano [Tue, 14 Apr 2015 17:34:01 +0000 (10:34 -0700)]
Merge branch 'jz/gitweb-conf-doc-fix'
* jz/gitweb-conf-doc-fix:
gitweb.conf.txt: say "build-time", not "built-time"
Junio C Hamano [Tue, 14 Apr 2015 17:33:54 +0000 (10:33 -0700)]
Merge branch 'jk/cherry-pick-docfix'
* jk/cherry-pick-docfix:
cherry-pick: fix docs describing handling of empty commits
Junio C Hamano [Tue, 14 Apr 2015 17:33:45 +0000 (10:33 -0700)]
Merge branch 'iu/fix-parse-options-h-comment'
* iu/fix-parse-options-h-comment:
parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval
Junio C Hamano [Tue, 14 Apr 2015 16:55:29 +0000 (09:55 -0700)]
Merge branch 'jg/cguide-we-cannot-count'
* jg/cguide-we-cannot-count:
CodingGuidelines: update 'rough' rule count
Julian Gindi [Mon, 13 Apr 2015 12:54:14 +0000 (08:54 -0400)]
CodingGuidelines: update 'rough' rule count
Changed inaccurate count of "rough rules" from three to the more
generic 'a few'.
Signed-off-by: Julian Gindi <juliangindi@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt [Thu, 9 Apr 2015 19:59:06 +0000 (21:59 +0200)]
grep: correctly initialize help-all option
The "help-all" option is being initialized with a wrong value.
While being semantically wrong this can also cause a segmentation
fault in gcc on ARMv7 hardfloat platforms with a hardened
toolchain. Fix this by initializing with a NULL value.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Márcio Almada [Wed, 8 Apr 2015 05:45:58 +0000 (02:45 -0300)]
completion: fix global bash variable leak on __gitcompappend
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vitor Antunes [Sun, 5 Apr 2015 23:08:35 +0000 (00:08 +0100)]
t9814: guarantee only one source exists in git-p4 copy tests
By using a tree with multiple identical files and allowing copy detection to
choose any one of them, the check in the test is unnecessarily complex. We can
simplify by:
* Modify source file (file2) before copying the file.
* Check that only file2 is the source in the output of "p4 filelog".
* Remove all "case" statements and replace them with simple tests to check
that source is "file2".
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 9 Apr 2015 04:15:33 +0000 (21:15 -0700)]
Merge tag 'l10n-2.4.0-rnd2' of git://github.com/git-l10n/git-po
git l10n 2.4.0-rnd2
Torsten Bögershausen [Tue, 7 Apr 2015 20:03:25 +0000 (22:03 +0200)]
connect.c: ignore extra colon after hostname
Ignore an extra ':' at the end of the hostname in URL's like
"ssh://example.com:/path/to/repo"
The colon is meant to separate a port number from the hostname.
If the port is empty, the colon should be ignored, see RFC 3986.
It had been working for URLs with ssh:// scheme, but was unintentionally
broken in 86ceb3, "allow ssh://user@[2001:db8::1]/repo.git"
Reported-by: Reid Woodbury Jr. <reidw@rawsound.com>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Thu, 9 Apr 2015 00:21:39 +0000 (08:21 +0800)]
Merge branch 'master' of git://github.com/alexhenrie/git-po
* 'master' of git://github.com/alexhenrie/git-po:
l10n: ca.po: update translation
Jiang Xin [Thu, 9 Apr 2015 00:00:10 +0000 (08:00 +0800)]
l10n: TEAMS: Change repository URL of zh_CN
Repository URL of zh_CN l10n for Git has been changed over 2 years,
update po/TEAMS for it.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Alex Henrie [Wed, 8 Apr 2015 00:07:47 +0000 (18:07 -0600)]
l10n: ca.po: update translation
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Alexander Shopov [Tue, 7 Apr 2015 08:22:47 +0000 (11:22 +0300)]
l10n: Updated Bulgarian translation of git (2305t,0f,0u)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Peter Krefting [Tue, 7 Apr 2015 07:45:20 +0000 (08:45 +0100)]
l10n: sv.po: Update Swedish translation (2305t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Ralf Thielow [Sat, 4 Apr 2015 08:06:42 +0000 (10:06 +0200)]
l10n: de.po: translate one message
Translate one message came from git.pot update in
6eebb35
(l10n: git.pot: v2.4.0 round 2 (1 update)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Kyle J. McKay [Fri, 3 Apr 2015 22:15:14 +0000 (15:15 -0700)]
diff-highlight: do not split multibyte characters
When the input is UTF-8 and Perl is operating on bytes instead of
characters, a diff that changes one multibyte character to another
that shares an initial byte sequence will result in a broken diff
display as the common byte sequence prefix will be separated from
the rest of the bytes in the multibyte character.
For example, if a single line contains only the unicode character
U+C9C4 (encoded as UTF-8 0xEC, 0xA7, 0x84) and that line is then
changed to the unicode character U+C9C0 (encoded as UTF-8 0xEC,
0xA7, 0x80), when operating on bytes diff-highlight will show only
the single byte change from 0x84 to 0x80 thus creating invalid UTF-8
and a broken diff display.
Fix this by putting Perl into character mode when splitting the line
and then back into byte mode after the split is finished.
The utf8::xxx functions require Perl 5.8 so we require that as well.
Also, since we are mucking with code in the split_line function, we
change a '*' quantifier to a '+' quantifier when matching the $COLOR
expression which has the side effect of speeding everything up while
eliminating useless '' elements in the returned array.
Reported-by: Yi EungJun <semtlenori@gmail.com>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noel Avila [Sat, 4 Apr 2015 16:04:56 +0000 (18:04 +0200)]
l10n: fr.po v2.4.0 round 2
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Dimitriy Ryazantcev [Fri, 3 Apr 2015 13:30:14 +0000 (16:30 +0300)]
l10n: ru: updated Russian translation
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
Tran Ngoc Quan [Fri, 3 Apr 2015 01:54:35 +0000 (08:54 +0700)]
l10n: vi.po(2305t): Updated 1 new string
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jiang Xin [Fri, 3 Apr 2015 00:39:57 +0000 (08:39 +0800)]
l10n: zh_CN: for git v2.4.0 l10n round 2
Translate 1 update message (2305t0f0u) for git v2.4.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Fri, 3 Apr 2015 00:16:53 +0000 (08:16 +0800)]
l10n: git.pot: v2.4.0 round 2 (1 update)
Generate po/git.pot from v2.4.0-rc1 for git v2.4.0 l10n round 2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Fri, 3 Apr 2015 00:13:24 +0000 (08:13 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 'symbolic link' as 'symbolische Verknüpfung'
l10n: de.po: translate 99 new messages
l10n: de.po: fix messages with abbreviated hashs
l10n: de.po: add space before ellipsis
l10n: vi.po: Updated Vietnamese translation
l10n: zh_CN: translations for git v2.4.0-rc0
l10n: fr.po v2.4.0-rc0 round 1
l10n: ca.po: update translation
l10n: ru: updated Russian translation
l10n: sv.po: Update Swedish translation (2305t0f0u)
l10n: git.pot: v2.4.0 round 1 (99 new, 92 removed)
l10n: ru: added Russian translation
l10n: de.po: fix negation for commit -a with paths
Jeff King [Thu, 2 Apr 2015 21:39:52 +0000 (17:39 -0400)]
merge: pass verbosity flag down to merge-recursive
This makes "git merge --quiet" really quiet when we call
into merge-recursive.
Note that we can't just pass our flag down as-is; the two
parts of the code use different scales. We center at "0" as
normal for git-merge (with "--quiet" giving a negative
value), but merge-recursive uses "2" as its center. This
patch passes a negative value to merge-recursive rather than
"1", though, as otherwise the user would have to use "-qqq"
to squelch all messages (but the downside is that the user
cannot distinguish between levels 0-2 if without resorting
to the GIT_MERGE_VERBOSITY variable).
We may want to review and renormalize the message severities
in merge-recursive, but that does not have to happen now.
This is at least in improvement in the sense that we are
respecting "--quiet" at all.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 2 Apr 2015 19:46:06 +0000 (12:46 -0700)]
Git 2.4.0-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 2 Apr 2015 19:34:43 +0000 (12:34 -0700)]
Merge branch 'sb/atomic-push'
* sb/atomic-push:
send-pack: unify error messages for unsupported capabilities
Junio C Hamano [Thu, 2 Apr 2015 01:00:36 +0000 (18:00 -0700)]
push --signed: tighten what the receiving end can ask to sign
Instead of blindly trusting the receiving side to give us a sensible
nonce to sign, limit the length (max 256 bytes) and the alphabet
(alnum and a few selected punctuations, enough to encode in base64)
that can be used in nonce.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Thu, 2 Apr 2015 17:28:48 +0000 (19:28 +0200)]
send-pack: unify error messages for unsupported capabilities
If --signed is not supported, the error message names the remote
"receiving end". If --atomic is not supported, the error message
names the remote "server". Unify the naming to "receiving end"
as we're in the context of "push".
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthias Rüster [Sun, 29 Mar 2015 01:46:32 +0000 (03:46 +0200)]
l10n: de.po: translate 'symbolic link' as 'symbolische Verknüpfung'
The use of 'symbolische Verknüpfung' for 'symbolic link' is more common
than 'symbolischer Verweis'.
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Ralf Thielow [Fri, 27 Mar 2015 15:58:26 +0000 (16:58 +0100)]
l10n: de.po: translate 99 new messages
Translate 99 messages came from git.pot update in
c2ea120
(l10n: git.pot: v2.4.0 round 1 (99 new, 92 removed)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Ralf Thielow [Tue, 24 Mar 2015 18:37:47 +0000 (19:37 +0100)]
l10n: de.po: fix messages with abbreviated hashs
The three dots in messages where the hash is abbreviated
were misinterpreted and are fixed with this commit.
Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Phillip Sz [Sat, 21 Mar 2015 12:52:37 +0000 (13:52 +0100)]
l10n: de.po: add space before ellipsis
Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Jeff King [Wed, 1 Apr 2015 21:08:56 +0000 (17:08 -0400)]
howto: document more tools for recovery corruption
Long ago, I documented a corruption recovery I did and gave
some C code that I used to help find a flipped bit. I had
to fix a similar case recently, and I ended up writing a few
more tools. I hope nobody ever has to use these, but it
does not hurt to share them, just in case.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 1 Apr 2015 06:15:45 +0000 (23:15 -0700)]
push-to-deploy: allow pushing into an unborn branch and updating it
Setting receive.denycurrentbranch to updateinstead and pushing into
the current branch, when the working tree and the index is truly
clean, is supposed to reset the working tree and the index to match
the tree of the pushed commit. This did not work when pushing into
an unborn branch.
The code that drives push-to-checkout hook needs no change, as the
interface is defined so that hook can decide what to do when the
push is coming to an unborn branch and take an appropriate action
since the beginning.
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Tue, 31 Mar 2015 23:18:07 +0000 (16:18 -0700)]
fast-import doc: remove suggested 16-parent limit
Merges with an absurd number of parents are still a bad idea because
they do not render well in tools like gitk, but if they are present
in the repository being imported into git then there's no need to
avoid reproducing them faithfully.
In olden times, before v1.6.0-rc0~194 (2008-06-27), git commit-tree
and higher-level tools built on top of it were limited to writing 16
parents for a commit. Nowadays normal git operations are happy to
write more parents when asked, so the motivation for this note in the
fast-import documentation is gone and we can remove it.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>