Git development
 help / color / mirror / Atom feed
* [PATCH] githooks documentation: post-checkout hook is also called after clone
From: Jens Lehmann @ 2009-03-22 16:44 UTC (permalink / raw)
  To: git; +Cc: gitster, peff

The documentation of the post-checkout hook just talks
about git-checkout. But recently git-clone was changed to
call it too, so we have to document that in githooks.txt.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
 Documentation/githooks.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 1fd512b..76deefc 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -151,6 +151,9 @@ indicating whether the checkout was a branch checkout (changing branches,
 flag=1) or a file checkout (retrieving a file from the index, flag=0).
 This hook cannot affect the outcome of 'git-checkout'.
 
+It is also run after 'git-clone'. The first parameter given to the hook is
+the null-ref, the second the ref of the new HEAD and the flag is always 1.
+
 This hook can be used to perform repository validity checks, auto-display
 differences from the previous HEAD if different, or set working dir metadata
 properties.
-- 
1.6.2.1.275.ga797b

^ permalink raw reply related

* Re: [PATCH] githooks documentation: post-checkout hook is also called  after clone
From: Pat Notz @ 2009-03-22 16:56 UTC (permalink / raw)
  To: Jens Lehmann; +Cc: git, gitster, peff
In-Reply-To: <49C66B03.6020908@web.de>

On Sun, Mar 22, 2009 at 10:44 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
> The documentation of the post-checkout hook just talks
> about git-checkout. But recently git-clone was changed to
> call it too, so we have to document that in githooks.txt.
>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
> ---
>  Documentation/githooks.txt |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
> index 1fd512b..76deefc 100644
> --- a/Documentation/githooks.txt
> +++ b/Documentation/githooks.txt
> @@ -151,6 +151,9 @@ indicating whether the checkout was a branch checkout (changing branches,
>  flag=1) or a file checkout (retrieving a file from the index, flag=0).
>  This hook cannot affect the outcome of 'git-checkout'.
>
> +It is also run after 'git-clone'. The first parameter given to the hook is
> +the null-ref, the second the ref of the new HEAD and the flag is always 1.
> +

I don't think that's true if you clone with the --no-checkout (-n)
option though.

>  This hook can be used to perform repository validity checks, auto-display
>  differences from the previous HEAD if different, or set working dir metadata
>  properties.
> --
> 1.6.2.1.275.ga797b
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply

* Re: [PATCH 13/16] t3700: Skip a test with backslashes in pathspec
From: Johannes Sixt @ 2009-03-22 16:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v3ad6cvub.fsf@gitster.siamese.dyndns.org>

On Sonntag, 22. März 2009, Junio C Hamano wrote:
> I do not think the justification for this change is explained well enough.
>
> The test prepares a file whose name consists of "ef, oh, bra, oh, you,
> ket, bee, ei and are" (no backslashes), and passes a filespec that quotes
> bra and ket with backslash so glob won't misinterpret as if we are asking
> to add "ef oh followed by either oh or you followed by bee ei are".  There
> is no path that has a backslash in it involved.
>
> If this does not work on Windows, there is something else going on.  Is it
> that the shell eats one level of backslash too much or something?

I added these two paragraphs:

The test verifies that glob special characters can be escaped with
backslashes.  In particular, the string fo\[ou\]bar is given to git.

On Windows, this does not work because backslashes are first of all
directory separators, and first thing git does with a pathspec from the
command line is to convert backslashes to forward slashes.

-- Hannes

^ permalink raw reply

* Re: [PATCH] Document and test the new % shotcut for the tracked branch
From: Petr Baudis @ 2009-03-22 17:40 UTC (permalink / raw)
  To: Johannes Schindelin
  Cc: Michael J Gruber, git, Shawn O. Pearce, Andreas Gruenbacher,
	Junio C Hamano
In-Reply-To: <alpine.DEB.1.00.0903201247440.6865@intel-tinevez-2-302>

On Fri, Mar 20, 2009 at 12:48:50PM +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 20 Mar 2009, Petr Baudis wrote:
> 
> > On Fri, Mar 20, 2009 at 11:31:31AM +0100, Johannes Schindelin wrote:
> > > I had it ready yesterday!  But the real problem is not addressed by 
> > > your patch, either: '%<branch>' is a legal branch name.
> > > 
> > > I briefly considered <branch>^{tracked}, but
> > > 
> > > - the ^{} codepath does not try to substitute branch _names_, so we'd 
> > >   have to duplicate that ^{} detection, and,
> > > 
> > > - it is really cumbersome to write.
> > 
> > We already have @{N} to do one branch-based substitution, so what about 
> > following this convention? Can't we have @{t}?
> 
> Have you ever tried a German keyboard layout?  You would not say that @{} 
> is easy to write if you did.

Interesting, do you really use the regular German keyboard layout while
working in shell or programming? Most Czech people I know [*] use either
the USA layout or Czech programming layout.

> Besides, @{<string>} is already taken for the date-based reflog.

Yes, but some strings can never be dates. ;-)

