* [RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects
From: Jonathan Nieder @ 2013-02-22 23:01 UTC (permalink / raw)
To: Mantas Mikulėnas; +Cc: git, Nguyễn Thái Ngọc Duy
In-Reply-To: <kg8ri2$vjb$1@ger.gmane.org>
When using "hash-object -w" to create non-blob objects, it is
generally a good policy to run "git fsck" afterward to make sure the
resulting object is valid. Add a warning to the manpage.
While it at, gently nudge the user of "hash-object -w" toward
higher-level interfaces for creating or modifying trees, commits, and
tags.
Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hi Mantas,
Mantas Mikulėnas wrote:
> When messing around with various repositories, I noticed that git 1.8
> (currently using 1.8.2.rc0.22.gb3600c3) has problems parsing tag objects
> that have invalid timestamps.
[...]
> Git doesn't handle the resulting tag objects nicely at all. For example,
> running `git cat-file -p` on the new object outputs a really odd
> timestamp "Thu Jun Thu Jan 1 00:16:09 1970 +0016" (I'm guessing it
> parses the year as Unix time),
The usual rule is that with invalid objects (e.g. as detected by "git
fsck"), any non-crash result is acceptable. Garbage in, garbage out.
> and `git show` outright crashes
> (backtrace included below.)
Probably worth fixing.
I notice that git-hash-object(1) doesn't contain any reference to
git-fsck(1). How about something like this, to start?
Perhaps by default hash-object should automatically fsck the objects
it is asked to create.
Thanks,
Jonathan
Documentation/git-hash-object.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
index 02c1f12..8ed8c6e 100644
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -30,6 +30,8 @@ OPTIONS
-w::
Actually write the object into the object database.
+ This does not check that the resulting object is valid;
+ for that, see linkgit:git-fsck[1].
--stdin::
Read the object from standard input instead of from a file.
@@ -53,6 +55,14 @@ OPTIONS
conversion. If the file is read from standard input then this
is always implied, unless the --path option is given.
+SEE ALSO
+--------
+linkgit:git-mktree[1],
+linkgit:git-commit-tree[1],
+linkgit:git-tag[1],
+linkgit:git-filter-branch[1],
+sha1sum(1)
+
GIT
---
Part of the linkgit:git[1] suite
--
1.8.1.4
^ permalink raw reply related
* Re: Crashes while trying to show tag objects with bad timestamps
From: Jeff King @ 2013-02-22 23:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Mantas Mikulėnas, git
In-Reply-To: <7vy5egark3.fsf@alter.siamese.dyndns.org>
On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote:
> > I guess we should probably issue a warning, too. Also disappointingly,
> > git-fsck does not seem to detect this breakage at all.
>
> Yes for the warning,
Unfortunately, a good warning is harder than I had hoped. At the point
where we notice the problem, pp_user_info, we have very little context.
We can say only something like:
warning: malformed date in ident 'Jeff King <peff@peff.net> BOGUS'
but we cannot say in which object, or even that it was a "tagger" line
(and in some cases we do not even have an object, as in
make_cover_letter).
> and no for disappointing. IIRC, in the very early implementations
> allowed tag object without dates.
>
> I _think_ we can start tightening fsck, though.
Then I think it would make sense to allow the very specific no-date tag,
but not allow arbitrary crud. I wonder if there's an example in the
kernel or in git.git.
I also took a look at parsing routine of "cat-file -p". It's totally
hand-rolled, separate from what "git show" does, and is not build on the
pretty-print code at all. I wonder, though, if it actually makes sense
to munge the date there. The commit-object pretty-printer for cat-file
just shows the object intact. It seems weirdly inconsistent that we
would munge tags just to rewrite the date. If you want a real
pretty-printer, you should be using porcelain like "show".
It would be a regression, of course, for people relying on "cat-file -p"
to have consistent output. But I am very tempted to call it a bug, and
tempted to call "cat-file -p" inside a script a bad thing (you cannot,
after all, tell what object type you have; you should figure out the
type you expect and then use "cat-file <type> <obj>" to make sure you
get the right one).
-Peff
^ permalink raw reply
* Re: [RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects
From: Junio C Hamano @ 2013-02-22 23:07 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Mantas Mikulėnas, git, Nguyễn Thái Ngọc Duy
In-Reply-To: <20130222230132.GB4514@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
> Perhaps by default hash-object should automatically fsck the objects
> it is asked to create.
Yes, and let the experimentors to override when they are trying to
invent a new object type, finished a reader but not a writer (that
is why they are exprimenting with hash-object) nor updated fsck,
with an explicit command line option to "hash-objects".
Then we do not have to say "-w by default can create an invalid
object" in its documentation. In a sense, allowing to create any
garbage (by the definition of then-current fsck and the rest of the
Git) is the raison d'etre of the command.
Thanks.
^ permalink raw reply
* Re: [RFC/PATCH] hash-object doc: "git hash-object -w" can write invalid objects
From: Jeff King @ 2013-02-22 23:09 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Mantas Mikulėnas, git, Nguyễn Thái Ngọc Duy
In-Reply-To: <20130222230132.GB4514@google.com>
On Fri, Feb 22, 2013 at 03:01:32PM -0800, Jonathan Nieder wrote:
> > Git doesn't handle the resulting tag objects nicely at all. For example,
> > running `git cat-file -p` on the new object outputs a really odd
> > timestamp "Thu Jun Thu Jan 1 00:16:09 1970 +0016" (I'm guessing it
> > parses the year as Unix time),
>
> The usual rule is that with invalid objects (e.g. as detected by "git
> fsck"), any non-crash result is acceptable. Garbage in, garbage out.
Agreed, though I think a more consistent garbage would be good (e.g.,
time=0, tz=0).
> I notice that git-hash-object(1) doesn't contain any reference to
> git-fsck(1). How about something like this, to start?
I think it's a good change. Though note that this problem is not
discovered by fsck (which I think we should also change).
> Perhaps by default hash-object should automatically fsck the objects
> it is asked to create.
Not unreasonable. In this case, we also have git-mktag. It would be nice
if we could simply run the input through a type-specific sanity checker
(optional, I hope; I use hash-object often to craft test cases like this
:) ). The same need came up a month or two ago in a discussion of how to
use "git replace" safely. But I guess fsck after-the-fact is just
another form of the same solution.
-Peff
^ permalink raw reply
* [PATCH] t7502: perform commits using alternate editor in a subshell
From: Brandon Casey @ 2013-02-22 23:13 UTC (permalink / raw)
To: gitster; +Cc: git, ralf.thielow, Brandon Casey
From: Brandon Casey <drafnel@gmail.com>
These tests call test_set_editor to set an alternate editor script, but
they appear to presume that the assignment is of a temporary nature and
will not have any effect outside of each individual test. That is not
the case. All of the test functions within a test script share a single
environment, so any variables modified in one, are visible in the ones
that follow.
So, let's protect the test functions that follow these, which set an
alternate editor, by performing the test_set_editor and 'git commit'
in a subshell.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
Before "git-commit: populate the edit buffer with 2 blank lines before s-o-b"
is merged, this is needed on top of rt/commit-cleanup-config 51fb3a3d so that
the default EDITOR remains in effect for the new test.
-Brandon
t/t7502-commit.sh | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index b1c7648..520a5cd 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -255,32 +255,40 @@ test_expect_success 'cleanup commit message (fail on invalid cleanup mode config
test_expect_success 'cleanup commit message (no config and no option uses default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git commit --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git commit --no-status
+ ) &&
commit_msg_is "commit message"
'
test_expect_success 'cleanup commit message (option overrides default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git commit --cleanup=whitespace --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git commit --cleanup=whitespace --no-status
+ ) &&
commit_msg_is "commit message # comment"
'
test_expect_success 'cleanup commit message (config overrides default)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git -c commit.cleanup=whitespace commit --no-status &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git -c commit.cleanup=whitespace commit --no-status
+ ) &&
commit_msg_is "commit message # comment"
'
test_expect_success 'cleanup commit message (option overrides config)' '
echo content >>file &&
git add file &&
- test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
- git -c commit.cleanup=whitespace commit --cleanup=default &&
+ (
+ test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
+ git -c commit.cleanup=whitespace commit --cleanup=default
+ ) &&
commit_msg_is "commit message"
'
--
1.8.1.3.566.gaa39828
^ permalink raw reply related
* Re: Crashes while trying to show tag objects with bad timestamps
From: Mantas Mikulėnas @ 2013-02-22 23:14 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git
In-Reply-To: <20130222230418.GC21579@sigill.intra.peff.net>
On Sat, Feb 23, 2013 at 1:04 AM, Jeff King <peff@peff.net> wrote:
> On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote:
>> and no for disappointing. IIRC, in the very early implementations
>> allowed tag object without dates.
>>
>> I _think_ we can start tightening fsck, though.
>
> Then I think it would make sense to allow the very specific no-date tag,
> but not allow arbitrary crud. I wonder if there's an example in the
> kernel or in git.git.
I couldn't find any such examples. However, I did find several tags
with no "tagger" line at all: git.git has "v0.99" and linux.git has
many such tags starting with "v2.6.11" ending with "v2.6.13-rc3".
It seems that `git cat-file -p` doesn't like such tags too – if there
is no "tagger", it doesn't display *any* header lines. More bugs?
--
Mantas Mikulėnas
^ permalink raw reply
* Re: Crashes while trying to show tag objects with bad timestamps
From: Junio C Hamano @ 2013-02-22 23:20 UTC (permalink / raw)
To: Jeff King; +Cc: Mantas Mikulėnas, git
In-Reply-To: <20130222230418.GC21579@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> On Fri, Feb 22, 2013 at 02:53:48PM -0800, Junio C Hamano wrote:
>
>> > I guess we should probably issue a warning, too. Also disappointingly,
>> > git-fsck does not seem to detect this breakage at all.
>>
>> Yes for the warning,
>
> Unfortunately, a good warning is harder than I had hoped. At the point
> where we notice the problem, pp_user_info, we have very little context.
> We can say only something like:
>
> warning: malformed date in ident 'Jeff King <peff@peff.net> BOGUS'
>
> but we cannot say in which object, or even that it was a "tagger" line
> (and in some cases we do not even have an object, as in
> make_cover_letter).
As pp_user_info() is called from very few places, I do not think it
is unreasonable to add an output parameter (i.e. "unsigned *") to
let the caller know that we made a best guess given malformed input
and handle the error in the caller. The make_cover_letter() caller
may look like:
pp_user_info(&pp, NULL, &sb, committer, encoding, &errors);
if (errors & PP_CORRUPT_DATE)
warning("unparsable datestamp in '%s'", committer);
although it is unlikely to see this error in practice, given that
committer is coming from git_committer_info(0) and would have the
current timestamp.
> I also took a look at parsing routine of "cat-file -p". It's totally
> hand-rolled, separate from what "git show" does, and is not build on the
> pretty-print code at all. I wonder, though, if it actually makes sense
> to munge the date there. The commit-object pretty-printer for cat-file
> just shows the object intact. It seems weirdly inconsistent that we
> would munge tags just to rewrite the date. If you want a real
> pretty-printer, you should be using porcelain like "show".
The whole "cat-file -p" is a historical wart, aka poor-man's
"show". I do not even consider it a part of the plumbing. It is a
fair game for Porcelainisque improvement ;-)
^ permalink raw reply
* Re: [PATCH] t7502: perform commits using alternate editor in a subshell
From: Junio C Hamano @ 2013-02-22 23:24 UTC (permalink / raw)
To: Brandon Casey; +Cc: git, ralf.thielow, Brandon Casey
In-Reply-To: <1361574780-30067-1-git-send-email-bcasey@nvidia.com>
Brandon Casey <bcasey@nvidia.com> writes:
> From: Brandon Casey <drafnel@gmail.com>
>
> These tests call test_set_editor to set an alternate editor script, but
> they appear to presume that the assignment is of a temporary nature and
> will not have any effect outside of each individual test. That is not
> the case. All of the test functions within a test script share a single
> environment, so any variables modified in one, are visible in the ones
> that follow.
>
> So, let's protect the test functions that follow these, which set an
> alternate editor, by performing the test_set_editor and 'git commit'
> in a subshell.
>
> Signed-off-by: Brandon Casey <drafnel@gmail.com>
> ---
>
>
> Before "git-commit: populate the edit buffer with 2 blank lines before s-o-b"
> is merged, this is needed on top of rt/commit-cleanup-config 51fb3a3d so that
> the default EDITOR remains in effect for the new test.
Yeah, what I already pushed out forces EDITOR=: for your test for
the same effect, but this patch clearly takes us in the right (and
better) direction.
>
> -Brandon
>
>
> t/t7502-commit.sh | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
> index b1c7648..520a5cd 100755
> --- a/t/t7502-commit.sh
> +++ b/t/t7502-commit.sh
> @@ -255,32 +255,40 @@ test_expect_success 'cleanup commit message (fail on invalid cleanup mode config
> test_expect_success 'cleanup commit message (no config and no option uses default)' '
> echo content >>file &&
> git add file &&
> - test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> - git commit --no-status &&
> + (
> + test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> + git commit --no-status
> + ) &&
> commit_msg_is "commit message"
> '
>
> test_expect_success 'cleanup commit message (option overrides default)' '
> echo content >>file &&
> git add file &&
> - test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> - git commit --cleanup=whitespace --no-status &&
> + (
> + test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> + git commit --cleanup=whitespace --no-status
> + ) &&
> commit_msg_is "commit message # comment"
> '
>
> test_expect_success 'cleanup commit message (config overrides default)' '
> echo content >>file &&
> git add file &&
> - test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> - git -c commit.cleanup=whitespace commit --no-status &&
> + (
> + test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> + git -c commit.cleanup=whitespace commit --no-status
> + ) &&
> commit_msg_is "commit message # comment"
> '
>
> test_expect_success 'cleanup commit message (option overrides config)' '
> echo content >>file &&
> git add file &&
> - test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> - git -c commit.cleanup=whitespace commit --cleanup=default &&
> + (
> + test_set_editor "$TEST_DIRECTORY"/t7500/add-content-and-comment &&
> + git -c commit.cleanup=whitespace commit --cleanup=default
> + ) &&
> commit_msg_is "commit message"
> '
^ permalink raw reply
* What will be in 1.8.2-rc1
From: Junio C Hamano @ 2013-02-22 23:35 UTC (permalink / raw)
To: git
In-Reply-To: <7vd2vttfs9.fsf@alter.siamese.dyndns.org>
Just a quick update.
I am planning to merge the following to 'master':
* regression fixes and finishing touches to a new feature
ct/autoconf-htmldir
jn/less-reconfigure
as/check-ignore
* documentation updates
wk/man-deny-current-branch-is-default-these-days
wk/user-manual
I'd also want to have this before the final as a regression fix. I
haven't decided if I should do so before -rc1:
mh/maint-ceil-absolute
Thanks.
^ permalink raw reply
* [RFD] subtree status - comparing subtree with a remote
From: Paul Campbell @ 2013-02-23 0:19 UTC (permalink / raw)
To: git
Cc: Jonathan Nieder, Adam Tkac, David A. Greene, Jesper L. Nielsen,
Michael Schubert, Techlive Zheng
Hi,
I'm looking at adding a "git subtree status" command that will tell if
a subtree is up-to-date, ahead of, behind, divergant with or unrelated
to a remote repo.
I just wanted to check that I'm working this out correctly before
writing the code.
1) perform a synthetic subtree split
mine=$(git subtree split --prefix=subtree/path)
This outputs the SHA1 for this subtree in isolation to the superproject.
2) fetch latest branch HEAD from remote repository we're comparing with
git fetch $repo $branch
theirs=$(git rev-parse FETCH_HEAD)
3) Find common ancestor
base=$(git merge-base $mine $theirs)
Where:
* $base == $mine && $base == $theirs : up-to-date
* $base == $mine && $base != $theirs : behind remote - can pull
* $base != $mine && $base == $theirs : ahead of remote - can push
* $base != $mine && $base != $theirs : divergent
* $base == null : no common ancestor - wrong repo?
Comments?
--
Paul [W] Campbell
^ permalink raw reply
* git checkout problem
From: J.V. @ 2013-02-23 0:30 UTC (permalink / raw)
To: git@vger.kernel.org
I was on my master branch, I checked out a branch (origin/somebranch),
did nothing, made no updates
but did a few git pulls over about a week; made a small change to one
file & comitted & pushed.
Now am trying to go back to my master branch and get:
error: The following untracked working tree files would be overwritten
by checkout:
lib/derbyclient.jar
Please move or remove them before you can switch branches.
Aborting
I did not put that file there, how do I get back to my master branch? I
do not want to muck up
the branch that I am now one. Obviously someone put derbyclient.jar
there, not sure, but it is
supposed to be there so do not want to remove.
any ideas?
^ permalink raw reply
* Re: Suggested improvements to the git-p4 documentation (branch-related)
From: Junio C Hamano @ 2013-02-23 0:42 UTC (permalink / raw)
To: Pete Wyckoff, Olivier Delalleau; +Cc: git
In-Reply-To: <CAFXk4bp0MBNxOD7w1zn7peN-ufWmV=DthMdHmjmj+Sci4MGneg@mail.gmail.com>
Olivier Delalleau <shish@keba.be> writes:
> 2013/1/5 Pete Wyckoff <pw@padd.com>:
>> shish@keba.be wrote on Thu, 03 Jan 2013 15:58 -0500:
> ...
>> Please do feel welcome to to rearrange or expand the
>> documentation so it makes more sense, if you are so inspired.
>
> I'm afraid I'm not familiar enough with git documentation to dig into
> it myself, but anyway that's about what I had for now. I'll send more
> comments to the mailing list if I have more suggestions in the future.
>
> Thanks for a great tool! :)
Did anything come out of this thread? If neither of you two are
inclined to conclude the discussion with a final patch, I'd
appreciate anybody else who does the honors ;-)
We'll be in deep pre-release freeze for a few weeks, so there is no
need to rush.
Thanks.
^ permalink raw reply
* [PATCH 3/2] update-index: list supported idx versions and their features
From: Nguyễn Thái Ngọc Duy @ 2013-02-23 1:54 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy
In-Reply-To: <1361534964-4232-2-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
.. and the user should know (briefly) the differences between index
versions too.
Documentation/git-update-index.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 77a912d..e5aaba5 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -145,7 +145,15 @@ you will need to handle the situation manually.
--index-version <n>::
Write the resulting index out in the named on-disk format version.
- The current default version is 2.
+ Supported versions are 2, 3 and 4. The current default version is 2
+ or 3, depending on whether extra features are used, such as
+ `git add -N`.
++
+ Version 4 performs a simple pathname compression that could
+ reduce index size by 30%-50% on large repositories, which
+ results in faster load time. Version 4 is relatively young
+ (first released in 1.8.0 in October 2012). Other Git
+ implementations may not support it yet.
-z::
Only meaningful with `--stdin` or `--index-info`; paths are
--
1.8.1.2.536.gf441e6d
^ permalink raw reply related
* [PATCH v2 3/2] update-index: list supported idx versions and their features
From: Nguyễn Thái Ngọc Duy @ 2013-02-23 2:29 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy
In-Reply-To: <1361534964-4232-2-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Oops, bogus indentation in the first 3/2
Documentation/git-update-index.txt | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 77a912d..dbb75f4 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -145,7 +145,14 @@ you will need to handle the situation manually.
--index-version <n>::
Write the resulting index out in the named on-disk format version.
- The current default version is 2.
+ Supported versions are 2, 3 and 4. The current default version is 2
+ or 3, depending on whether extra features are used, such as
+ `git add -N`.
++
+Version 4 performs a simple pathname compression that could reduce
+index size by 30%-50% on large repositories, which results in faster
+load time. Version 4 is relatively young (first released in in 1.8.0
+in October 2012). Other Git implementations may not support it yet.
-z::
Only meaningful with `--stdin` or `--index-info`; paths are
--
1.8.1.2.536.gf441e6d
^ permalink raw reply related
* Re: [PATCH] add: allow users to silence Git 2.0 warnings about "add -u"
From: David Aguilar @ 2013-02-23 7:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Matthieu Moy, git, Jeff King, Jakub Narębski
In-Reply-To: <7v621ks1cf.fsf@alter.siamese.dyndns.org>
On Fri, Feb 22, 2013 at 9:30 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Yes, but push.default is really different: there is a config variable,
>> and we want the behavior to be configurable. In the case of "git add",
>> I don't think adding a configuration option would be the right thing.
>> That would mean typing "git add -u" on an account which isn't yours will
>> be unpredictable *forever*.
>
> Exactly.
I completely agree. We don't want that [1].
I'm actually a big enemy of configuration, don't get me wrong.
The real point of the patch I sent was to start a conversation
about the thing I actually care about:
After reading the draft release notes I now realize that
"git add -u" will not die() in Git 2.0. It will operate on the
full tree, as described in the note. Sweet.
I was originally concerned that "git add -u" was going to die()
and we would no longer be able to use it without pathspec.
My concerns were unfounded.
(If I am not understanding this correctly then it is a sign
that the draft release notes can be made more clear)
> Another problem with use2dot0 configuration is that it would invite
> people to imagine that setting it to false will keep the old
> behaviour forever, which is against what you set out to do with the
> patch under discussion.
I agree with both sides. There's the part of me that wants the 2.0
behavior now with a config switch for the same reasons as was
discussed earlier:
http://thread.gmane.org/gmane.comp.version-control.git/166223/focus=168238
In addition, mindful users would see one less warning,
which is the only weight I've added to that side of the discussion.
We would never want to go back to the old behavior when 2.0
roll around. Jakub's "future.wholeTree" suggestion makes
sense in that context as the entire "future.*" namespace
could be designated as variables with these semantics.
One downside is that adding such a configuration is just more
temporary code to maintain and rip out when 2.0 rolls around.
OTOH a positive thing about adding configuration to get
the better behavior is that the code path materializes
sooner, and it will be better exercised before 2.0. This
increases confidence that removing the false side of the
imaginary "future.fullTree" configuration will be harmless.
In the original-original thread Matthieu and I seemed to
agree that configuration to get the new behavior
(but not get the old behavior) would be nice. Peff went
even farther and suggested that having a way to keep
the old behavior would be good, and I agree that this is
the thing [1] to avoid since it makes the command forever
unpredictable.
"future.*" means the ambiguous/unpredictable behavior
does eventually go away.
It's a flag day, there's no way around that.
Script writers will be hurt, there is no escaping that.
I guess the real question is whether it's a flag day that
happens through availability of configuration, or by the
inevitability of 2.0.
I have one scenario where "future.fullTree" would be
helpful to script writers: it would allow them to
test their scripts with the new behavior and back it out
if their scripts break. This gives them more time to
make the tiny change needed to be portable across
different git versions, which helps make the later
default change into much less of an event.
Having such a configuration would probably mean that
git should probably warn for all pathless "git add -u",
even from the root. It will help usher users towards
the new behavior. The current behavior makes the
most sense since we do not have a config variable.
The current behavior is certainly the simplest.
I don't know what we can do about the clueless user on
stackoverflow that follows the first suggestion to
set the future.fullTree variable. My gut feeling is
that optimizing for them is a lost cause.
Providing a way for mindful users to ease themselves
into the new behavior does help them, and git is
certainly the tool of choice for the mindful user. ;-)
I hope I haven't misrepresented anybody's opinions.
If I'm the only one who thinks that "future.fullTree"
is a good idea then I have no problem with the current
behavior since the noisy warning will be gone in 2.0.
Does anyone else have any weight to add to either side?
--
David
^ permalink raw reply
* Re: git checkout problem
From: Andreas Schwab @ 2013-02-23 8:19 UTC (permalink / raw)
To: J.V.; +Cc: git@vger.kernel.org
In-Reply-To: <51280DA5.800@gmail.com>
"J.V." <jvsrvcs@gmail.com> writes:
> Now am trying to go back to my master branch and get:
>
> error: The following untracked working tree files would be overwritten by
> checkout:
> lib/derbyclient.jar
> Please move or remove them before you can switch branches.
> Aborting
When in doubt, try running "git status". What does it say?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: [PATCH] add: allow users to silence Git 2.0 warnings about "add -u"
From: Junio C Hamano @ 2013-02-23 8:44 UTC (permalink / raw)
To: David Aguilar; +Cc: Matthieu Moy, git, Jeff King, Jakub Narębski
In-Reply-To: <CAJDDKr7F-wunjT_SS0mw+WUgoM3-Lu9bA3JUKk4sQiWWK0N9Jw@mail.gmail.com>
David Aguilar <davvid@gmail.com> writes:
> I was originally concerned that "git add -u" was going to die()
> and we would no longer be able to use it without pathspec.
> My concerns were unfounded.
>
> (If I am not understanding this correctly then it is a sign
> that the draft release notes can be made more clear)
Yes, that is exactly why I asked you to suggest improvements to that
paragraph.
>> Another problem with use2dot0 configuration is that it would invite
>> people to imagine that setting it to false will keep the old
>> behaviour forever, which is against what you set out to do with the
>> patch under discussion.
>
> I agree with both sides. There's the part of me that wants the 2.0
> behavior now with a config switch for the same reasons as was
> discussed earlier...
If that is really the case and you want the full-tree behaviour, you
would have been using "git add -u :/" already, and then you wouldn't
have seen the warning.
Why do we have this thread then?
The reason may well be "I've heard about the :/ magic pathspec, and
I thought I understood what it does at the intellectual level, but
it has not sunk in enough for me to use it regularly".
The warning, and "you can squelch with either :/ or ." to train the
fingers (not "set once and forget"), is exactly to solve that
problem now *and* *in* *the* *future* during the 2.0 transition
period.
You also said that it often is the case for you that you stay in a
narrow subtree without touching other parts of the tree. If that is
the case, you may *not* want 2.0 behaviour, which forces Git to run
around the whole tree, trying to find modified paths outside of your
corner that do not exist, wasting cycles. You want "git add .", and
you are better off starting to train your fingers so that they type
that without thinking now. I think the conclusion during the old
discussion was not "we want configuration", but "this is not per
user and configuration is a poor approach. Depending on what you are
working on right now, you would want 'only here' sometimes and
'whole tree' some other times".
> We would never want to go back to the old behavior when 2.0
> roll around. Jakub's "future.wholeTree" suggestion makes
> sense in that context as the entire "future.*" namespace
> could be designated as variables with these semantics.
Not at all. Even you who visit this list often do not regularly use
the ":/" to affect the whole tree and see the warning. What do you
imagine other people, who do not even know about this list do and
say, at sites like stackoverflow where uninformeds guide other
uninformeds?
Q. Help, Git 1.8.2 is giving me this warning. What to do?
A. Set this configuration variable. No other explanation.
Renaming use2dot0 to future does not solve anything.
> OTOH a positive thing about adding configuration to get
> the better behavior is that the code path materializes
> sooner, and it will be better exercised before 2.0.
That is not an argument for adding temporary configuration, as it is
not the only or even the best way to do so. It can be easily an
cleanly achieved by cooking in next until 2.0.
An ulterior motive for going that way is to encourage more people to
run 'next' ;-). Recently we are seeing bugs discovered only after topics
graduate to 'master', which is not a good sign X-<.
^ permalink raw reply
* [PATCH v3] branch: segfault fixes and validation
From: Nguyễn Thái Ngọc Duy @ 2013-02-23 12:22 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Per Cederqvist,
Nguyễn Thái Ngọc Duy
In-Reply-To: <7vvc9kccwa.fsf@alter.siamese.dyndns.org>
branch_get() can return NULL (so far on detached HEAD only) but some
code paths in builtin/branch.c cannot deal with that and cause
segfaults.
While at there, make sure to bail out when the user gives 2 or more
branches with --set-upstream-to or --unset-upstream, where only the
first branch is processed and the rest silently dropped.
Reported-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
On Sat, Feb 23, 2013 at 3:27 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Instead of asking "Is it detached?", perhaps we can say something
> like "You told me to set the upstream of HEAD to branch X, but " in
> front? At least, that will be a better explanation for the reason
> why the operation is failing.
Fixed.
> What you can do is to have a single helper function that can explain
> why branch_get() returned NULL (or extend branch_get() to serve that
> purpose as well); then you do not have to duplicate the logic twice
> on the caller's side (and there may be other callers that want to do
> the same).
The explanation mentions about the failed operation, which makes a
helper less useful. We could still do the helper, but it may lead to
i18n legos. So no helper in this version.
> The existing test might be wrong, by the way. Your HEAD may point
> at a branch Y but you may not have any commit on it yet, and you may
> want to allow setting the upstream of that to-be-born branch to
> another branch X with "branch --set-upstream-to=X [Y|HEAD]".
It sounds complicated. I think we can revisit it when a user actually
complains about it.
builtin/branch.c | 27 +++++++++++++++++++++++++++
t/t3200-branch.sh | 21 +++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/builtin/branch.c b/builtin/branch.c
index 6371bf9..00d17d2 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -889,6 +889,17 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
} else if (new_upstream) {
struct branch *branch = branch_get(argv[0]);
+ if (argc > 1)
+ die(_("too many branches to set new upstream"));
+
+ if (!branch) {
+ if (!argc || !strcmp(argv[0], "HEAD"))
+ die(_("could not set upstream of HEAD to %s when "
+ "it does not point to any branch."),
+ new_upstream);
+ die(_("no such branch '%s'"), argv[0]);
+ }
+
if (!ref_exists(branch->refname))
die(_("branch '%s' does not exist"), branch->name);
@@ -901,6 +912,16 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
struct branch *branch = branch_get(argv[0]);
struct strbuf buf = STRBUF_INIT;
+ if (argc > 1)
+ die(_("too many branches to unset upstream"));
+
+ if (!branch) {
+ if (!argc || !strcmp(argv[0], "HEAD"))
+ die(_("could not unset upstream of HEAD when "
+ "it does not point to any branch."));
+ die(_("no such branch '%s'"), argv[0]);
+ }
+
if (!branch_has_merge_config(branch)) {
die(_("Branch '%s' has no upstream information"), branch->name);
}
@@ -916,6 +937,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
int branch_existed = 0, remote_tracking = 0;
struct strbuf buf = STRBUF_INIT;
+ if (!strcmp(argv[0], "HEAD"))
+ die(_("it does not make sense to create 'HEAD' manually"));
+
+ if (!branch)
+ die(_("no such branch '%s'"), argv[0]);
+
if (kinds != REF_LOCAL_BRANCH)
die(_("-a and -r options to 'git branch' do not make sense with a branch name"));
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index f3e0e4a..12f1e4a 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -42,6 +42,10 @@ test_expect_success \
'git branch a/b/c should create a branch' \
'git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c'
+test_expect_success \
+ 'git branch HEAD should fail' \
+ 'test_must_fail git branch HEAD'
+
cat >expect <<EOF
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
EOF
@@ -388,6 +392,14 @@ test_expect_success \
'git tag foobar &&
test_must_fail git branch --track my11 foobar'
+test_expect_success '--set-upstream-to fails on multiple branches' \
+ 'test_must_fail git branch --set-upstream-to master a b c'
+
+test_expect_success '--set-upstream-to fails on detached HEAD' \
+ 'git checkout HEAD^{} &&
+ test_must_fail git branch --set-upstream-to master &&
+ git checkout -'
+
test_expect_success 'use --set-upstream-to modify HEAD' \
'test_config branch.master.remote foo &&
test_config branch.master.merge foo &&
@@ -417,6 +429,15 @@ test_expect_success 'test --unset-upstream on HEAD' \
test_must_fail git branch --unset-upstream
'
+test_expect_success '--unset-upstream should fail on multiple branches' \
+ 'test_must_fail git branch --unset-upstream a b c'
+
+test_expect_success '--unset-upstream should fail on detached HEAD' \
+ 'git checkout HEAD^{} &&
+ test_must_fail git branch --unset-upstream &&
+ git checkout -
+'
+
test_expect_success 'test --unset-upstream on a particular branch' \
'git branch my15
git branch --set-upstream-to master my14 &&
--
1.8.1.2.536.gf441e6d
^ permalink raw reply related
* Fwd: Compiling git 1.8.1.4 on 64bit centos 5.6
From: Darren Oakey @ 2013-02-23 13:13 UTC (permalink / raw)
To: git
In-Reply-To: <CA+B9=JLWASmrK_TNTkJxRH1cZrVjhXN8kKmCZcnHgKXwX9WUiA@mail.gmail.com>
g'day,
got a web host where I want to put git - it has no c compiler, so I
have to compile elsewhere. ssh is also locked out, so I have to use
https. The site uses both 64bit and 32bit hosts.
On a 32bit vm, I compiled the 32bit version of git fine with -static,
sent the binaries over, and it works perfectly.
On a 64bit vm, I just cannot get a 64 bit version of git compiling
with -static... or more precisely - I can but can't whatever I have
tried get a remote-http and remote-https to turn up in libexec.
Even when I hack the configure to force NO_CURL= and NO_OPENSSL= -
and add every extra library I seem to need (-lcrypto, -lssl -lkrb5
-ldl) it refuses to compile - giving me a bunch of missing krb5_*
If I compile without static, it works - but the shared libraries
aren't found when it's run from the web host. If I try running the
32bit version on the 64bit host, it doesn't find some library - and if
I try the 64bit version that I can properly get compiling statically,
I get an error saying no remote found for https.
Please help - it's driving me insane... can anyone tell me how to
compile a 64 bit static version of git under centos 5.6?
Thanks,
Darren
^ permalink raw reply
* [PATCH] Spelling fixes.
From: Ville Skyttä @ 2013-02-23 14:31 UTC (permalink / raw)
To: git
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
---
Documentation/RelNotes/1.7.5.4.txt | 2 +-
Documentation/RelNotes/1.7.8.txt | 2 +-
Documentation/RelNotes/1.8.2.txt | 2 +-
Documentation/git-credential.txt | 2 +-
Documentation/git-remote-ext.txt | 2 +-
Documentation/git-svn.txt | 4 ++--
Documentation/revisions.txt | 2 +-
Documentation/technical/api-argv-array.txt | 2 +-
Documentation/technical/api-credentials.txt | 2 +-
Documentation/technical/api-ref-iteration.txt | 2 +-
builtin/apply.c | 6 +++---
commit.c | 2 +-
commit.h | 2 +-
contrib/mw-to-git/git-remote-mediawiki.perl | 6 +++---
contrib/mw-to-git/t/README | 6 +++---
contrib/mw-to-git/t/install-wiki/LocalSettings.php | 2 +-
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 10 +++++-----
contrib/mw-to-git/t/test-gitmw-lib.sh | 2 +-
contrib/subtree/t/t7900-subtree.sh | 2 +-
diff.c | 2 +-
git-add--interactive.perl | 2 +-
git-cvsserver.perl | 4 ++--
git-gui/lib/blame.tcl | 2 +-
git-gui/lib/index.tcl | 2 +-
git-gui/lib/spellcheck.tcl | 4 ++--
git-quiltimport.sh | 2 +-
gitweb/INSTALL | 2 +-
gitweb/gitweb.perl | 6 +++---
kwset.c | 4 ++--
perl/Git.pm | 2 +-
perl/Git/I18N.pm | 2 +-
perl/private-Error.pm | 2 +-
po/README | 6 +++---
po/pt_PT.po | 2 +-
po/zh_CN.po | 2 +-
sequencer.c | 2 +-
t/t0022-crlf-rename.sh | 2 +-
t/t3701-add-interactive.sh | 2 +-
t/t4014-format-patch.sh | 6 +++---
t/t4124-apply-ws-rule.sh | 2 +-
t/t6030-bisect-porcelain.sh | 2 +-
t/t7001-mv.sh | 8 ++++----
t/t7004-tag.sh | 2 +-
t/t7600-merge.sh | 2 +-
t/t7601-merge-pull-config.sh | 2 +-
t/t9001-send-email.sh | 2 +-
transport.h | 2 +-
xdiff/xdiffi.c | 2 +-
xdiff/xhistogram.c | 2 +-
49 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/Documentation/RelNotes/1.7.5.4.txt b/Documentation/RelNotes/1.7.5.4.txt
index cf3f455..7796df3 100644
--- a/Documentation/RelNotes/1.7.5.4.txt
+++ b/Documentation/RelNotes/1.7.5.4.txt
@@ -5,7 +5,7 @@ Fixes since v1.7.5.3
--------------------
* The single-key mode of "git add -p" was easily fooled into thinking
- that it was told to add everthing ('a') when up-arrow was pressed by
+ that it was told to add everything ('a') when up-arrow was pressed by
mistake.
* Setting a git command that uses custom configuration via "-c var=val"
diff --git a/Documentation/RelNotes/1.7.8.txt b/Documentation/RelNotes/1.7.8.txt
index b4d90bb..7012329 100644
--- a/Documentation/RelNotes/1.7.8.txt
+++ b/Documentation/RelNotes/1.7.8.txt
@@ -9,7 +9,7 @@ Updates since v1.7.7
* Updates to bash completion scripts.
* The build procedure has been taught to take advantage of computed
- dependency automatically when the complier supports it.
+ dependency automatically when the compiler supports it.
* The date parser now accepts timezone designators that lack minutes
part and also has a colon between "hh:mm".
diff --git a/Documentation/RelNotes/1.8.2.txt b/Documentation/RelNotes/1.8.2.txt
index a287f24..4e63644 100644
--- a/Documentation/RelNotes/1.8.2.txt
+++ b/Documentation/RelNotes/1.8.2.txt
@@ -17,7 +17,7 @@ preference configuration variable "push.default" to change this.
"git push $there tag v1.2.3" used to allow replacing a tag v1.2.3
that already exists in the repository $there, if the rewritten tag
-you are pushing points at a commit that is a decendant of a commit
+you are pushing points at a commit that is a descendant of a commit
that the old tag v1.2.3 points at. This was found to be error prone
and starting with this release, any attempt to update an existing
ref under refs/tags/ hierarchy will fail, without "--force".
diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt
index 472f00f..7da0f13 100644
--- a/Documentation/git-credential.txt
+++ b/Documentation/git-credential.txt
@@ -56,7 +56,7 @@ For example, if we want a password for
`https://example.com/foo.git`, we might generate the following
credential description (don't forget the blank line at the end; it
tells `git credential` that the application finished feeding all the
-infomation it has):
+information it has):
protocol=https
host=example.com
diff --git a/Documentation/git-remote-ext.txt b/Documentation/git-remote-ext.txt
index 58b7fac..8cfc748 100644
--- a/Documentation/git-remote-ext.txt
+++ b/Documentation/git-remote-ext.txt
@@ -86,7 +86,7 @@ begins with `ext::`. Examples:
edit .ssh/config.
"ext::socat -t3600 - ABSTRACT-CONNECT:/git-server %G/somerepo"::
- Represents repository with path /somerepo accessable over
+ Represents repository with path /somerepo accessible over
git protocol at abstract namespace address /git-server.
"ext::git-server-alias foo %G/repo"::
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 1b8b649..7706d41 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -245,7 +245,7 @@ first have already been pushed into SVN.
patch), "all" (accept all patches), or "quit".
+
'git svn dcommit' returns immediately if answer if "no" or "quit", without
- commiting anything to SVN.
+ committing anything to SVN.
'branch'::
Create a branch in the SVN repository.
@@ -856,7 +856,7 @@ HANDLING OF SVN BRANCHES
------------------------
If 'git svn' is configured to fetch branches (and --follow-branches
is in effect), it sometimes creates multiple Git branches for one
-SVN branch, where the addtional branches have names of the form
+SVN branch, where the additional branches have names of the form
'branchname@nnn' (with nnn an SVN revision number). These additional
branches are created if 'git svn' cannot find a parent commit for the
first commit in an SVN branch, to connect the branch to the history of
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 678d175..39a855a 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -55,7 +55,7 @@ when you run `git cherry-pick`.
+
Note that any of the 'refs/*' cases above may come either from
the '$GIT_DIR/refs' directory or from the '$GIT_DIR/packed-refs' file.
-While the ref name encoding is unspecified, UTF-8 is prefered as
+While the ref name encoding is unspecified, UTF-8 is preferred as
some output processing may assume ref names in UTF-8.
'<refname>@\{<date>\}', e.g. 'master@\{yesterday\}', 'HEAD@\{5 minutes ago\}'::
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt
index a959517..a6b7d83 100644
--- a/Documentation/technical/api-argv-array.txt
+++ b/Documentation/technical/api-argv-array.txt
@@ -55,7 +55,7 @@ Functions
initial, empty state.
`argv_array_detach`::
- Detach the argv array from the `struct argv_array`, transfering
+ Detach the argv array from the `struct argv_array`, transferring
ownership of the allocated array and strings.
`argv_array_free_detached`::
diff --git a/Documentation/technical/api-credentials.txt b/Documentation/technical/api-credentials.txt
index 516fda7..c1b42a4 100644
--- a/Documentation/technical/api-credentials.txt
+++ b/Documentation/technical/api-credentials.txt
@@ -160,7 +160,7 @@ int foo_login(struct foo_connection *f)
break;
default:
/*
- * Some other error occured. We don't know if the
+ * Some other error occurred. We don't know if the
* credential is good or bad, so report nothing to the
* credential subsystem.
*/
diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt
index dbbea95..aa1c50f 100644
--- a/Documentation/technical/api-ref-iteration.txt
+++ b/Documentation/technical/api-ref-iteration.txt
@@ -35,7 +35,7 @@ Iteration functions
* `head_ref_submodule()`, `for_each_ref_submodule()`,
`for_each_ref_in_submodule()`, `for_each_tag_ref_submodule()`,
`for_each_branch_ref_submodule()`, `for_each_remote_ref_submodule()`
- do the same as the functions descibed above but for a specified
+ do the same as the functions described above but for a specified
submodule.
* `for_each_rawref()` can be used to learn about broken ref and symref.
diff --git a/builtin/apply.c b/builtin/apply.c
index 06f5320..f6a3c97 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1921,7 +1921,7 @@ static int parse_binary(char *buffer, unsigned long size, struct patch *patch)
}
/*
- * Read the patch text in "buffer" taht extends for "size" bytes; stop
+ * Read the patch text in "buffer" that extends for "size" bytes; stop
* reading after seeing a single patch (i.e. changes to a single file).
* Create fragments (i.e. patch hunks) and hang them to the given patch.
* Return the number of bytes consumed, so that the caller can call us
@@ -3025,7 +3025,7 @@ static struct patch *in_fn_table(const char *name)
*
* The latter is needed to deal with a case where two paths A and B
* are swapped by first renaming A to B and then renaming B to A;
- * moving A to B should not be prevented due to presense of B as we
+ * moving A to B should not be prevented due to presence of B as we
* will remove it in a later patch.
*/
#define PATH_TO_BE_DELETED ((struct patch *) -2)
@@ -3509,7 +3509,7 @@ static int check_patch(struct patch *patch)
*
* A patch to swap-rename between A and B would first rename A
* to B and then rename B to A. While applying the first one,
- * the presense of B should not stop A from getting renamed to
+ * the presence of B should not stop A from getting renamed to
* B; ask to_be_deleted() about the later rename. Removal of
* B and rename from A to B is handled the same way by asking
* was_deleted().
diff --git a/commit.c b/commit.c
index e8eb0ae..1a41757 100644
--- a/commit.c
+++ b/commit.c
@@ -834,7 +834,7 @@ struct commit_list *get_merge_bases(struct commit *one, struct commit *two,
}
/*
- * Is "commit" a decendant of one of the elements on the "with_commit" list?
+ * Is "commit" a descendant of one of the elements on the "with_commit" list?
*/
int is_descendant_of(struct commit *commit, struct commit_list *with_commit)
{
diff --git a/commit.h b/commit.h
index 4138bb4..252c7f8 100644
--- a/commit.h
+++ b/commit.h
@@ -164,7 +164,7 @@ extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *r
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
-/* largest postive number a signed 32-bit integer can contain */
+/* largest positive number a signed 32-bit integer can contain */
#define INFINITE_DEPTH 0x7fffffff
extern int register_shallow(const unsigned char *sha1);
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 094129d..779c379 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -28,7 +28,7 @@ use warnings;
use constant SLASH_REPLACEMENT => "%2F";
# It's not always possible to delete pages (may require some
-# priviledges). Deleted pages are replaced with this content.
+# privileges). Deleted pages are replaced with this content.
use constant DELETED_CONTENT => "[[Category:Deleted]]\n";
# It's not possible to create empty pages. New empty files in Git are
@@ -841,7 +841,7 @@ sub mw_import_ref {
if ($fetch_from == 1 && $n == 0) {
print STDERR "You appear to have cloned an empty MediaWiki.\n";
# Something has to be done remote-helper side. If nothing is done, an error is
- # thrown saying that HEAD is refering to unknown object 0000000000000000000
+ # thrown saying that HEAD is referring to unknown object 0000000000000000000
# and the clone fails.
}
}
@@ -986,7 +986,7 @@ sub mw_upload_file {
print STDERR "Check the configuration of file uploads in your mediawiki.\n";
return $newrevid;
}
- # Deleting and uploading a file requires a priviledged user
+ # Deleting and uploading a file requires a privileged user
if ($file_deleted) {
mw_connect_maybe();
my $query = {
diff --git a/contrib/mw-to-git/t/README b/contrib/mw-to-git/t/README
index 96e9739..03f6ee5 100644
--- a/contrib/mw-to-git/t/README
+++ b/contrib/mw-to-git/t/README
@@ -25,7 +25,7 @@ Principles and Technical Choices
The test environment makes it easy to install and manipulate one or
several MediaWiki instances. To allow developers to run the testsuite
-easily, the environment does not require root priviledge (except to
+easily, the environment does not require root privilege (except to
install the required packages if needed). It starts a webserver
instance on the user's account (using lighttpd greatly helps for
that), and does not need a separate database daemon (thanks to the use
@@ -81,7 +81,7 @@ parameters, please refer to the `test-gitmw-lib.sh` and
** `test_check_wiki_precond`:
Check if the tests must be skipped or not. Please use this function
-at the beggining of each new test file.
+at the beginning of each new test file.
** `wiki_getpage`:
Fetch a given page from the wiki and puts its content in the
@@ -113,7 +113,7 @@ Tests if a given page exists on the wiki.
** `wiki_reset`:
Reset the wiki, i.e. flush the database. Use this function at the
-begining of each new test, except if the test re-uses the same wiki
+beginning of each new test, except if the test re-uses the same wiki
(and history) as the previous test.
How to write a new test
diff --git a/contrib/mw-to-git/t/install-wiki/LocalSettings.php b/contrib/mw-to-git/t/install-wiki/LocalSettings.php
index 29f1251..745e47e 100644
--- a/contrib/mw-to-git/t/install-wiki/LocalSettings.php
+++ b/contrib/mw-to-git/t/install-wiki/LocalSettings.php
@@ -88,7 +88,7 @@ $wgShellLocale = "en_US.utf8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
+## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/Names.php
diff --git a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
index b6405ce..e764ddc 100755
--- a/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
+++ b/contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh
@@ -139,7 +139,7 @@ test_expect_success 'character $ in file name (git -> mw) ' '
'
-test_expect_failure 'capital at the begining of file names' '
+test_expect_failure 'capital at the beginning of file names' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_10 &&
(
@@ -156,7 +156,7 @@ test_expect_failure 'capital at the begining of file names' '
'
-test_expect_failure 'special character at the begining of file name from mw to git' '
+test_expect_failure 'special character at the beginning of file name from mw to git' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_11 &&
wiki_editpage {char_1 "expect to be renamed {char_1" false &&
@@ -207,7 +207,7 @@ test_expect_success 'test of correct formating for file name from mw to git' '
'
-test_expect_failure 'test of correct formating for file name begining with special character' '
+test_expect_failure 'test of correct formating for file name beginning with special character' '
wiki_reset &&
git clone mediawiki::'"$WIKI_URL"' mw_dir_13 &&
(
@@ -215,7 +215,7 @@ test_expect_failure 'test of correct formating for file name begining with speci
echo "my new file {char_1" >\{char_1.mw &&
echo "my new file [char_2" >\[char_2.mw &&
git add . &&
- git commit -am "commiting some exotic file name..." &&
+ git commit -am "committing some exotic file name..." &&
git push &&
git pull
) &&
@@ -234,7 +234,7 @@ test_expect_success 'test of correct formating for file name from git to mw' '
echo "my new file char{_1" >Char\{_1.mw &&
echo "my new file char[_2" >Char\[_2.mw &&
git add . &&
- git commit -m "commiting some exotic file name..." &&
+ git commit -m "committing some exotic file name..." &&
git push
) &&
wiki_getallpage ref_page_14 &&
diff --git a/contrib/mw-to-git/t/test-gitmw-lib.sh b/contrib/mw-to-git/t/test-gitmw-lib.sh
index 3b2cfac..dbaf47d 100755
--- a/contrib/mw-to-git/t/test-gitmw-lib.sh
+++ b/contrib/mw-to-git/t/test-gitmw-lib.sh
@@ -95,7 +95,7 @@ test_diff_directories () {
# Check that <dir> contains exactly <N> files
test_contains_N_files () {
if test `ls -- "$1" | wc -l` -ne "$2"; then
- echo "directory $1 sould contain $2 files"
+ echo "directory $1 should contain $2 files"
echo "it contains these files:"
ls "$1"
false
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 80d3399..4729521 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -419,7 +419,7 @@ test_expect_success 'add main-sub5' '
test_expect_success 'split for main-sub5 without --onto' '
# also test that we still can split out an entirely new subtree
# if the parent of the first commit in the tree is not empty,
- # then the new subtree has accidently been attached to something
+ # then the new subtree has accidentally been attached to something
git subtree split --prefix subdir2 --branch mainsub5 &&
check_equal ''"$(git log --pretty=format:%P -1 mainsub5)"'' ""
'
diff --git a/diff.c b/diff.c
index 156fec4..71ac502 100644
--- a/diff.c
+++ b/diff.c
@@ -1553,7 +1553,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)
* Binary files are displayed with "Bin XXX -> YYY bytes"
* instead of the change count and graph. This part is treated
* similarly to the graph part, except that it is not
- * "scaled". If total width is too small to accomodate the
+ * "scaled". If total width is too small to accommodate the
* guaranteed minimum width of the filename part and the
* separators and this message, this message will "overflow"
* making the line longer than the maximum width.
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 710764a..d2c4ce6 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -1247,7 +1247,7 @@ sub summarize_hunk {
# Print a one-line summary of each hunk in the array ref in
-# the first argument, starting wih the index in the 2nd.
+# the first argument, starting with the index in the 2nd.
sub display_hunks {
my ($hunks, $i) = @_;
my $ctr = 0;
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 3679074..b50a970 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2911,7 +2911,7 @@ sub filenamesplit
}
# Cleanup various junk in filename (try to canonicalize it), and
-# add prependdir to accomodate running CVS client from a
+# add prependdir to accommodate running CVS client from a
# subdirectory (so the output is relative to top directory of the project).
sub filecleanup
{
@@ -4583,7 +4583,7 @@ sub getmeta
# the numerical value of the corresponding byte plus
# 100.
# - "plus 100" avoids "0"s, and also reduces the
- # likelyhood of a collision in the case that someone someday
+ # likelihood of a collision in the case that someone someday
# writes an import tool that tries to preserve original
# CVS revision numbers, and the original CVS data had done
# lots of branches off of branches and other strangeness to
diff --git a/git-gui/lib/blame.tcl b/git-gui/lib/blame.tcl
index 324f774..b1d15f4 100644
--- a/git-gui/lib/blame.tcl
+++ b/git-gui/lib/blame.tcl
@@ -5,7 +5,7 @@ class blame {
image create photo ::blame::img_back_arrow -data {R0lGODlhGAAYAIUAAPwCBEzKXFTSZIz+nGzmhGzqfGTidIT+nEzGXHTqhGzmfGzifFzadETCVES+VARWDFzWbHzyjAReDGTadFTOZDSyRDyyTCymPARaFGTedFzSbDy2TCyqRCyqPARaDAyCHES6VDy6VCyiPAR6HCSeNByWLARyFARiDARqFGTifARiFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAYABgAAAajQIBwSCwaj8ikcsk0BppJwRPqHEypQwHBis0WDAdEFyBIKBaMAKLBdjQeSkFBYTBAIvgEoS6JmhUTEwIUDQ4VFhcMGEhyCgoZExoUaxsWHB0THkgfAXUGAhoBDSAVFR0XBnCbDRmgog0hpSIiDJpJIyEQhBUcJCIlwA22SSYVogknEg8eD82qSigdDSknY0IqJQXPYxIl1dZCGNvWw+Dm510GQQAh/mhDcmVhdGVkIGJ5IEJNUFRvR0lGIFBybyB2ZXJzaW9uIDIuNQ0KqSBEZXZlbENvciAxOTk3LDE5OTguIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQpodHRwOi8vd3d3LmRldmVsY29yLmNvbQA7}
-# Persistant data (survives loads)
+# Persistent data (survives loads)
#
field history {}; # viewer history: {commit path}
field header ; # array commit,key -> header field
diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl
index 8efbbdd..74a81a7 100644
--- a/git-gui/lib/index.tcl
+++ b/git-gui/lib/index.tcl
@@ -414,7 +414,7 @@ proc revert_helper {txt paths} {
# such distinction is needed in some languages. Previously, the
# code used "Revert changes in" for both, but that can't work
# in languages where 'in' must be combined with word from
- # rest of string (in diffrent way for both cases of course).
+ # rest of string (in different way for both cases of course).
#
# FIXME: Unfortunately, even that isn't enough in some languages
# as they have quite complex plural-form rules. Unfortunately,
diff --git a/git-gui/lib/spellcheck.tcl b/git-gui/lib/spellcheck.tcl
index e612030..538d61c 100644
--- a/git-gui/lib/spellcheck.tcl
+++ b/git-gui/lib/spellcheck.tcl
@@ -14,7 +14,7 @@ field w_menu ; # context menu for the widget
field s_menuidx 0 ; # last index of insertion into $w_menu
field s_i {} ; # timer registration for _run callbacks
-field s_clear 0 ; # did we erase mispelled tags yet?
+field s_clear 0 ; # did we erase misspelled tags yet?
field s_seen [list] ; # lines last seen from $w_text in _run
field s_checked [list] ; # lines already checked
field s_pending [list] ; # [$line $data] sent to ispell/aspell
@@ -259,7 +259,7 @@ method _run {} {
if {$n == $cur_line
&& ![regexp {^\W$} [$w_text get $cur_pos insert]]} {
- # If the current word is mispelled remove the tag
+ # If the current word is misspelled remove the tag
# but force a spellcheck later.
#
set tags [$w_text tag names $cur_pos]
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 9a6ba2b..8e17525 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -59,7 +59,7 @@ tmp_patch="$tmp_dir/patch"
tmp_info="$tmp_dir/info"
-# Find the intial commit
+# Find the initial commit
commit=$(git rev-parse HEAD)
mkdir $tmp_dir || exit 2
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index 6d45406..08f3dda 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -244,7 +244,7 @@ for gitweb (in gitweb/README), and gitweb.conf(5) manpage.
through the GITWEB_CONFIG_SYSTEM environment variable.
Note that if per-instance configuration file exists, then system-wide
- configuration is _not used at all_. This is quite untypical and suprising
+ configuration is _not used at all_. This is quite untypical and surprising
behavior. On the other hand changing current behavior would break backwards
compatibility and can lead to unexpected changes in gitweb behavior.
Therefore gitweb also looks for common system-wide configuration file,
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1309196..80950c0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -683,7 +683,7 @@ sub evaluate_gitweb_config {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
our $GITWEB_CONFIG_COMMON = $ENV{'GITWEB_CONFIG_COMMON'} || "++GITWEB_CONFIG_COMMON++";
- # Protect agains duplications of file names, to not read config twice.
+ # Protect against duplications of file names, to not read config twice.
# Only one of $GITWEB_CONFIG and $GITWEB_CONFIG_SYSTEM is used, so
# there possibility of duplication of filename there doesn't matter.
$GITWEB_CONFIG = "" if ($GITWEB_CONFIG eq $GITWEB_CONFIG_COMMON);
@@ -1136,7 +1136,7 @@ sub handle_errors_html {
# to avoid infinite loop where error occurs in die_error,
# change handler to default handler, disabling handle_errors_html
- set_message("Error occured when inside die_error:\n$msg");
+ set_message("Error occurred when inside die_error:\n$msg");
# you cannot jump out of die_error when called as error handler;
# the subroutine set via CGI::Carp::set_message is called _after_
@@ -7485,7 +7485,7 @@ sub git_object {
system(git_cmd(), "cat-file", '-e', $hash_base) == 0
or die_error(404, "Base object does not exist");
- # here errors should not hapen
+ # here errors should not happen
open my $fd, "-|", git_cmd(), "ls-tree", $hash_base, "--", $file_name
or die_error(500, "Open git-ls-tree failed");
my $line = <$fd>;
diff --git a/kwset.c b/kwset.c
index 51b2ab6..5800999 100644
--- a/kwset.c
+++ b/kwset.c
@@ -26,7 +26,7 @@
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-/* The algorithm implemented by these routines bears a startling resemblence
+/* The algorithm implemented by these routines bears a startling resemblance
to one discovered by Beate Commentz-Walter, although it is not identical.
See "A String Matching Algorithm Fast on the Average," Technical Report,
IBM-Germany, Scientific Center Heidelberg, Tiergartenstrasse 15, D-6900
@@ -435,7 +435,7 @@ kwsprep (kwset_t kws)
/* Update the delta table for the descendents of this node. */
treedelta(curr->links, curr->depth, delta);
- /* Compute the failure function for the decendents of this node. */
+ /* Compute the failure function for the descendants of this node. */
treefails(curr->links, curr->fail, kwset->trie);
/* Update the shifts at each node in the current node's chain
diff --git a/perl/Git.pm b/perl/Git.pm
index a56d1e7..2adec53 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1029,7 +1029,7 @@ my (%TEMP_FILEMAP, %TEMP_FILES);
=item temp_acquire ( NAME )
-Attempts to retreive the temporary file mapped to the string C<NAME>. If an
+Attempts to retrieve the temporary file mapped to the string C<NAME>. If an
associated temp file has not been created this session or was closed, it is
created, cached, and set for autoflush and binmode.
diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm
index 40dd897..f889fd6 100644
--- a/perl/Git/I18N.pm
+++ b/perl/Git/I18N.pm
@@ -68,7 +68,7 @@ Git::I18N - Perl interface to Git's Gettext localizations
print __("Welcome to Git!\n");
- printf __("The following error occured: %s\n"), $error;
+ printf __("The following error occurred: %s\n"), $error;
=head1 DESCRIPTION
diff --git a/perl/private-Error.pm b/perl/private-Error.pm
index 11e9cd9..9a0c567 100644
--- a/perl/private-Error.pm
+++ b/perl/private-Error.pm
@@ -769,7 +769,7 @@ is a numeric value. These values are what will be returned by the
overload methods.
If the text value ends with C<at file line 1> as $@ strings do, then
-this infomation will be used to set the C<-file> and C<-line> arguments
+this information will be used to set the C<-file> and C<-line> arguments
of the error object.
This class is used internally if an eval'd block die's with an error
diff --git a/po/README b/po/README
index c1520e8..d8c9111 100644
--- a/po/README
+++ b/po/README
@@ -232,7 +232,7 @@ Shell:
# To interpolate variables:
details="oh noes"
- eval_gettext "An error occured: \$details"; echo
+ eval_gettext "An error occurred: \$details"; echo
In addition we have wrappers for messages that end with a trailing
newline. I.e. you could write the above as:
@@ -242,7 +242,7 @@ Shell:
# To interpolate variables:
details="oh noes"
- eval_gettextln "An error occured: \$details"
+ eval_gettextln "An error occurred: \$details"
More documentation about the interface is available in the GNU info
page: `info '(gettext)sh'`. Looking at git-am.sh (the first shell
@@ -257,7 +257,7 @@ Perl:
use Git::I18N;
print __("Welcome to Git!\n");
- printf __("The following error occured: %s\n"), $error;
+ printf __("The following error occurred: %s\n"), $error;
Run `perldoc perl/Git/I18N.pm` for more info.
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 517ec29..d8f5abd 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -1,7 +1,7 @@
# Portuguese translations for Git package.
# Copyright (C) 2012 Marco Sousa <marcomsousa AT gmail.com>
# This file is distributed under the same license as the Git package.
-# Contributers:
+# Contributors:
# - Marco Sousa <marcomsousa AT gmail.com>
#
msgid ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6379876..f7e3270 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2,7 +2,7 @@
# Git 软件包的简体中文翻译.
# Copyright (C) 2012,2013 Jiang Xin <worldhello.net AT gmail.com>
# This file is distributed under the same license as the Git package.
-# Contributers:
+# Contributors:
# - Jiang Xin <worldhello.net AT gmail.com>
# - Riku <lu.riku AT gmail.com>
# - Zhuang Ya <zhuangya AT me.com>
diff --git a/sequencer.c b/sequencer.c
index aef5e8a..bad5077 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -133,7 +133,7 @@ static void print_advice(int show_hint, struct replay_opts *opts)
if (msg) {
fprintf(stderr, "%s\n", msg);
/*
- * A conflict has occured but the porcelain
+ * A conflict has occurred but the porcelain
* (typically rebase --interactive) wants to take care
* of the commit itself so remove CHERRY_PICK_HEAD
*/
diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh
index 7af3fbc..f702302 100755
--- a/t/t0022-crlf-rename.sh
+++ b/t/t0022-crlf-rename.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-test_description='ignore CR in CRLF sequence while computing similiarity'
+test_description='ignore CR in CRLF sequence while computing similarity'
. ./test-lib.sh
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 098a6ae..9fab25c 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -319,7 +319,7 @@ test_expect_success PERL 'split hunk "add -p (edit)"' '
# times to get out.
#
# 2. Correct version applies the (not)edited version, and asks
- # about the next hunk, against wich we say q and program
+ # about the next hunk, against which we say q and program
# exits.
for a in s e q n q q
do
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 7fa3647..e91e66c 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -742,21 +742,21 @@ test_expect_success 'format-patch --signature --cover-letter' '
test 2 = $(grep "my sig" output | wc -l)
'
-test_expect_success 'format.signature="" supresses signatures' '
+test_expect_success 'format.signature="" suppresses signatures' '
git config format.signature "" &&
git format-patch --stdout -1 >output &&
check_patch output &&
! grep "^-- \$" output
'
-test_expect_success 'format-patch --no-signature supresses signatures' '
+test_expect_success 'format-patch --no-signature suppresses signatures' '
git config --unset-all format.signature &&
git format-patch --stdout --no-signature -1 >output &&
check_patch output &&
! grep "^-- \$" output
'
-test_expect_success 'format-patch --signature="" supresses signatures' '
+test_expect_success 'format-patch --signature="" suppresses signatures' '
git format-patch --stdout --signature="" -1 >output &&
check_patch output &&
! grep "^-- \$" output
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 6f6ee88..581a801 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -47,7 +47,7 @@ test_fix () {
# find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed
- # the changed lines are all expeced to change
+ # the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed)
case "$1" in
'') expect_cnt=$fixed_cnt ;;
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 3e0e15f..8bf99e1 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -190,7 +190,7 @@ test_expect_success 'bisect start: no ".git/BISECT_START" if checkout error' '
# $HASH1 is good, $HASH4 is bad, we skip $HASH3
# but $HASH2 is bad,
# so we should find $HASH2 as the first bad commit
-test_expect_success 'bisect skip: successfull result' '
+test_expect_success 'bisect skip: successful result' '
git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index a845b15..3a51878 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -16,7 +16,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-out -a'
test_expect_success \
@@ -30,7 +30,7 @@ test_expect_success \
# in path0 currently
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'cd .. && git commit -m move-in -a'
test_expect_success \
@@ -82,7 +82,7 @@ test_expect_success \
'git mv path0 path2'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
@@ -101,7 +101,7 @@ test_expect_success \
'git mv path2 path1'
test_expect_success \
- 'commiting the change' \
+ 'committing the change' \
'git commit -m dir-move -a'
test_expect_success \
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index f5a79b1..4fb28dc 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -75,7 +75,7 @@ test_expect_success \
# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
- 'listing tags using a non-matching pattern should suceed' \
+ 'listing tags using a non-matching pattern should succeed' \
'git tag -l xxx'
test_expect_success \
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 5e19598..37cc095 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -316,7 +316,7 @@ test_expect_success 'merge c1 with c2 (squash)' '
test_debug 'git log --graph --decorate --oneline --all'
-test_expect_success 'unsuccesful merge of c1 with c2 (squash, ff-only)' '
+test_expect_success 'unsuccessful merge of c1 with c2 (squash, ff-only)' '
git reset --hard c1 &&
test_must_fail git merge --squash --ff-only c2
'
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index b44b293..25dac79 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -109,7 +109,7 @@ test_expect_success 'setup conflicted merge' '
'
# First do the merge with resolve and recursive then verify that
-# recusive is choosen.
+# recusive is chosen.
test_expect_success 'merge picks up the best result' '
git config --unset-all pull.twohead &&
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 97d6f4c..feaee8b 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -101,7 +101,7 @@ test_expect_success $PREREQ \
test_expect_success $PREREQ 'Send patches with --envelope-sender' '
clean_fake_sendmail &&
- git send-email --envelope-sender="Patch Contributer <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+ git send-email --envelope-sender="Patch Contributor <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
'
test_expect_success $PREREQ 'setup expect' '
diff --git a/transport.h b/transport.h
index a3450e9..e7beb81 100644
--- a/transport.h
+++ b/transport.h
@@ -74,7 +74,7 @@ struct transport {
const char *executable, int fd[2]);
/** get_refs_list(), fetch(), and push_refs() can keep
- * resources (such as a connection) reserved for futher
+ * resources (such as a connection) reserved for further
* use. disconnect() releases these resources.
**/
int (*disconnect)(struct transport *connection);
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 1b7012a..b2eb6db 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -490,7 +490,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
/*
* Try to move back the possibly merged group of changes, to match
- * the recorded postion in the other file.
+ * the recorded position in the other file.
*/
while (ixref < ix) {
rchg[--ixs] = 1;
diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c
index bf99787..73210cb 100644
--- a/xdiff/xhistogram.c
+++ b/xdiff/xhistogram.c
@@ -55,7 +55,7 @@ struct histindex {
struct record {
unsigned int ptr, cnt;
struct record *next;
- } **records, /* an ocurrence */
+ } **records, /* an occurrence */
**line_map; /* map of line to record chain */
chastore_t rcha;
unsigned int *next_ptrs;
--
1.7.11.7
^ permalink raw reply related
* Re: Suggested improvements to the git-p4 documentation (branch-related)
From: Pete Wyckoff @ 2013-02-23 14:48 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Olivier Delalleau, git
In-Reply-To: <7va9qvc13r.fsf@alter.siamese.dyndns.org>
gitster@pobox.com wrote on Fri, 22 Feb 2013 16:42 -0800:
> Olivier Delalleau <shish@keba.be> writes:
>
> > 2013/1/5 Pete Wyckoff <pw@padd.com>:
> >> shish@keba.be wrote on Thu, 03 Jan 2013 15:58 -0500:
> > ...
> >> Please do feel welcome to to rearrange or expand the
> >> documentation so it makes more sense, if you are so inspired.
> >
> > I'm afraid I'm not familiar enough with git documentation to dig into
> > it myself, but anyway that's about what I had for now. I'll send more
> > comments to the mailing list if I have more suggestions in the future.
> >
> > Thanks for a great tool! :)
>
> Did anything come out of this thread? If neither of you two are
> inclined to conclude the discussion with a final patch, I'd
> appreciate anybody else who does the honors ;-)
>
> We'll be in deep pre-release freeze for a few weeks, so there is no
> need to rush.
Two of Olivier's suggestions were best classified as code, not
documentation, bugs. I finished off some ongoing work that fixed
those along the way. The third led to a fix to the
documentation, 182edef (git p4 doc: fix branch detection example,
2013-01-14), that I added as part of that series.
All of it is in master now, via 801cbd7 (Merge branch
'pw/p4-branch-fixes', 2013-01-21).
I should have commented on this thread too. Thanks for following
up!
-- Pete
^ permalink raw reply
* Re: [PATCH] Spelling fixes.
From: Duy Nguyen @ 2013-02-23 14:58 UTC (permalink / raw)
To: Ville Skyttä; +Cc: git
In-Reply-To: <1361629899-8346-1-git-send-email-ville.skytta@iki.fi>
On Sat, Feb 23, 2013 at 9:31 PM, Ville Skyttä <ville.skytta@iki.fi> wrote:
> 49 files changed, 72 insertions(+), 72 deletions(-)
I know I make spelling mistakes on daily basis, but I did not know we
made so many. Changes in the test suite and non-contrib *.[ch] look
good.
--
Duy
^ permalink raw reply
* [PATCH v2] Documentation/githooks: Explain pre-rebase parameters
From: W. Trevor King @ 2013-02-23 15:27 UTC (permalink / raw)
To: Git; +Cc: Junio C Hamano, Thomas Rast, W. Trevor King
In-Reply-To: <20130220163621.GI14102@odin.tremily.us>
From: "W. Trevor King" <wking@tremily.us>
Descriptions borrowed from templates/hooks--pre-rebase.sample.
Signed-off-by: W. Trevor King <wking@tremily.us>
---
Changes from v1:
* Replaced "empty" with "missing" for second parameter.
Documentation/githooks.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index b9003fe..dfd5959 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -140,9 +140,10 @@ the outcome of 'git commit'.
pre-rebase
~~~~~~~~~~
-This hook is called by 'git rebase' and can be used to prevent a branch
-from getting rebased.
-
+This hook is called by 'git rebase' and can be used to prevent a
+branch from getting rebased. The hook takes two parameters: the
+upstream the series was forked from and the branch being rebased. The
+second parameter will be missing when rebasing the current branch.
post-checkout
~~~~~~~~~~~~~
--
1.8.2.rc0.16.g20a599e
^ permalink raw reply related
* Re: Fwd: Compiling git 1.8.1.4 on 64bit centos 5.6
From: W. Trevor King @ 2013-02-23 15:44 UTC (permalink / raw)
To: Darren Oakey; +Cc: git
In-Reply-To: <CA+B9=JLaZ5P+H-b-A6Xo-TRMcQYwGawjD-G62m8asnC0qMwmdg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
On Sun, Feb 24, 2013 at 12:13:11AM +1100, Darren Oakey wrote:
> If I compile without static, it works - but the shared libraries
> aren't found when it's run from the web host. If I try running the
> 32bit version on the 64bit host, it doesn't find some library
This is a shot in the dark, but are you sure you have static versions
of the libraries in questions (*.a) installed?
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH] diff: Fix rename pretty-print when suffix and prefix overlap
From: Antoine Pelisse @ 2013-02-23 16:48 UTC (permalink / raw)
To: git; +Cc: Antoine Pelisse
When considering a rename for two files that have a suffix and a prefix
that can overlap, a confusing line is shown. As an example, renaming
"a/b/b/c" to "a/b/c" shows "a/b/{ => }/b/c".
Currently, what we do is calculate the common prefix ("a/b/"), and the
common suffix ("/b/c"), but the same "/b/" is actually counted both in
prefix and suffix. Then when calculating the size of the non-common part,
we end-up with a negative value which is reset to 0, thus the "{ => }".
Do not allow the common suffix to overlap the common prefix and stop
when reaching a "/" that would be in both.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
diff.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/diff.c b/diff.c
index 156fec4..80f4752 100644
--- a/diff.c
+++ b/diff.c
@@ -1290,7 +1290,16 @@ static char *pprint_rename(const char *a, const char *b)
old = a + len_a;
new = b + len_b;
sfx_length = 0;
- while (a <= old && b <= new && *old == *new) {
+ /*
+ * Note:
+ * if pfx_length is 0, old/new will never reach a - 1 because it
+ * would mean the whole string is common suffix. But then, the
+ * whole string would also be a common prefix, and we would not
+ * have pfx_length equals 0.
+ */
+ while (a + pfx_length - 1 <= old &&
+ b + pfx_length - 1 <= new &&
+ *old == *new) {
if (*old == '/')
sfx_length = len_a - (old - a);
old--;
--
1.7.9.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox