Skip to content

Commit

Permalink
War on whitespace
Browse files Browse the repository at this point in the history
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time.  There are a few files that need
to have trailing whitespaces (most notably, test vectors).  The results
still passes the test, and build result in Documentation/ area is unchanged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Jun 7, 2007
1 parent d44c782 commit a6080a0
Show file tree
Hide file tree
Showing 256 changed files with 645 additions and 852 deletions.
2 changes: 0 additions & 2 deletions Documentation/RelNotes-1.5.0.4.txt
Expand Up @@ -20,5 +20,3 @@ Fixes since v1.5.0.3
* Documentation updates

* User manual updates


2 changes: 0 additions & 2 deletions Documentation/RelNotes-1.5.0.5.txt
Expand Up @@ -24,5 +24,3 @@ Fixes since v1.5.0.3
* Documentation updates

* User manual updates


1 change: 0 additions & 1 deletion Documentation/RelNotes-1.5.0.6.txt
Expand Up @@ -19,4 +19,3 @@ Fixes since v1.5.0.5
- user-manual has better cross references.

- gitweb installation/deployment procedure is now documented.

1 change: 0 additions & 1 deletion Documentation/RelNotes-1.5.1.3.txt
Expand Up @@ -43,4 +43,3 @@ Fixes since v1.5.1.2
description was given by the caller.

Also contains various documentation updates.