Has our ref-shed painting fest reached any conclusion yet? I'm not fond
of spending more one-off sequences (~, //, ../, ...) on this, or
anything containing a colon (too confusing, IMHO). It would be nice to
get some generic escaping syntax.

The cleanest way I can think of is declaring ~ a special character and
having <ref>~<letter> as a generic way for ref-based expansions;
master~t would then expand to tracked branch of master.

The only(?) downside is that to mangle HEAD ref, you should write \~t
(but you won't notice your mistake until user 't' appears), but that's
a tough call...

(Should HEAD~t -> $HEAD~t -> master~t -> origin/master or rather
HEAD~t -> origin/HEAD? The former is more intuitive, I guess.)


[*] Since most Czech people I know are UNIX users, it seems...

-- 
				Petr "Pasky" Baudis
The average, healthy, well-adjusted adult gets up at seven-thirty
in the morning feeling just terrible. -- Jean Kerr

^ permalink raw reply

* Re: [PATCH v2 2/2] pack-objects: don't loosen objects available in alternate or kept packs
From: Nicolas Pitre @ 2009-03-22 17:40 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Junio C Hamano, git
In-Reply-To: <ee63ef30903220748q4e78e626t2ea3930809a670d6@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 967 bytes --]

On Sun, 22 Mar 2009, Brandon Casey wrote:

> >> +static int has_sha1_pack_kept_or_nonlocal(const unsigned char *sha1)
> >> +{
> >> +     static struct packed_git *last_found = (void *)1;
> >> +     struct packed_git *p;
> >> +
> >> +     p = (last_found == (void *)1) ? packed_git : last_found;
> >
> > Why (void *)1, not like:
> >
> >        static struct packed_git *last_found;
> >        struct packed_git *p = last_found ? last_found : packed_git;
> >
> > Am I missing something?
> 
> Heh, I am missing something too.  Maybe I should have _thought_ more
> about this code that I copied from sha1_file.c: find_pack_entry() and
> I would have asked the same question about _that_ code.
> 
> Maybe Nico has some idea?

Well...  I know this is my code, and I must have had a reason to keep 
the NULL pointer distinct from the initial value.  But at the moment I 
just can't remember about it, and the code doesn't show a need for it 
either.


Nicolas

^ permalink raw reply

* [RFC/PATCH 0/8] user-manual: style improvements
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras

This patch series tries to improve the style of the user-manual.

For a quick preview check:
http://people.freedesktop.org/~felipec/git/user-manual.html

Some changes are non-controversial, like s/git-foo/git foo/ while the font
style changes might be.

There's one huge patch for quoting improvements, which requires the css style
patch in order to look good. It probably needs to be split, but for now this is RFC.

Felipe Contreras (8):
  user-manual: remove some git-foo usage
  docbook: improve css style
  docbook: radical style change
  user-manual: general quoting improvements
  user-manual: use 'fast-forward' instead of 'fast forward'
  user-manual: use SHA-1 instead of SHA1 or sha1
  user-manual: add global config section
  user-manual: simplify the user configuration

 Documentation/docbook-xsl.css |   17 +-
 Documentation/user-manual.txt | 1038 +++++++++++++++++++++--------------------
 2 files changed, 549 insertions(+), 506 deletions(-)

^ permalink raw reply

* [RFC/PATCH 1/8] user-manual: remove some git-foo usage
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-1-git-send-email-felipe.contreras@gmail.com>

Also, use `git foo` when it make sense.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |  148 ++++++++++++++++++++--------------------
 1 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index e33b29b..e1bc955 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -188,7 +188,7 @@ As you can see, a commit shows who made the latest change, what they
 did, and why.
 
 Every commit has a 40-hexdigit id, sometimes called the "object name" or the
-"SHA1 id", shown on the first line of the "git-show" output.  You can usually
+"SHA1 id", shown on the first line of the "git show" output.  You can usually
 refer to a commit by a shorter name, such as a tag or a branch name, but this
 longer name can also be useful.  Most importantly, it is a globally unique
 name for this commit: so if you tell somebody else the object name (for
@@ -307,7 +307,7 @@ ref: refs/heads/master
 Examining an old version without creating a new branch
 ------------------------------------------------------
 
-The git-checkout command normally expects a branch head, but will also
+The `git checkout` command normally expects a branch head, but will also
 accept an arbitrary commit; for example, you can check out the commit
 referenced by a tag:
 
@@ -400,7 +400,7 @@ references with the same shorthand name, see the "SPECIFYING
 REVISIONS" section of linkgit:git-rev-parse[1].
 
 [[Updating-a-repository-With-git-fetch]]
-Updating a repository with git-fetch
+Updating a repository with git fetch
 ------------------------------------
 
 Eventually the developer cloned from will do additional work in her
@@ -427,7 +427,7 @@ $ git fetch linux-nfs
 -------------------------------------------------
 
 New remote-tracking branches will be stored under the shorthand name
-that you gave "git-remote add", in this case linux-nfs:
+that you gave "git remote add", in this case linux-nfs:
 
 -------------------------------------------------
 $ git branch -r
@@ -516,7 +516,7 @@ $ git bisect reset
 
 to return you to the branch you were on before.
 
-Note that the version which git-bisect checks out for you at each
+Note that the version which `git bisect` checks out for you at each
 point is just a suggestion, and you're free to try a different
 version if you think it would be a good idea.  For example,
 occasionally you may land on a commit that broke something unrelated;
@@ -592,11 +592,11 @@ In addition to HEAD, there are several other special names for
 commits:
 
 Merges (to be discussed later), as well as operations such as
-git-reset, which change the currently checked-out commit, generally
+`git reset`, which change the currently checked-out commit, generally
 set ORIG_HEAD to the value HEAD had before the current operation.
 
-The git-fetch operation always stores the head of the last fetched
-branch in FETCH_HEAD.  For example, if you run git fetch without
+The `git fetch` operation always stores the head of the last fetched
+branch in FETCH_HEAD.  For example, if you run `git fetch` without
 specifying a local branch as the target of the operation
 
 -------------------------------------------------
@@ -1073,9 +1073,9 @@ $ git diff
 
 shows the difference between the working tree and the index file.
 
-Note that "git-add" always adds just the current contents of a file
+Note that "git add" always adds just the current contents of a file
 to the index; further changes to the same file will be ignored unless
-you run git-add on the file again.
+you run `git add` on the file again.
 
 When you're ready, just run
 
@@ -1136,7 +1136,7 @@ Ignoring files
 A project will often generate files that you do 'not' want to track with git.
 This typically includes files generated by a build process or temporary
 backup files made by your editor. Of course, 'not' tracking files with git
-is just a matter of 'not' calling `git-add` on them. But it quickly becomes
+is just a matter of 'not' calling `git add` on them. But it quickly becomes
 annoying to have these untracked files lying around; e.g. they make
 `git add .` practically useless, and they keep showing up in the output of
 `git status`.
@@ -1349,7 +1349,7 @@ $ git add file.txt
 -------------------------------------------------
 
 the different stages of that file will be "collapsed", after which
-git-diff will (by default) no longer show diffs for that file.
+`git diff` will (by default) no longer show diffs for that file.
 
 [[undoing-a-merge]]
 Undoing a merge
@@ -1446,7 +1446,7 @@ Fixing a mistake by rewriting history
 
 If the problematic commit is the most recent commit, and you have not
 yet made that commit public, then you may just
-<<undoing-a-merge,destroy it using git-reset>>.
+<<undoing-a-merge,destroy it using `git reset`>>.
 
 Alternatively, you
 can edit the working directory and update the index to fix your
@@ -1474,7 +1474,7 @@ Checking out an old version of a file
 
 In the process of undoing a previous bad change, you may find it
 useful to check out an older version of a particular file using
-linkgit:git-checkout[1].  We've used git-checkout before to switch
+linkgit:git-checkout[1].  We've used `git checkout` before to switch
 branches, but it has quite different behavior if it is given a path
 name: the command
 
@@ -1542,7 +1542,7 @@ $ git gc
 -------------------------------------------------
 
 to recompress the archive.  This can be very time-consuming, so
-you may prefer to run git-gc when you are not doing other work.
+you may prefer to run `git gc` when you are not doing other work.
 
 
 [[ensuring-reliability]]
@@ -1634,7 +1634,7 @@ In some situations the reflog may not be able to save you.  For example,
 suppose you delete a branch, then realize you need the history it
 contained.  The reflog is also deleted; however, if you have not yet
 pruned the repository, then you may still be able to find the lost
-commits in the dangling objects that git-fsck reports.  See
+commits in the dangling objects that `git fsck` reports.  See
 <<dangling-objects>> for the details.
 
 -------------------------------------------------
@@ -1676,7 +1676,7 @@ Sharing development with others
 ===============================
 
 [[getting-updates-With-git-pull]]
-Getting updates with git-pull
+Getting updates with git pull
 -----------------------------
 
 After you clone a repository and make a few changes of your own, you
@@ -1722,7 +1722,7 @@ repository that you pulled from.
 <<fast-forwards,fast forward>>; instead, your branch will just be
 updated to point to the latest commit from the upstream branch.)
 
-The git-pull command can also be given "." as the "remote" repository,
+The `git pull` command can also be given "." as the "remote" repository,
 in which case it just merges in a branch from the current repository; so
 the commands
 
@@ -1795,7 +1795,7 @@ Public git repositories
 Another way to submit changes to a project is to tell the maintainer
 of that project to pull the changes from your repository using
 linkgit:git-pull[1].  In the section "<<getting-updates-With-git-pull,
-Getting updates with git-pull>>" we described this as a way to get
+Getting updates with `git pull`>>" we described this as a way to get
 updates from the "main" repository, but it works just as well in the
 other direction.
 
@@ -1847,7 +1847,7 @@ Setting up a public repository
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Assume your personal repository is in the directory ~/proj.  We
-first create a new clone of the repository and tell git-daemon that it
+first create a new clone of the repository and tell `git daemon` that it
 is meant to be public:
 
 -------------------------------------------------
@@ -1878,10 +1878,10 @@ repository>>", below.
 Otherwise, all you need to do is start linkgit:git-daemon[1]; it will
 listen on port 9418.  By default, it will allow access to any directory
 that looks like a git directory and contains the magic file
-git-daemon-export-ok.  Passing some directory paths as git-daemon
+git-daemon-export-ok.  Passing some directory paths as `git daemon`
 arguments will further restrict the exports to those paths.
 
-You can also run git-daemon as an inetd service; see the
+You can also run `git daemon` as an inetd service; see the
 linkgit:git-daemon[1] man page for details.  (See especially the
 examples section.)
 
@@ -1942,7 +1942,7 @@ or just
 $ git push ssh://yourserver.com/~you/proj.git master
 -------------------------------------------------
 
-As with git-fetch, git-push will complain if this does not result in a
+As with `git fetch`, `git push` will complain if this does not result in a
 <<fast-forwards,fast forward>>; see the following section for details on
 handling this case.
 
@@ -1952,7 +1952,7 @@ repository that has a checked-out working tree, but the working tree
 will not be updated by the push.  This may lead to unexpected results if
 the branch you push to is the currently checked-out branch!
 
-As with git-fetch, you may also set up configuration options to
+As with `git fetch`, you may also set up configuration options to
 save typing; so, for example, after
 
 -------------------------------------------------
@@ -1988,13 +1988,13 @@ error: failed to push to 'ssh://yourserver.com/~you/proj.git'
 
 This can happen, for example, if you:
 
-	- use `git-reset --hard` to remove already-published commits, or
-	- use `git-commit --amend` to replace already-published commits
+	- use `git reset --hard` to remove already-published commits, or
+	- use `git commit --amend` to replace already-published commits
 	  (as in <<fixing-a-mistake-by-rewriting-history>>), or
-	- use `git-rebase` to rebase any already-published commits (as
+	- use `git rebase` to rebase any already-published commits (as
 	  in <<using-git-rebase>>).
 
-You may force git-push to perform the update anyway by preceding the
+You may force `git push` to perform the update anyway by preceding the
 branch name with a plus sign:
 
 -------------------------------------------------
@@ -2036,7 +2036,7 @@ advantages over the central shared repository:
 
 	- Git's ability to quickly import and merge patches allows a
 	  single maintainer to process incoming changes even at very
-	  high rates.  And when that becomes too much, git-pull provides
+	  high rates.  And when that becomes too much, `git pull` provides
 	  an easy way for that maintainer to delegate this job to other
 	  maintainers while still allowing optional review of incoming
 	  changes.
@@ -2404,7 +2404,7 @@ use them, and then explain some of the problems that can arise because
 you are rewriting history.
 
 [[using-git-rebase]]
-Keeping a patch series up to date using git-rebase
+Keeping a patch series up to date using git rebase
 --------------------------------------------------
 
 Suppose that you create a branch "mywork" on a remote-tracking branch
@@ -2468,9 +2468,9 @@ patches to the new mywork.  The result will look like:
 ................................................
 
 In the process, it may discover conflicts.  In that case it will stop
-and allow you to fix the conflicts; after fixing conflicts, use "git-add"
+and allow you to fix the conflicts; after fixing conflicts, use `git add`
 to update the index with those contents, and then, instead of
-running git-commit, just run
+running `git commit`, just run
 
 -------------------------------------------------
 $ git rebase --continue
@@ -2508,7 +2508,7 @@ with
 $ git tag bad mywork~5
 -------------------------------------------------
 
-(Either gitk or git-log may be useful for finding the commit.)
+(Either gitk or `git log` may be useful for finding the commit.)
 
 Then check out that commit, edit it, and rebase the rest of the series
 on top of it (note that we could check out the commit on a temporary
@@ -2549,12 +2549,12 @@ $ gitk origin..mywork &
 
 and browse through the list of patches in the mywork branch using gitk,
 applying them (possibly in a different order) to mywork-new using
-cherry-pick, and possibly modifying them as you go using `commit --amend`.
+cherry-pick, and possibly modifying them as you go using `git commit --amend`.
 The linkgit:git-gui[1] command may also help as it allows you to
 individually select diff hunks for inclusion in the index (by
 right-clicking on the diff hunk and choosing "Stage Hunk for Commit").
 
-Another technique is to use git-format-patch to create a series of
+Another technique is to use `git format-patch` to create a series of
 patches, then reset the state to before the patches:
 
 -------------------------------------------------
@@ -2662,7 +2662,7 @@ you know is that D is bad, that Z is good, and that
 linkgit:git-bisect[1] identifies C as the culprit, how will you
 figure out that the problem is due to this change in semantics?
 
-When the result of a git-bisect is a non-merge commit, you should
+When the result of a `git bisect` is a non-merge commit, you should
 normally be able to discover the problem by examining just that commit.
 Developers can make this easy by breaking their changes into small
 self-contained commits.  That won't help in the case above, however,
@@ -2725,7 +2725,7 @@ master branch.  In more detail:
 git fetch and fast-forwards
 ---------------------------
 
-In the previous example, when updating an existing branch, "git-fetch"
+In the previous example, when updating an existing branch, "git fetch"
 checks to make sure that the most recent commit on the remote
 branch is a descendant of the most recent commit on your copy of the
 branch before updating your copy of the branch to point at the new
@@ -2751,7 +2751,7 @@ resulting in a situation like:
             o--o--o <-- new head of the branch
 ................................................
 
-In this case, "git-fetch" will fail, and print out a warning.
+In this case, "git fetch" will fail, and print out a warning.
 
 In that case, you can still force git to update to the new head, as
 described in the following section.  However, note that in the
@@ -2760,7 +2760,7 @@ unless you've already created a reference of your own pointing to
 them.
 
 [[forcing-fetch]]
-Forcing git-fetch to do non-fast-forward updates
+Forcing git fetch to do non-fast-forward updates
 ------------------------------------------------
 
 If git fetch fails because the new head of a branch is not a
@@ -3131,7 +3131,7 @@ $ git prune
 
 to remove any of the "loose" objects that are now contained in the
 pack.  This will also remove any unreferenced objects (which may be
-created when, for example, you use "git-reset" to remove a commit).
+created when, for example, you use "git reset" to remove a commit).
 You can verify that the loose objects are gone by looking at the
 .git/objects directory or by running
 
@@ -3160,7 +3160,7 @@ branch still exists, as does everything it pointed to. The branch
 pointer itself just doesn't, since you replaced it with another one.
 
 There are also other situations that cause dangling objects. For
-example, a "dangling blob" may arise because you did a "git-add" of a
+example, a "dangling blob" may arise because you did a "git add" of a
 file, but then, before you actually committed it and made it part of the
 bigger picture, you changed something else in that file and committed
 that *updated* thing--the old state that you added originally ends up
@@ -3210,7 +3210,7 @@ Usually, dangling blobs and trees aren't very interesting. They're
 almost always the result of either being a half-way mergebase (the blob
 will often even have the conflict markers from a merge in it, if you
 have had conflicting merges that you fixed up by hand), or simply
-because you interrupted a "git-fetch" with ^C or something like that,
+because you interrupted a "git fetch" with ^C or something like that,
 leaving _some_ of the new objects in the object database, but just
 dangling and useless.
 
@@ -3225,9 +3225,9 @@ and they'll be gone. But you should only run "git prune" on a quiescent
 repository--it's kind of like doing a filesystem fsck recovery: you
 don't want to do that while the filesystem is mounted.
 
-(The same is true of "git-fsck" itself, btw, but since
-git-fsck never actually *changes* the repository, it just reports
-on what it found, git-fsck itself is never "dangerous" to run.
+(The same is true of "git fsck" itself, btw, but since
+`git fsck` never actually *changes* the repository, it just reports
+on what it found, `git fsck` itself is never 'dangerous' to run.
 Running it while somebody is actually changing the repository can cause
 confusing and scary messages, but it won't actually do anything bad. In
 contrast, running "git prune" while somebody is actively changing the
@@ -3489,14 +3489,14 @@ done
 
 NOTE: Do not use local URLs here if you plan to publish your superproject!
 
-See what files `git-submodule` created:
+See what files `git submodule` created:
 
 -------------------------------------------------
 $ ls -a
 .  ..  .git  .gitmodules  a  b  c  d
 -------------------------------------------------
 
-The `git-submodule add <repo> <path>` command does a couple of things:
+The `git submodule add <repo> <path>` command does a couple of things:
 
 - It clones the submodule from <repo> to the given <path> under the
   current directory and by default checks out the master branch.
@@ -3542,7 +3542,7 @@ init` to add the submodule repository URLs to `.git/config`:
 $ git submodule init
 -------------------------------------------------
 
-Now use `git-submodule update` to clone the repositories and check out the
+Now use `git submodule update` to clone the repositories and check out the
 commits specified in the superproject:
 
 -------------------------------------------------
@@ -3552,8 +3552,8 @@ $ ls -a
 .  ..  .git  a.txt
 -------------------------------------------------
 
-One major difference between `git-submodule update` and `git-submodule add` is
-that `git-submodule update` checks out a specific commit, rather than the tip
+One major difference between `git submodule update` and `git submodule add` is
+that `git submodule update` checks out a specific commit, rather than the tip
 of a branch. It's like checking out a tag: the head is detached, so you're not
 working on a branch.
 
@@ -3769,7 +3769,7 @@ You update your working directory from the index by "checking out"
 files. This is not a very common operation, since normally you'd just
 keep your files updated, and rather than write to your working
 directory, you'd tell the index files about the changes in your
-working directory (i.e. `git-update-index`).
+working directory (i.e. `git update-index`).
 
 However, if you decide to jump to a new version, or check out somebody
 else's version, or just restore a previous tree, you'd populate your
@@ -3782,7 +3782,7 @@ $ git checkout-index filename
 
 or, if you want to check out all of the index, use `-a`.
 
-NOTE! git-checkout-index normally refuses to overwrite old files, so
+NOTE! `git checkout-index` normally refuses to overwrite old files, so
 if you have an old version of the tree already checked out, you will
 need to use the "-f" flag ('before' the "-a" flag or the filename) to
 'force' the checkout.
@@ -3820,7 +3820,7 @@ $ git commit-tree <tree> -p <parent> [-p <parent2> ..]
 and then giving the reason for the commit on stdin (either through
 redirection from a pipe or file, or by just typing it at the tty).
 
-git-commit-tree will return the name of the object that represents
+`git commit-tree` will return the name of the object that represents
 that commit, and you should save it away for later use. Normally,
 you'd commit a new `HEAD` state, and while git doesn't care where you
 save the note about that state, in practice we tend to just write the
@@ -3889,7 +3889,7 @@ $ git cat-file blob|tree|commit|tag <objectname>
 
 to show its contents. NOTE! Trees have binary content, and as a result
 there is a special helper for showing that content, called
-`git-ls-tree`, which turns the binary content into a more easily
+`git ls-tree`, which turns the binary content into a more easily
 readable form.
 
 It's especially instructive to look at "commit" objects, since those
@@ -3984,7 +3984,7 @@ came from: stage 1 corresponds to `$orig` tree, stage 2 `HEAD`
 tree, and stage3 `$target` tree.
 
 Earlier we said that trivial merges are done inside
-`git-read-tree -m`.  For example, if the file did not change
+`git read-tree -m`.  For example, if the file did not change
 from `$orig` to `HEAD` nor `$target`, or if the file changed
 from `$orig` to `HEAD` and `$orig` to `$target` the same way,
 obviously the final outcome is what is in `HEAD`.  What the
@@ -4011,20 +4011,20 @@ $ mv -f hello.c~2 hello.c
 $ git update-index hello.c
 -------------------------------------------------
 
-When a path is in the "unmerged" state, running `git-update-index` for
+When a path is in the "unmerged" state, running `git update-index` for
 that path tells git to mark the path resolved.
 
 The above is the description of a git merge at the lowest level,
 to help you understand what conceptually happens under the hood.
-In practice, nobody, not even git itself, runs `git-cat-file` three times
-for this.  There is a `git-merge-index` program that extracts the
+In practice, nobody, not even git itself, runs `git cat-file` three times
+for this.  There is a `git merge-index` program that extracts the
 stages to temporary files and calls a "merge" script on it:
 
 -------------------------------------------------
 $ git merge-index git-merge-one-file hello.c
 -------------------------------------------------
 
-and that is what higher level `git-merge -s resolve` is implemented with.
+and that is what higher level `git merge -s resolve` is implemented with.
 
 [[hacking-git]]
 Hacking git
@@ -4061,7 +4061,7 @@ size> {plus} <byte\0> {plus} <binary object data>.
 
 The structured objects can further have their structure and
 connectivity to other objects verified. This is generally done with
-the `git-fsck` program, which generates a full dependency graph
+the `git fsck` program, which generates a full dependency graph
 of all objects, and verifies their internal consistency (in addition
 to just verifying their superficial consistency through the hash).
 
@@ -4120,7 +4120,7 @@ functions like `get_sha1_basic()` or the likes.
 This is just to get you into the groove for the most libified part of Git:
 the revision walker.
 
-Basically, the initial version of `git-log` was a shell script:
+Basically, the initial version of `git log` was a shell script:
 
 ----------------------------------------------------------------
 $ git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | \
@@ -4129,20 +4129,20 @@ $ git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | \
 
 What does this mean?
 
-`git-rev-list` is the original version of the revision walker, which
+`git rev-list` is the original version of the revision walker, which
 _always_ printed a list of revisions to stdout.  It is still functional,
 and needs to, since most new Git programs start out as scripts using
-`git-rev-list`.
+`git rev-list`.
 
-`git-rev-parse` is not as important any more; it was only used to filter out
+`git rev-parse` is not as important any more; it was only used to filter out
 options that were relevant for the different plumbing commands that were
 called by the script.
 
-Most of what `git-rev-list` did is contained in `revision.c` and
+Most of what `git rev-list` did is contained in `revision.c` and
 `revision.h`.  It wraps the options in a struct named `rev_info`, which
 controls how and what revisions are walked, and more.
 
-The original job of `git-rev-parse` is now taken by the function
+The original job of `git rev-parse` is now taken by the function
 `setup_revisions()`, which parses the revisions and the common command line
 options for the revision walker. This information is stored in the struct
 `rev_info` for later consumption. You can do your own command line option
@@ -4155,7 +4155,7 @@ just have a look at the first implementation of `cmd_log()`; call
 `git show v1.3.0{tilde}155^2{tilde}4` and scroll down to that function (note that you
 no longer need to call `setup_pager()` directly).
 
-Nowadays, `git-log` is a builtin, which means that it is _contained_ in the
+Nowadays, `git log` is a builtin, which means that it is _contained_ in the
 command `git`.  The source side of a builtin is
 
 - a function called `cmd_<bla>`, typically defined in `builtin-<bla>.c`,
@@ -4171,7 +4171,7 @@ since they share quite a bit of code.  In that case, the commands which are
 _not_ named like the `.c` file in which they live have to be listed in
 `BUILT_INS` in the `Makefile`.
 
-`git-log` looks more complicated in C than it does in the original script,
+`git log` looks more complicated in C than it does in the original script,
 but that allows for a much greater flexibility and performance.
 
 Here again it is a good point to take a pause.
@@ -4182,9 +4182,9 @@ the organization of Git (after you know the basic concepts).
 So, think about something which you are interested in, say, "how can I
 access a blob just knowing the object name of it?".  The first step is to
 find a Git command with which you can do it.  In this example, it is either
-`git-show` or `git-cat-file`.
+`git show` or `git cat-file`.
 
-For the sake of clarity, let's stay with `git-cat-file`, because it
+For the sake of clarity, let's stay with `git cat-file`, because it
 
 - is plumbing, and
 
@@ -4198,7 +4198,7 @@ it does.
 ------------------------------------------------------------------
         git_config(git_default_config);
         if (argc != 3)
-                usage("git-cat-file [-t|-s|-e|-p|<type>] <sha1>");
+                usage("git cat-file [-t|-s|-e|-p|<type>] <sha1>");
         if (get_sha1(argv[2], sha1))
                 die("Not a valid object name %s", argv[2]);
 ------------------------------------------------------------------
@@ -4243,10 +4243,10 @@ To find out how the result can be used, just read on in `cmd_cat_file()`:
 -----------------------------------
 
 Sometimes, you do not know where to look for a feature.  In many such cases,
-it helps to search through the output of `git log`, and then `git-show` the
+it helps to search through the output of `git log`, and then `git show` the
 corresponding commit.
 
-Example: If you know that there was some test case for `git-bundle`, but
+Example: If you know that there was some test case for `git bundle`, but
 do not remember where it was (yes, you _could_ `git grep bundle t/`, but that
 does not illustrate the point!):
 
@@ -4530,7 +4530,7 @@ The basic requirements:
 - Whenever possible, section headings should clearly describe the task
   they explain how to do, in language that requires no more knowledge
   than necessary: for example, "importing patches into a project" rather
-  than "the git-am command"
+  than "the `git am` command"
 
 Think about how to create a clear chapter dependency graph that will
 allow people to get to important topics without necessarily reading
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 2/8] docbook: improve css style
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-2-git-send-email-felipe.contreras@gmail.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/docbook-xsl.css |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Documentation/docbook-xsl.css b/Documentation/docbook-xsl.css
index b878b38..ce61402 100644
--- a/Documentation/docbook-xsl.css
+++ b/Documentation/docbook-xsl.css
@@ -128,6 +128,15 @@ body pre {
 
 tt.literal, code.literal {
   color: navy;
+  font-size: 1em;
+}
+
+code.literal:before { content: "'"; }
+code.literal:after { content: "'"; }
+
+em {
+  font-style: italic;
+  color: green;
 }
 
 div.literallayout p {
@@ -137,7 +146,6 @@ div.literallayout p {
 
 div.literallayout {
   font-family: monospace;
-#  margin: 0.5em 10% 0.5em 1em;
   margin: 0em;
   color: navy;
   border: 1px solid silver;
@@ -187,7 +195,8 @@ dt {
 }
 
 dt span.term {
-  font-style: italic;
+  font-style: normal;
+  color: navy;
 }
 
 div.variablelist dd p {
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 3/8] docbook: radical style change
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-3-git-send-email-felipe.contreras@gmail.com>

Use smaller 'sans-serial' font. Sans-Serial fonts are supposed to be
easier to read in screens. This format is similar to the one of
Wikipedia.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/docbook-xsl.css |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Documentation/docbook-xsl.css b/Documentation/docbook-xsl.css
index ce61402..b494987 100644
--- a/Documentation/docbook-xsl.css
+++ b/Documentation/docbook-xsl.css
@@ -15,7 +15,9 @@ body blockquote {
 
 html body {
   margin: 1em 5% 1em 5%;
-  line-height: 1.2;
+  line-height: 1em;
+  font-family: sans-serif;
+  font-size: small;
 }
 
 body div {
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 5/8] user-manual: use 'fast-forward' instead of 'fast forward'
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-5-git-send-email-felipe.contreras@gmail.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 0d5726c..118bbe2 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1384,7 +1384,7 @@ were merged.
 
 However, if the current branch is a descendant of the other--so every
 commit present in the one is already contained in the other--then git
-just performs a '``fast forward'''; the head of the current branch is moved
+just performs a 'fast-forward'; the head of the current branch is moved
 forward to point at the head of the merged-in branch, without any new
 commits being created.
 
@@ -1719,7 +1719,7 @@ producing a default commit message documenting the branch and
 repository that you pulled from.
 
 (But note that no such commit will be created in the case of a
-<<fast-forwards,fast forward>>; instead, your branch will just be
+<<fast-forwards,fast-forward>>; instead, your branch will just be
 updated to point to the latest commit from the upstream branch.)
 
 The `git pull` command can also be given '"."' as the 'remote' repository,
@@ -1943,7 +1943,7 @@ $ git push ssh://yourserver.com/~you/proj.git master
 -------------------------------------------------
 
 As with `git fetch`, `git push` will complain if this does not result in a
-<<fast-forwards,fast forward>>; see the following section for details on
+<<fast-forwards,fast-forward>>; see the following section for details on
 handling this case.
 
 Note that the target of a 'push' is normally a
@@ -1976,7 +1976,7 @@ details.
 What to do when a push fails
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-If a push would not result in a <<fast-forwards,fast forward>> of the
+If a push would not result in a <<fast-forwards,fast-forward>> of the
 remote branch, then it will fail with an error like:
 
 -------------------------------------------------
@@ -2115,7 +2115,7 @@ $ git checkout release && git pull
 
 *Important note!*  If you have any local changes in these branches, then
 this merge will create a commit object in the history (with no local
-changes git will simply do a 'fast forward' merge).  Many people dislike
+changes git will simply do a 'fast-forward' merge).  Many people dislike
 the ``noise'' that this creates in the Linux history, so you should avoid
 doing this capriciously in the 'release' branch, as these noisy commits
 will become part of the permanent history when you ask Linus to pull
@@ -2729,9 +2729,9 @@ In the previous example, when updating an existing branch, "git fetch"
 checks to make sure that the most recent commit on the remote
 branch is a descendant of the most recent commit on your copy of the
 branch before updating your copy of the branch to point at the new
-commit.  Git calls this process a <<fast-forwards,fast forward>>.
+commit.  Git calls this process a <<fast-forwards,fast-forward>>.
 
-A 'fast forward' looks something like this:
+A 'fast-forward' looks something like this:
 
 ................................................
  o--o--o--o <-- old head of the branch
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 6/8] user-manual: use SHA-1 instead of SHA1 or sha1
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-6-git-send-email-felipe.contreras@gmail.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |   54 ++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 118bbe2..3278aa7 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -188,7 +188,7 @@ As you can see, a commit shows who made the latest change, what they
 did, and why.
 
 Every commit has a 40-hexdigit id, sometimes called the 'object name' or the
-`SHA1` id, shown on the first line of the `git show` output.  You can usually
+`SHA-1` id, shown on the first line of the `git show` output.  You can usually
 refer to a commit by a shorter name, such as a tag or a branch name, but this
 longer name can also be useful.  Most importantly, it is a globally unique
 name for this commit: so if you tell somebody else the object name (for
@@ -320,7 +320,7 @@ If you want to create a new branch from this checkout, you may do so
 HEAD is now at 427abfa... Linux v2.6.17
 ------------------------------------------------
 
-The `HEAD` then refers to the `SHA1` of the commit instead of to a branch,
+The `HEAD` then refers to the `SHA-1` of the commit instead of to a branch,
 and `git branch` shows that you are no longer on a branch:
 
 ------------------------------------------------
@@ -739,7 +739,7 @@ $ git log --pretty=oneline origin..mybranch | wc -l
 -------------------------------------------------
 
 Alternatively, you may often see this sort of thing done with the
-lower-level command linkgit:git-rev-list[1], which just lists the 'SHA1s'
+lower-level command linkgit:git-rev-list[1], which just lists the `SHA-1s`
 of all the given commits:
 
 -------------------------------------------------
@@ -2865,8 +2865,8 @@ The Object Database
 We already saw in <<understanding-commits>> that all commits are stored
 under a 40-digit 'object name'.  In fact, all the information needed to
 represent the history of a project is stored in objects with such names.
-In each case the name is calculated by taking the `SHA1` hash of the
-contents of the object.  The `SHA1` hash is a cryptographic hash function.
+In each case the name is calculated by taking the `SHA-1` hash of the
+contents of the object.  The `SHA-1` hash is a cryptographic hash function.
 What that means to us is that it is impossible to find two different
 objects with the same name.  This has a number of advantages; among
 others:
@@ -2877,10 +2877,10 @@ others:
   same content stored in two repositories will always be stored under
   the same name.
 - Git can detect errors when it reads an object, by checking that the
-  object's name is still the `SHA1` hash of its contents.
+  object's name is still the `SHA-1` hash of its contents.
 
 (See <<object-details>> for the details of the object formatting and
-`SHA1` calculation.)
+`SHA-1` calculation.)
 
 There are four different types of objects: 'blob', 'tree', 'commit', and
 'tag'.
@@ -2926,9 +2926,9 @@ committer Junio C Hamano <gitster@pobox.com> 1187591163 -0700
 
 As you can see, a commit is defined by:
 
-- a 'tree': The `SHA1` name of a tree object (as defined below), representing
+- a 'tree': The `SHA-1` name of a tree object (as defined below), representing
   the contents of a directory at a certain point in time.
-- 'parent(s)': The `SHA1` name of some number of commits which represent the
+- 'parent(s)': The `SHA-1` name of some number of commits which represent the
   immediately previous step(s) in the history of the project.  The
   example above has one parent; merge commits may have more than
   one.  A commit with no parents is called a 'root' commit, and
@@ -2977,13 +2977,13 @@ $ git ls-tree fb3a8bdd0ce
 ------------------------------------------------
 
 As you can see, a tree object contains a list of entries, each with a
-mode, object type, `SHA1` name, and name, sorted by name.  It represents
+mode, object type, `SHA-1` name, and name, sorted by name.  It represents
 the contents of a single directory tree.
 
 The object type may be a blob, representing the contents of a file, or
 another tree, representing the contents of a subdirectory.  Since trees
-and blobs, like all other objects, are named by the `SHA1` hash of their
-contents, two trees have the same `SHA1` name if and only if their
+and blobs, like all other objects, are named by the `SHA-1` hash of their
+contents, two trees have the same `SHA-1` name if and only if their
 contents (including, recursively, the contents of all subdirectories)
 are identical.  This allows git to quickly determine the differences
 between two related tree objects, since it can ignore any entries with
@@ -3029,15 +3029,15 @@ currently checked out.
 Trust
 ~~~~~
 
-If you receive the `SHA1` name of a blob from one source, and its contents
+If you receive the `SHA-1` name of a blob from one source, and its contents
 from another (possibly untrusted) source, you can still trust that those
-contents are correct as long as the SHA1 name agrees.  This is because
-the `SHA1` is designed so that it is infeasible to find different contents
+contents are correct as long as the `SHA-1` name agrees.  This is because
+the `SHA-1` is designed so that it is infeasible to find different contents
 that produce the same hash.
 
-Similarly, you need only trust the `SHA1` name of a top-level tree object
+Similarly, you need only trust the `SHA-1` name of a top-level tree object
 to trust the contents of the entire directory that it refers to, and if
-you receive the `SHA1` name of a commit from a trusted source, then you
+you receive the `SHA-1` name of a commit from a trusted source, then you
 can easily verify the entire history of commits reachable through
 parents of that commit, and all of those contents of the trees referred
 to by those commits.
@@ -3049,7 +3049,7 @@ that you trust that commit, and the immutability of the history of
 commits tells others that they can trust the whole history.
 
 In other words, you can easily validate a whole archive by just
-sending out a single email that tells the people the name (`SHA1` hash)
+sending out a single email that tells the people the name (`SHA-1` hash)
 of the top commit, and digitally sign that email using something
 like GPG/PGP.
 
@@ -3090,7 +3090,7 @@ How git stores objects efficiently: pack files
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Newly created objects are initially created in a file named after the
-object's `SHA1` hash (stored in '.git/objects').
+object's `SHA-1` hash (stored in '.git/objects').
 
 Unfortunately this system becomes inefficient once a project has a
 lot of objects.  Try this on an old project:
@@ -3297,7 +3297,7 @@ $ git hash-object -w somedirectory/myfile
 ------------------------------------------------
 
 which will create and store a blob object with the contents of
-'somedirectory/myfile', and output the sha1 of that object.  if you're
+'somedirectory/myfile', and output the `SHA-1` of that object.  if you're
 extremely lucky it might be '4b9458b3786228369c63936db65827de3cc06200', in
 which case you've guessed right, and the corruption is fixed!
 
@@ -3359,7 +3359,7 @@ The index
 -----------
 
 The index is a binary file (generally kept in `.git/index'` containing a
-sorted list of path names, each with permissions and the `SHA1` of a blob
+sorted list of path names, each with permissions and the `SHA-1` of a blob
 object; linkgit:git-ls-files[1] can show you the contents of the index:
 
 -------------------------------------------------
@@ -3978,7 +3978,7 @@ $ git ls-files --unmerged
 ------------------------------------------------
 
 Each line of the `git ls-files --unmerged` output begins with
-the blob mode bits, blob `SHA1`, 'stage number', and the
+the blob mode bits, blob `SHA-1`, 'stage number', and the
 filename.  The 'stage number' is git's way to say which tree it
 came from: stage 1 corresponds to '$orig' tree, stage 2 'HEAD'
 tree, and stage3 '$target' tree.
@@ -4045,12 +4045,12 @@ objects).  There are currently four different object types: 'blob',
 Regardless of object type, all objects share the following
 characteristics: they are all deflated with zlib, and have a header
 that not only specifies their type, but also provides size information
-about the data in the object.  It's worth noting that the `SHA1` hash
+about the data in the object.  It's worth noting that the `SHA-1` hash
 that is used to name the object is the hash of the original data
 plus this header, so 'sha1sum file' does not match the object name
 for 'file'.
 (Historical note: in the dawn of the age of git the hash
-was the sha1 of the 'compressed' object.)
+was the `SHA-1` of the 'compressed' object.)
 
 As a result, the general consistency of an object can always be tested
 independently of the contents or the type of the object: all objects can
@@ -4206,7 +4206,7 @@ it does.
 Let's skip over the obvious details; the only really interesting part
 here is the call to 'get_sha1()'.  It tries to interpret 'argv[2]' as an
 object name, and if it refers to an object which is present in the current
-repository, it writes the resulting SHA-1 into the variable 'sha1'.
+repository, it writes the resulting `SHA-1` into the variable 'sha1'.
 
 Two things are interesting here:
 
@@ -4216,8 +4216,8 @@ Two things are interesting here:
 
 - the variable 'sha1' in the function signature of 'get_sha1()' is '"unsigned
   char \*"', but is actually expected to be a pointer to '"unsigned
-  char[20]"'.  This variable will contain the 160-bit SHA-1 of the given
-  commit.  Note that whenever a SHA-1 is passed as '"unsigned char \*"', it
+  char[20]"'.  This variable will contain the 160-bit `SHA-1` of the given
+  commit.  Note that whenever a `SHA-1` is passed as '"unsigned char \*"', it
   is the binary representation, as opposed to the ASCII representation in
   hex characters, which is passed as '"char *"'.
 
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 7/8] user-manual: add global config section
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-7-git-send-email-felipe.contreras@gmail.com>

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 3278aa7..b7678aa 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -40,6 +40,40 @@ without any explanation.
 Finally, see <<todo>> for ways that you can help make this manual more
 complete.
 
+[[getting-started]]
+Getting started
+=============
+
+You can skip this section safely, however, configuring git at an early stage
+would probably make your overall experience with it more pleasant. Also many
+parts on this manual would be easier to grasp.
+
+Git's configuration is distributed on different locations: 'system', 'global', and
+'repository'. Variables are stored in the form of 'foo.bar', and the precedence
+order is 'repository' > 'global' > 'system'.
+
+You would probably want to start setting up something useful:
+------------------------------------------------
+$ git config --global color.ui auto
+------------------------------------------------
+
+This will make prettier the output of certain commands such as `git diff`, but
+that's not important; what is important here is that `color.ui` has been
+stored in the 'global' (for the user) configuration.
+
+You can take a look and manually modify the configuration with the `--edit`
+option (will use '$EDITOR'):
+------------------------------------------------
+$ git config --global --edit
+[color]
+        ui = auto
+------------------------------------------------
+
+Or you can manually edit the file which is located in `~/.gitconfig`. Other
+locations are `/etc/gitconfig` (system), and `.git/config` (repository).
+
+Other git configurations will be covered in the rest of the manual, if you
+want to learn more look at linkgit:git-config[1] for details.
 
 [[repositories-and-branches]]
 Repositories and Branches
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [RFC/PATCH 8/8] user-manual: simplify the user configuration
From: Felipe Contreras @ 2009-03-22 18:05 UTC (permalink / raw)
  To: git; +Cc: Felipe Contreras
In-Reply-To: <1237745121-6325-8-git-send-email-felipe.contreras@gmail.com>

This is shorter, avoids the burder to think about the format of the
configuration file, and git config is already used in other places in
the manual.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index b7678aa..c6ed940 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1015,13 +1015,11 @@ Telling git your name
 ---------------------
 
 Before creating any commits, you should introduce yourself to git.  The
-easiest way to do so is to make sure the following lines appear in a
-file named `.gitconfig` in your home directory:
+easiest way is to use the linkgit:git-config[1] command:
 
 ------------------------------------------------
-[user]
-	name = Your Name Comes Here
-	email = you@yourdomain.example.com
+$ git config --global user.name "Your Name Comes Here"
+$ git config --global user.email you@yourdomain.example.com
 ------------------------------------------------
 
 (See the '"CONFIGURATION FILE"' section of linkgit:git-config[1] for
-- 
1.6.2.1.352.gae594

^ permalink raw reply related

* [PATCH v2] githooks documentation: post-checkout hook is also called after clone
From: Jens Lehmann @ 2009-03-22 18:46 UTC (permalink / raw)
  To: git; +Cc: patnotz, gitster, peff

The documentation of the post-checkout hook just talks
about git-checkout. But recently git-clone was changed to
call it too, unless the -no-checkout (-n) option is used.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---


Thanks to Pat Notz for noticing that the hook is not called
on clone when the --no-checkout (-n) option is used.


 Documentation/githooks.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 1fd512b..1c73673 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -151,6 +151,10 @@ indicating whether the checkout was a branch checkout (changing branches,
 flag=1) or a file checkout (retrieving a file from the index, flag=0).
 This hook cannot affect the outcome of 'git-checkout'.
 
+It is also run after 'git-clone', unless the --no-checkout (-n) option is
+used. The first parameter given to the hook is the null-ref, the second the
+ref of the new HEAD and the flag is always 1.
+
 This hook can be used to perform repository validity checks, auto-display
 differences from the previous HEAD if different, or set working dir metadata
 properties.
-- 
1.6.2.1.275.ga797b

^ permalink raw reply related

* Re: [PATCH v2 2/2] pack-objects: don't loosen objects available in  alternate or kept packs
From: Junio C Hamano @ 2009-03-22 19:06 UTC (permalink / raw)
  To: Brandon Casey; +Cc: git, Nicolas Pitre
In-Reply-To: <7vbpru9nh9.fsf@gitster.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

>> +static int has_sha1_pack_kept_or_nonlocal(const unsigned char *sha1)
>> +{
>> +	static struct packed_git *last_found = (void *)1;
>> +	struct packed_git *p;
>> +
>> +	p = (last_found == (void *)1) ? packed_git : last_found;
>
> Why (void *)1, not like:
>
> 	static struct packed_git *last_found;
> 	struct packed_git *p = last_found ? last_found : packed_git;
>
> Am I missing something?
>
>> +	while (p) {
>> +		if ((!p->pack_local || p->pack_keep) &&
>> +			find_pack_entry_one(sha1, p)) {
>> +			last_found = p;
>> +			return 1;
>> +		}
>> +		if (p == last_found)
>> +			p = packed_git;
>> +		else
>> +			p = p->next;
>> +		if (p == last_found)
>> +			p = p->next;
>> +	}
>> +	return 0;
>> +}

Yes I was.

If you allow (last_found == NULL), the loop iterates over packed_git list,
and when it has its last element in p after discovering nothing matches
the criteria, this happens:

	if (p == last_found) /* false, p is the last element on the list */
        	p = packed_git; /* not taken */
	else
        	p = p->next; /* taken, p == NULL now */
	if (p == last_found) /* true! */
		p = p->next; /* OOPS */

^ permalink raw reply

* Re: [PATCH v2 2/2] pack-objects: don't loosen objects available in alternate or kept packs
From: Nicolas Pitre @ 2009-03-22 19:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Brandon Casey, git
In-Reply-To: <7viqm15qda.fsf@gitster.siamese.dyndns.org>

On Sun, 22 Mar 2009, Junio C Hamano wrote:

> If you allow (last_found == NULL), the loop iterates over packed_git list,
> and when it has its last element in p after discovering nothing matches
> the criteria, this happens:
> 
> 	if (p == last_found) /* false, p is the last element on the list */
>         	p = packed_git; /* not taken */
> 	else
>         	p = p->next; /* taken, p == NULL now */
> 	if (p == last_found) /* true! */
> 		p = p->next; /* OOPS */

Yeah, you got it.  Now I remember.


Nicolas

^ permalink raw reply

* Re: [RFC/PATCH] git-shortlog: respect i18n.logOutputEncoding config setting
From: Junio C Hamano @ 2009-03-22 19:26 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: git
In-Reply-To: <20090322113438.GK27459@genesis.frugalware.org>

Miklos Vajna <vmiklos@frugalware.org> writes:

> On Fri, Feb 20, 2009 at 02:12:38AM +0100, Miklos Vajna <vmiklos@frugalware.org> wrote:
>> As git-shortlog can be used as a filter as well, we do not really have
>> the encoding info to do a reencode_string(), but in case
>> i18n.logOutputEncoding is set, we can try to convert to the given value
>> from utf-8.

It is unclear what you want to say in these for lines.  Do you mean "when
used to generate logs by itself this patch improves the behaviour by
making the output consistent with what "git log" does, but it does the
same mangling when used as a filter without knowing the log encoding and
potentially screw people over who have been depending on it not to convert
the encoding"?  Or something else?

^ permalink raw reply

* [PATCH] bash completion: add options for 'git fsck'
From: Arto Jonsson @ 2009-03-22 18:49 UTC (permalink / raw)
  To: spearce; +Cc: git

Signed-off-by: Arto Jonsson <ajonsson@kapsi.fi>
---
 contrib/completion/git-completion.bash |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ed235f7..e738830 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -952,6 +952,21 @@ _git_format_patch ()
 	__git_complete_revlist
 }
 
+_git_fsck ()
+{
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+	case "$cur" in
+	--*)
+		__gitcomp "
+			--tags --root --unreachable --cache --no-reflogs --full
+			--strict --verbose --lost-found
+			"
+		return
+		;;
+	esac
+	COMPREPLY=()
+}
+
 _git_gc ()
 {
 	local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -1880,6 +1895,7 @@ _git ()
 	diff)        _git_diff ;;
 	fetch)       _git_fetch ;;
 	format-patch) _git_format_patch ;;
+	fsck)        _git_fsck ;;
 	gc)          _git_gc ;;
 	grep)        _git_grep ;;
 	help)        _git_help ;;
-- 
1.6.2.GIT

^ permalink raw reply related

* Re: [RFC/PATCH] git-shortlog: respect i18n.logOutputEncoding config setting
From: Miklos Vajna @ 2009-03-22 19:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7i2h5pfh.fsf@gitster.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

On Sun, Mar 22, 2009 at 12:26:58PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> It is unclear what you want to say in these for lines.  Do you mean "when
> used to generate logs by itself this patch improves the behaviour by
> making the output consistent with what "git log" does, but it does the
> same mangling when used as a filter without knowing the log encoding and
> potentially screw people over who have been depending on it not to convert
> the encoding"?  Or something else?

Not exactly - let me rephrase:

Normally we can do a reencode_string() because we know the encoding of
the commit and we know the wished output encoding.  Given that
git-shortlog can be a filter as well, we don't know the encoding of the
input, but we know the wished output encoding. So what we can do is to
_try_ to encode from utf8 to the wished encoding, and if that fails,
just don't convert anything. The result is correct, because:

1) If git-shortlog is a filter, then git-log already does the encoding,
the encoding will fail in git-shortlog so the original input will be
shown.

2) In the other case git-shoftlog can just do the converion.