14 changes: 7 additions & 7 deletions Documentation/SubmittingPatches
Expand Up @@ -296,15 +296,15 @@ diff --git a/pico/pico.c b/pico/pico.c
--- a/pico/pico.c
+++ b/pico/pico.c
@@ -219,7 +219,9 @@ PICO *pm;
switch(pico_all_done){ /* prepare for/handle final events */
case COMP_EXIT : /* already confirmed */
packheader();
switch(pico_all_done){ /* prepare for/handle final events */
case COMP_EXIT : /* already confirmed */
packheader();
+#if 0
stripwhitespace();
stripwhitespace();
+#endif
c |= COMP_EXIT;
break;
c |= COMP_EXIT;
break;


(Daniel Barkalow)

Expand Down
2 changes: 0 additions & 2 deletions Documentation/asciidoc.conf
Expand Up @@ -54,5 +54,3 @@ ifdef::backend-xhtml11[]
[gitlink-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]


2 changes: 0 additions & 2 deletions Documentation/config.txt
Expand Up @@ -682,5 +682,3 @@ receive.denyNonFastForwards::
transfer.unpackLimit::
When `fetch.unpackLimit` or `receive.unpackLimit` are
not set, the value of this variable is used instead.


46 changes: 23 additions & 23 deletions Documentation/core-tutorial.txt
Expand Up @@ -9,11 +9,11 @@ repository, mainly because being hands-on and using explicit examples is
often the best way of explaining what is going on.

In normal life, most people wouldn't use the "core" git programs
directly, but rather script around them to make them more palatable.
directly, but rather script around them to make them more palatable.
Understanding the core git stuff may help some people get those scripts
done, though, and it may also be instructive in helping people
understand what it is that the higher-level helper scripts are actually
doing.
doing.

The core git is often called "plumbing", with the prettier user
interfaces on top of it called "porcelain". You may not want to use the
Expand Down Expand Up @@ -41,7 +41,7 @@ Creating a new git repository couldn't be easier: all git repositories start
out empty, and the only thing you need to do is find yourself a
subdirectory that you want to use as a working tree - either an empty
one for a totally new project, or an existing working tree that you want
to import into git.
to import into git.

For our first example, we're going to start a totally new repository from
scratch, with no pre-existing files, and we'll call it `git-tutorial`.
Expand Down Expand Up @@ -169,7 +169,7 @@ $ ls .git/objects/??/*
and see two files:

----------------
.git/objects/55/7db03de997c86a4a028e1ebd3a1ceb225be238
.git/objects/55/7db03de997c86a4a028e1ebd3a1ceb225be238
.git/objects/f2/4c74a2e500f5ee1332c86b94199f52b1d1d962
----------------

Expand Down Expand Up @@ -220,7 +220,7 @@ you have not actually really "checked in" your files into git so far,
you've only *told* git about them.

However, since git knows about them, you can now start using some of the
most basic git commands to manipulate the files or look at their status.
most basic git commands to manipulate the files or look at their status.

In particular, let's not even check in the two files into git yet, we'll
start off by adding another line to `hello` first:
Expand Down Expand Up @@ -350,7 +350,7 @@ Making a change

Remember how we did the `git-update-index` on file `hello` and then we
changed `hello` afterward, and could compare the new state of `hello` with the
state we saved in the index file?
state we saved in the index file?

Further, remember how I said that `git-write-tree` writes the contents
of the *index* file to the tree, and thus what we just committed was in
Expand All @@ -370,7 +370,7 @@ file and the working tree, `git-diff-index` shows the differences
between a committed *tree* and either the index file or the working
tree. In other words, `git-diff-index` wants a tree to be diffed
against, and before we did the commit, we couldn't do that, because we
didn't have anything to diff against.
didn't have anything to diff against.

But now we can do

Expand All @@ -379,7 +379,7 @@ $ git-diff-index -p HEAD
----------------

(where `-p` has the same meaning as it did in `git-diff-files`), and it
will show us the same difference, but for a totally different reason.
will show us the same difference, but for a totally different reason.
Now we're comparing the working tree not against the index file,
but against the tree we just wrote. It just so happens that those two
are obviously the same, so we get the same result.
Expand All @@ -398,7 +398,7 @@ working tree, but when given the `\--cached` flag, it is told to
instead compare against just the index cache contents, and ignore the
current working tree state entirely. Since we just wrote the index
file to HEAD, doing `git-diff-index \--cached -p HEAD` should thus return
an empty set of differences, and that's exactly what it does.
an empty set of differences, and that's exactly what it does.

[NOTE]
================
Expand Down Expand Up @@ -549,7 +549,7 @@ $ git-whatchanged -p --root
----------------

and you will see exactly what has changed in the repository over its
short history.
short history.

[NOTE]
The `\--root` flag is a flag to `git-diff-tree` to tell it to
Expand Down Expand Up @@ -637,7 +637,7 @@ So the mental model of "the git information is always tied directly to
the working tree that it describes" may not be technically 100%
accurate, but it's a good model for all normal use.

This has two implications:
This has two implications:

- if you grow bored with the tutorial repository you created (or you've
made a mistake and want to start all over), you can just do simple
Expand Down Expand Up @@ -705,7 +705,7 @@ Many (most?) public remote repositories will not contain any of
the checked out files or even an index file, and will *only* contain the
actual core git files. Such a repository usually doesn't even have the
`.git` subdirectory, but has all the git files directly in the
repository.
repository.

To create your own local live copy of such a "raw" git repository, you'd
first create your own subdirectory for the project, and then copy the
Expand All @@ -718,7 +718,7 @@ $ cd my-git
$ rsync -rL rsync://rsync.kernel.org/pub/scm/git/git.git/ .git
----------------

followed by
followed by

----------------
$ git-read-tree HEAD
Expand All @@ -738,7 +738,7 @@ up-to-date (so that you don't have to refresh it afterward), and the
`-a` flag means "check out all files" (if you have a stale copy or an
older version of a checked out tree you may also need to add the `-f`
flag first, to tell git-checkout-index to *force* overwriting of any old
files).
files).

Again, this can all be simplified with

Expand All @@ -751,7 +751,7 @@ $ git checkout
which will end up doing all of the above for you.

You have now successfully copied somebody else's (mine) remote
repository, and checked it out.
repository, and checked it out.


Creating a new branch
Expand All @@ -760,14 +760,14 @@ Creating a new branch
Branches in git are really nothing more than pointers into the git
object database from within the `.git/refs/` subdirectory, and as we
already discussed, the `HEAD` branch is nothing but a symlink to one of
these object pointers.
these object pointers.

You can at any time create a new branch by just picking an arbitrary
point in the project history, and just writing the SHA1 name of that
object into a file under `.git/refs/heads/`. You can use any filename you
want (and indeed, subdirectories), but the convention is that the
"normal" branch is called `master`. That's just a convention, though,
and nothing enforces it.
and nothing enforces it.

To show that as an example, let's go back to the git-tutorial repository we
used earlier, and create a branch in it. You do that by simply just
Expand All @@ -778,7 +778,7 @@ $ git checkout -b mybranch
------------

will create a new branch based at the current `HEAD` position, and switch
to it.
to it.

[NOTE]
================================================
Expand Down Expand Up @@ -825,7 +825,7 @@ checking it out and switching to it. If so, just use the command
$ git branch <branchname> [startingpoint]
------------

which will simply _create_ the branch, but will not do anything further.
which will simply _create_ the branch, but will not do anything further.
You can then later -- once you decide that you want to actually develop
on that branch -- switch to that branch with a regular `git checkout`
with the branchname as the argument.
Expand Down Expand Up @@ -884,7 +884,7 @@ $ gitk --all
will show you graphically both of your branches (that's what the `\--all`
means: normally it will just show you your current `HEAD`) and their
histories. You can also see exactly how they came to be from a common
source.
source.

Anyway, let's exit `gitk` (`^Q` or the File menu), and decide that we want
to merge the work we did on the `mybranch` branch into the `master`
Expand All @@ -905,8 +905,8 @@ of it as it can automatically (which in this case is just merge the `example`
file, which had no differences in the `mybranch` branch), and say:

----------------
Auto-merging hello
CONFLICT (content): Merge conflict in hello
Auto-merging hello
CONFLICT (content): Merge conflict in hello
Automatic merge failed; fix up by hand
----------------

Expand Down Expand Up @@ -1387,7 +1387,7 @@ repository. Kernel.org mirror network takes care of the
propagation to other publicly visible machines:

------------
$ git push master.kernel.org:/pub/scm/git/git.git/
$ git push master.kernel.org:/pub/scm/git/git.git/
------------


Expand Down
21 changes: 10 additions & 11 deletions Documentation/diff-format.txt
@@ -1,7 +1,7 @@
The output format from "git-diff-index", "git-diff-tree" and
"git-diff-files" are very similar.

These commands all compare two sets of things; what is
These commands all compare two sets of things; what is
compared differs:

git-diff-index <tree-ish>::
Expand Down Expand Up @@ -139,28 +139,28 @@ index fabadb8,cc95eb0..4866510
--- a/describe.c
+++ b/describe.c
@@@ -98,20 -98,12 +98,20 @@@
return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
}

- static void describe(char *arg)
-static void describe(struct commit *cmit, int last_one)
++static void describe(char *arg, int last_one)
{
+ unsigned char sha1[20];
+ struct commit *cmit;
struct commit_list *list;
static int initialized = 0;
struct commit_name *n;
struct commit_list *list;
static int initialized = 0;
struct commit_name *n;

+ if (get_sha1(arg, sha1) < 0)
+ usage(describe_usage);
+ cmit = lookup_commit_reference(sha1);
+ if (!cmit)
+ usage(describe_usage);
+
if (!initialized) {
initialized = 1;
for_each_ref(get_name);
if (!initialized) {
initialized = 1;
for_each_ref(get_name);
------------

1. It is preceded with a "git diff" header, that looks like
Expand Down Expand Up @@ -233,4 +233,3 @@ parents). When shown by `git diff-files -c`, it compares the
two unresolved merge parents with the working tree file
(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
"their version").

4 changes: 2 additions & 2 deletions Documentation/diff-options.txt
Expand Up @@ -100,8 +100,8 @@
that matches other criteria, nothing is selected.

--find-copies-harder::
For performance reasons, by default, -C option finds copies only
if the original file of the copy was modified in the same
For performance reasons, by default, -C option finds copies only
if the original file of the copy was modified in the same
changeset. This flag makes the command
inspect unmodified files as candidates for the source of
copy. This is a very expensive operation for large
Expand Down
3 changes: 1 addition & 2 deletions Documentation/diffcore.txt
Expand Up @@ -71,7 +71,7 @@ The first transformation in the chain is diffcore-pathspec, and
is controlled by giving the pathname parameters to the
git-diff-* commands on the command line. The pathspec is used
to limit the world diff operates in. It removes the filepairs
outside the specified set of pathnames. E.g. If the input set
outside the specified set of pathnames. E.g. If the input set
of filepairs included:

------------------------------------------------
Expand Down Expand Up @@ -269,4 +269,3 @@ Documentation
*.c
t
------------------------------------------------

0 comments on commit a6080a0

Please sign in to comment.