At least I tested the case with utf8 author names and a latin2 terminal
and both the 'git log rev.. | git shortlog' and the 'git shortlog rev..'
output was correct, while git.git's master shows the correct output only
in the first case.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: question about conflict resolution across multiple branches
From: William Morgan @ 2009-03-22 20:05 UTC (permalink / raw)
  To: Git Mailing List
In-Reply-To: <7viqm58e8r.fsf@gitster.siamese.dyndns.org>

Reformatted excerpts from Junio C Hamano's message of 2009-03-19:
>     $ git diff origin/next >fixup.patch

Ok, this is helpful. So git diff will give me an explicit dump of the
conflict resolution changes, which I can use with git apply --index when
I see the conflict. Sort of a manual, shared, git-rerere.

Wouldn't it be simpler for git format-patch to produce something for a
merge commit with conflicts? (Maybe there's a way and I just can't find
it?)

> Needless to say, you need to be careful when accepting such a fixup
> patch.

More careful than when accepting a "regular" patch?

Thanks for your help!
-- 
William <wmorgan-git@masanjin.net>

^ permalink raw reply

* Git for Windows 1.6.2.1-preview20090322
From: Johannes Schindelin @ 2009-03-22 21:17 UTC (permalink / raw)
  To: git, msysgit
In-Reply-To: <alpine.DEB.1.00.0903080132470.10279@pacific.mpi-cbg.de>

Hi,

I just released a new version of Git for Windows (TAFKA WinGit).  It is 
basically Git 1.6.2.1 plus a few patches.  Please find the installer here:

	http://msysgit.googlecode.com/

Disclaimer: Git for Windows is still in a state where I do _not_ recommend 
using it unless you have the means to fix issues.  Unlike the git.git 
developer community, the msysGit team is heavily undermanned.

Known issues 

- Some commands are not yet supported on Windows and excluded from the 
  installation; namely: git archimport, git cvsexportcommit, git 
  cvsimport, git cvsserver, git filter-branch, git instaweb, git 
  send-email, git shell.

- The Logitec QuickCam software can cause spurious crashes. See "Why does 
  make often crash creating a sh.exe.stackdump file when I try to compile 
  my source code?" on the MinGW Wiki 
  (http://www.mingw.org/wiki/Environment_issues)

- The Quick Launch icon will only be installed for the user running setup 
  (typically the Administrator). This is a technical restriction and will 
  not change.

- Git Bash launched through the Explorer shell extension does not have the 
  git icon in its taskbar. This is a technical restriction and will not 
  change.

- git send-mail does not work properly (Issue 27).

- curl uses $HOME/_netrc instead of $HOME/.netrc.

- If you want to specify a different location for --upload-pack, you have 
  to start the absolute path with two slashes. Otherwise MSys will mangle 
  the path.

- git and bash have serious problems with non-ASCII file names (Issue 80, 
  108, 149, 159, 188).

- If configured to use plink, you will have to connect with putty first, 
  as you cannot accept the host key due to the console window being 
  blocked (Issue 96).

- MinGW does not support IPv6 yet (Issue 182).

- When run from cmd.exe instead of Git Bash, some characters seem to be 
  "swallowed" from Git's output (Issue 192).

- There are a few issues with ssh hanging (Issue 197), permission denied 
  on renaming pack files (mentioned in Issue 194), and spurious write 
  errors during rebase (Issue 200) that seem not to be reproducible on 
  most computers.

Changes since Git-1.6.2-preview20090308 

New Features 

- Comes with official git 1.6.2.1.

- A portable application is shipped in addition to the installer (Issue 
  195).

- Comes with a Windows-specific mmap() implementation (Issue 198).

Bugfixes 

- ANSI control characters are no longer shown verbatim (Issue 124).

- Temporary files are created respecting core.autocrlf (Issue 177).

- The Git Bash prompt is colorful again (Issue 199).

- Fixed crash when hardlinking during a clone failed (Issue 204). 

- An infinite loop was fixed in git-gui (Issue 205). 

- The ssh protocol is always used with plink.exe (Issue 209). 

- More vim files are shipped now, so that syntax highlighting works. 

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Documentation: Reworded example text in git-bisect.txt.
From: David J. Mellor @ 2009-03-22 21:39 UTC (permalink / raw)
  To: Christian Couder; +Cc: gitster, git, Michael J Gruber
In-Reply-To: <200903210528.32392.chriscool@tuxfamily.org>

On 03/20/2009 09:28 PM, Christian Couder wrote:
> Le vendredi 20 mars 2009, David J. Mellor a écrit :
> 
> [...]
> 
>> @@ -94,14 +95,14 @@ the bisection state).
>>  Bisect visualize
>>  ~~~~~~~~~~~~~~~~
>>
>> -During the bisection process, you issue the command:
>> +To see the currently remaining suspects in 'gitk', the following command
>> +is issued during the bisection process:
> 
> I think it's better to avoid the passive tone, for example like this:
> 
> "To see the currently remaining suspects in 'gitk', you issue the following 
> command during the bisection process:"
> 
>>  ------------
>>  $ git bisect visualize
>>  ------------
> 
> [...]
> 
>> @@ -173,8 +175,8 @@ using the "'<commit1>'..'<commit2>'" notation. For
>> example: $ git bisect skip v2.5..v2.6
>>  ------------
>>
>> -would mean that no commit between `v2.5` excluded and `v2.6` included
>> -can be tested.
>> +The effect of this would be that no commit between `v2.5` excluded and
>> +`v2.6` included could be tested.
> 
> I'd prefer something like:
> 
> "This tells the bisect process that no commit between `v2.5` excluded and 
> `v2.6` included can be tested."
> 
> Otherwise it looks good to me.
> 
> Thanks,
> Christian.
> 
> 

I will send a patch correcting this in my next cycle of documentation 
patches. I should send them some time later today.

^ permalink raw reply

* [PATCH 1/4] test-suite: adding a test for fast-export with tag variants
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
  To: git; +Cc: gitster, Erik Faye-Lund

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
 t/t9302-fast-export-tags.sh |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 t/t9302-fast-export-tags.sh

diff --git a/t/t9302-fast-export-tags.sh b/t/t9302-fast-export-tags.sh
new file mode 100644
index 0000000..2ecac32
--- /dev/null
+++ b/t/t9302-fast-export-tags.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Erik Faye-Lund
+#
+
+test_description='git fast-export tag variants'
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+	touch dummy &&
+	git add dummy &&
+	git commit -m "initial commit" &&
+	HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
+	git tag    tree_tag        -m "tagging a tree" $HEAD_TREE &&
+	git tag -a tree_tag-obj    -m "tagging a tree" $HEAD_TREE &&
+	git tag    tag-obj_tag     -m "tagging a tag" tree_tag-obj &&
+	git tag -a tag-obj_tag-obj -m "tagging a tag" tree_tag-obj
+'
+
+test_expect_success 'tree_tag'        'git fast-export tree_tag'
+test_expect_success 'tree_tag-obj'    'git fast-export tree_tag-obj'
+test_expect_success 'tag-obj_tag'     'git fast-export tag-obj_tag'
+test_expect_success 'tag-obj_tag-obj' 'git fast-export tag-obj_tag-obj'
+
+test_done
-- 
1.6.2.1.226.gcb2dd

^ permalink raw reply related

* [PATCH 2/4] builtin-fast-export.c: turn error into warning
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
  To: git; +Cc: gitster, Erik Faye-Lund
In-Reply-To: <1237758620-6116-1-git-send-email-kusmabite@gmail.com>

fast-import doesn't have a syntax to support tree-objects (and some other
object-types), so fast-export shouldn't handle them. However, aborting the
operation is a bit drastic. This patch turns the error into a warning instead.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
 builtin-fast-export.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index fdf4ae9..02bad1f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -378,8 +378,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
 			}
 			break;
 		default:
-			die ("Unexpected object of type %s",
-			     typename(e->item->type));
+			warning("%s: Unexpected object of type %s, skipping.",
+			        e->name,
+			        typename(e->item->type));
+			continue;
 		}
 		if (commit->util)
 			/* more than one name for the same object */
-- 
1.6.2.1.226.gcb2dd

^ permalink raw reply related

* [PATCH 4/4] builtin-fast-export.c: handle nested tags
From: Erik Faye-Lund @ 2009-03-22 21:50 UTC (permalink / raw)
  To: git; +Cc: gitster, Erik Faye-Lund
In-Reply-To: <1237758620-6116-3-git-send-email-kusmabite@gmail.com>

When tags that points to tags are passed to fast-export, an error saying
"Tag [TAGNAME] points nowhere?". This fix calls parse_object() on the object
before referencing it's tag, to ensure the tag-info is fully initialized. In
addition, it inserts a comment to point out where nested tags are handled. This
is consistent with the comment for signed tags.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
 builtin-fast-export.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index c3ce320..8083c5f 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -362,7 +362,10 @@ static void get_tags_and_duplicates(struct object_array *pending,
 			break;
 		case OBJ_TAG:
 			tag = (struct tag *)e->item;
+
+			/* handle nested tags */
 			while (tag && tag->object.type == OBJ_TAG) {
+				parse_object(tag->object.sha1);
 				string_list_append(full_name, extra_refs)->util = tag;
 				tag = (struct tag *)tag->tagged;
 			}
-- 
1.6.2.1.226.gcb2dd

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox