Git development
 help / color / mirror / Atom feed
* Re: git diff bug?
From: Jeff King @ 2009-04-04  1:52 UTC (permalink / raw)
  To: David Abrahams; +Cc: git
In-Reply-To: <20090404014527.GA13350@coredump.intra.peff.net>

On Fri, Apr 03, 2009 at 09:45:27PM -0400, Jeff King wrote:

> This is as designed. The original file ("git show e7dd7db") contains (my
> numbering seems different than what git produces; it is produced by "nl"
> which is maybe treating some line endings differently earlier in the
> file):

Sorry, this was just me failing to use "nl" correctly. I needed to use
"-ba" to number empty lines. So the line numbers do match git, and the
rest of my explanation holds.

-Peff

^ permalink raw reply

* Re: [PATCH] Add custom memory allocator to MinGW and MacOS builds
From: Marius Storm-Olsen @ 2009-04-04  5:16 UTC (permalink / raw)
  To: patthoyts; +Cc: marius, git, msysgit
In-Reply-To: <a5b261830904031412o60b7eb4fv7e25a2ca4f89fe60@mail.gmail.com>


Pat Thoyts said the following on 03.04.2009 23:12:
> 2009/4/3 Marius Storm-Olsen <marius@trolltech.com>:
>> Marius Storm-Olsen said the following on 03.04.2009 15:52:
>>> The standard allocator on Windows is pretty bad prior to
>>> Windows Vista, and nedmalloc is better than the modified
>>> dlmalloc provided with newer versions of the MinGW libc.
>> Actually, it just struck me that it's probably the
>> synchronization primitives which are better on Vista than XP, and
>> not the memory manager? (Since mingw 4.3.3-tdm on XP and Vista
>> most likely use the same dlmalloc fork?) ^shrug^
>> 
>> Anyways, not that I haven't tried to 'tune' nedmalloc in any way,
>> just ensured that it compiles with the different MinGWs which I 
>> benchmarked. So, if anyone feels like it, maybe we can squeeze
>> more performance out of it by tweaking it.
> 
> The difference on Windows Vista is that the low fragmentation heap
> is the default memory allocator. On Windows XP you need to enable
> it specifically for an application. So a possible alternative to
> this is just to enable the low fragmentation heap. (done via
> GetProcessHeaps and HeapSetInformation Win32 API calls).

I know about the low-fragmentation heap, but given that it was only 
supported on XP and up (and given that I also had MacOSX in mind when 
considering a custom allocator; see MacOSX got 12% itself ;-), I 
didn't even consider it.
Thanks for clearing up the differences on the Vista and XP benchmarks 
though! Makes sense.

--
.marius

^ permalink raw reply

* Re: [msysGit] Re: [PATCH] Add custom memory allocator to MinGW and MacOS builds
From: Johannes Sixt @ 2009-04-04  6:35 UTC (permalink / raw)
  To: mstormo; +Cc: msysgit, patthoyts, marius, git
In-Reply-To: <49D6ED32.4000706@gmail.com>

On Samstag, 4. April 2009, Marius Storm-Olsen wrote:
> Pat Thoyts said the following on 03.04.2009 23:12:
> > The difference on Windows Vista is that the low fragmentation heap
> > is the default memory allocator. On Windows XP you need to enable
> > it specifically for an application. So a possible alternative to
> > this is just to enable the low fragmentation heap. (done via
> > GetProcessHeaps and HeapSetInformation Win32 API calls).
>
> I know about the low-fragmentation heap, but given that it was only
> supported on XP and up (and given that I also had MacOSX in mind when
> considering a custom allocator; see MacOSX got 12% itself ;-), I
> didn't even consider it.
> Thanks for clearing up the differences on the Vista and XP benchmarks
> though! Makes sense.

Wouldn't a GetProcessHeaps/HeapSetInformation solution add much less code, 
even with a runtime check whether the feature is supported?

The improvement that you observed is in a rather special area (repack). How is 
the improvment in day-to-day tools:

- procelains used on command line: git-status, git-add, git-commit, git-diff, 
git-log, perhaps even local git-fetch.

- plumbing used by guis: git-diff-files, git-diff-tree, git-log, git-rev-parse

- I'm not even mentioning git-am, git-rebase, because here the time sink is 
the fork emulation.

I doubt that the improvement is equally great, and it will perhaps vanish in 
the noise. 7000+ LOC is a bit much in this case, don't you think so?

BTW, I assume that the Boost license is compatible with GPL. But did you check 
that?

-- Hannes

^ permalink raw reply

* [PATCH 0/7] user-manual: general improvements
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras

This patch series tries to improve different areas of the user-manual,
including style and git configuration.

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.

Also, a new section 'Getting started' was added, which currently only deals
with git configuration. This allows other areas of the manual to be less
verbose on 'git config'.

Felipe Contreras (7):
  user-manual: remove some git-foo usage
  docbook: improve css style
  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 |   14 +-
 Documentation/user-manual.txt | 1034 +++++++++++++++++++++--------------------
 2 files changed, 543 insertions(+), 505 deletions(-)

^ permalink raw reply

* [PATCH 2/7] docbook: improve css style
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-2-git-send-email-felipe.contreras@gmail.com>

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

diff --git a/Documentation/docbook-xsl.css b/Documentation/docbook-xsl.css
index b878b38..e11c8f0 100644
--- a/Documentation/docbook-xsl.css
+++ b/Documentation/docbook-xsl.css
@@ -16,6 +16,7 @@ body blockquote {
 html body {
   margin: 1em 5% 1em 5%;
   line-height: 1.2;
+  font-family: sans-serif;
 }
 
 body div {
@@ -128,6 +129,15 @@ body pre {
 
 tt.literal, code.literal {
   color: navy;
+  font-family: sans-serif;
+}
+
+code.literal:before { content: "'"; }
+code.literal:after { content: "'"; }
+
+em {
+  font-style: italic;
+  color: #064;
 }
 
 div.literallayout p {
@@ -137,7 +147,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 +196,8 @@ dt {
 }
 
 dt span.term {
-  font-style: italic;
+  font-style: normal;
+  color: navy;
 }
 
 div.variablelist dd p {
-- 
1.6.2.2.404.ge96f3

^ permalink raw reply related

* [PATCH 1/7] user-manual: remove some git-foo usage
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-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.2.404.ge96f3

^ permalink raw reply related

* [PATCH 4/7] user-manual: use 'fast-forward' instead of 'fast forward'
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-4-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.2.404.ge96f3

^ permalink raw reply related

* [PATCH 5/7] user-manual: use SHA-1 instead of SHA1 or sha1
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-5-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.2.404.ge96f3

^ permalink raw reply related

* [PATCH 6/7] user-manual: add global config section
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-6-git-send-email-felipe.contreras@gmail.com>

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

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 3278aa7..a3032c7 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -40,6 +40,36 @@ without any explanation.
 Finally, see <<todo>> for ways that you can help make this manual more
 complete.
 
+[[getting-started]]
+Getting started
+=============
+
+Git's configuration is distributed among different locations--this manual will
+only to deal with 'global' and 'repository' variables, where 'repository'
+variables take precedence over 'global' ones.
+
+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.
+
+View and manually modify the configuration with the `--edit`
+option (which 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.2.404.ge96f3

^ permalink raw reply related

* [PATCH 7/7] user-manual: simplify the user configuration
From: Felipe Contreras @ 2009-04-04  9:38 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Felipe Contreras
In-Reply-To: <1238837909-3060-7-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 a3032c7..36568e5 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1011,13 +1011,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.2.404.ge96f3

^ permalink raw reply related

* git bisect issue
From: malc @ 2009-04-04  9:11 UTC (permalink / raw)
  To: git

Hello,

I was trying to run git bisect today and stumbled upon this:

$ git bisect start
error: pathspec 'bisect' did not match any file(s) known to git.

.git had some (stale?) BISECT_XXX files in it, and removing them
helped. One of those (BISECT_START) consisted of a single line:
"bisect". If i remember correctly i used to have a bisect branch
in this particular repo.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply

* [PATCH] doc/git-pack-refs: fix two grammar issues
From: Markus Heidelberg @ 2009-04-04 10:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git


Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 Documentation/git-pack-refs.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-pack-refs.txt b/Documentation/git-pack-refs.txt
index a5244d3..1ee99c2 100644
--- a/Documentation/git-pack-refs.txt
+++ b/Documentation/git-pack-refs.txt
@@ -26,7 +26,7 @@ problem by stashing the refs in a single file,
 traditional `$GIT_DIR/refs` hierarchy, it is looked up in this
 file and used if found.
 
-Subsequent updates to branches always creates new file under
+Subsequent updates to branches always create new files under
 `$GIT_DIR/refs` hierarchy.
 
 A recommended practice to deal with a repository with too many
@@ -35,7 +35,7 @@ occasionally run `git pack-refs \--prune`.  Tags are by
 definition stationary and are not expected to change.  Branch
 heads will be packed with the initial `pack-refs --all`, but
 only the currently active branch heads will become unpacked,
-and next `pack-refs` (without `--all`) will leave them
+and the next `pack-refs` (without `--all`) will leave them
 unpacked.
 
 
-- 
1.6.2.1.428.g41b20c

^ permalink raw reply related

* [EGIT PATCH] Select and show a newly created branch in the checkout dialog
From: Robin Rosenberg @ 2009-04-04 11:55 UTC (permalink / raw)
  To: spearce; +Cc: git, Robin Rosenberg

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../ui/internal/dialogs/BranchSelectionDialog.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
index cbbc384..1866086 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
@@ -150,6 +150,7 @@ private void fillTreeWithBranches(String select) throws IOException {
 		TreeItem curSubItem = null;
 		String curPrefix = null;
 		String curSubPrefix = null;
+		TreeItem itemToSelect = null;
 
 		for (String ref : branches) {
 			String shortName = ref;
@@ -217,7 +218,12 @@ public void widgetDisposed(DisposeEvent e) {
 			}
 			else item.setText(shortName);
 			if (ref.equals(select))
-				branchTree.select(item);
+				itemToSelect = item;
+			branchTree.setLinesVisible(true);
+		}
+		if (itemToSelect != null) {
+			branchTree.select(itemToSelect);
+			branchTree.showItem(itemToSelect);
 		}
 	}
 
-- 
1.6.2.1.345.g89fb

^ permalink raw reply related

* [PATCH] mergetool-lib: make (g)vimdiff workable under Windows
From: Markus Heidelberg @ 2009-04-04 13:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David Aguilar, Charles Bailey, msysgit

Under Windows vimdiff and gvimdiff are not available as symbolic links,
but as batch files vimdiff.bat and gvimdiff.bat. These files weren't
found by 'type vimdiff' which led to the following error:

    The merge tool vimdiff is not available as 'vimdiff'

Even if they were found, it wouldn't work to invoke these batch files
from git-mergetool.

To solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d
command line switch over to them.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---

This patch goes on top of the current difftool/mergetool patches from David.
This is 'da/difftool' in the current 'pu' and in addition:
[PATCH] mergetool-lib: refactor run_mergetool and check_unchanged
[PATCH] mergetool-lib: specialize opendiff options when in diff mode

 git-mergetool--lib.sh |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index b8566b2..6f0e8f7 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -11,6 +11,12 @@ get_merge_tool_path () {
 	path="$1"
 	if test -z "$2"; then
 		case "$1" in
+		vimdiff)
+			path=vim
+			;;
+		gvimdiff)
+			path=gvim
+			;;
 		emerge)
 			path=emacs
 			;;
@@ -142,19 +148,19 @@ run_mergetool () {
 	vimdiff)
 		if merge_mode; then
 			touch "$BACKUP"
-			"$merge_tool_path" -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
+			"$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
 			check_unchanged
 		else
-			"$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE"
+			"$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$REMOTE"
 		fi
 		;;
 	gvimdiff)
 		if merge_mode; then
 			touch "$BACKUP"
-			"$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$MERGED" "$REMOTE"
+			"$merge_tool_path" -d -c "wincmd l" -f "$LOCAL" "$MERGED" "$REMOTE"
 			check_unchanged
 		else
-			"$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE"
+			"$merge_tool_path" -d -c "wincmd l" -f "$LOCAL" "$REMOTE"
 		fi
 		;;
 	xxdiff)
-- 
1.6.2.2.428.gea44ab

^ permalink raw reply related

* [PATCH] mergetool-lib: add new merge tool TortoiseMerge
From: Markus Heidelberg @ 2009-04-04 13:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, David Aguilar, Charles Bailey, msysgit

TortoiseMerge comes with TortoiseSVN or TortoiseGit for Windows. It can
only be used as a merge tool with an existing base file. It cannot be
used without a base nor as a diff tool.

The documentation only mentions the slash '/' as command line option
prefix, which refused to work, but the parser also accepts the dash '-'

See http://code.google.com/p/msysgit/issues/detail?id=226

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---

This patch goes on top of the current difftool/mergetool patches from David.
This is 'da/difftool' in the current 'pu' and in addition:
[PATCH] mergetool-lib: refactor run_mergetool and check_unchanged
[PATCH] mergetool-lib: specialize opendiff options when in diff mode

I couldn't recognize a special order so I put tortoisemerge at the end
of the list.

 git-mergetool--lib.sh |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 6f0e8f7..4ad2cb5 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -51,10 +51,13 @@ check_unchanged () {
 
 valid_tool () {
 	case "$1" in
-	kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse)
+	kdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse | tortoisemerge)
 		if test "$1" = "kompare" && ! diff_mode; then
 			return 1
 		fi
+		if test "$1" = "tortoisemerge" && ! merge_mode; then
+			return 1
+		fi
 		;; # happy
 	*)
 		if test -z "$(get_custom_cmd "$1")"; then
@@ -225,6 +228,16 @@ run_mergetool () {
 		fi
 		status=$?
 		;;
+	tortoisemerge)
+		if $base_present; then
+			touch "$BACKUP"
+			"$merge_tool_path" -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"
+			check_unchanged
+		else
+			echo "TortoiseMerge cannot be used without a base" 1>&2
+			status=1
+		fi
+		;;
 	*)
 		if test -n "$merge_tool_cmd"; then
 			if merge_mode &&
-- 
1.6.2.2.428.gea44ab

^ permalink raw reply related

* [PATCH 1/2] git-repack: use non-dashed update-server-info
From: Dan McGee @ 2009-04-04 16:59 UTC (permalink / raw)
  To: git; +Cc: Dan McGee

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 git-repack.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-repack.sh b/git-repack.sh
index 1782a23..0868734 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -181,5 +181,5 @@ fi
 
 case "$no_update_info" in
 t) : ;;
-*) git-update-server-info ;;
+*) git update-server-info ;;
 esac
-- 
1.6.2.2.404.ge96f3.dirty

^ permalink raw reply related

* [PATCH 2/2] pack-objects: report actual number of threads to be used
From: Dan McGee @ 2009-04-04 16:59 UTC (permalink / raw)
  To: git; +Cc: Dan McGee
In-Reply-To: <1238864396-8964-1-git-send-email-dpmcgee@gmail.com>

In the case of a small repository, pack-objects is smart enough to not start
more threads than necessary. However, the output to the user always reports
the value of the pack.threads configuration and not the real number of
threads to be used. This is easily fixed by moving the printing of the
message after we have partitioned our work.

(pack.threads is on autodetect and would be set to 4)
$ git-repack -a -d -f
Counting objects: 55, done.
Delta compression using 2 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (55/55), done.
Total 55 (delta 10), reused 0 (delta 0)

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 builtin-pack-objects.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 9fc3b35..8c1b036 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1611,9 +1611,6 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
 		find_deltas(list, &list_size, window, depth, processed);
 		return;
 	}
-	if (progress > pack_to_stdout)
-		fprintf(stderr, "Delta compression using %d threads.\n",
-				delta_search_threads);
 
 	/* Partition the work amongst work threads. */
 	for (i = 0; i < delta_search_threads; i++) {
@@ -1638,11 +1635,18 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
 		p[i].list = list;
 		p[i].list_size = sub_size;
 		p[i].remaining = sub_size;
+		if(sub_size)
+			active_threads++;
 
 		list += sub_size;
 		list_size -= sub_size;
 	}
 
+	if (progress > pack_to_stdout)
+		fprintf(stderr, "Delta compression using %d threads.\n",
+				active_threads);
+	active_threads = 0;
+
 	/* Start work threads. */
 	for (i = 0; i < delta_search_threads; i++) {
 		if (!p[i].list_size)
-- 
1.6.2.2.404.ge96f3.dirty

^ permalink raw reply related

* git send-email prompting too much
From: Dan McGee @ 2009-04-04 17:02 UTC (permalink / raw)
  To: git

I'm guessing this is related to commit
6e1825186bd052fc1f77b7c8c9a31fbb9a67d90c but I haven't bisected yet.
Having to hit enter 10 times ad the Message-ID prompt seemed a bit odd
to me. Has anyone else seen this behavior?

dmcgee@galway ~/projects/git (working)
$ git send-email 000*
0001-git-repack-use-non-dashed-update-server-info.patch
0002-pack-objects-report-actual-number-of-threads-to-be.patch
Who should the emails appear to be from? [Dan McGee <dpmcgee@gmail.com>]
Emails will be sent from: Dan McGee <dpmcgee@gmail.com>
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
Message-ID to be used as In-Reply-To for the first email?
(mbox) Adding cc: Dan McGee <dpmcgee@gmail.com> from line 'From: Dan
McGee <dpmcgee@gmail.com>'
(body) Adding cc: Dan McGee <dpmcgee@gmail.com> from line
'Signed-off-by: Dan McGee <dpmcgee@gmail.com>'

From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH 1/2] git-repack: use non-dashed update-server-info
Date: Sat,  4 Apr 2009 11:59:55 -0500
Message-Id: <1238864396-8964-1-git-send-email-dpmcgee@gmail.com>
X-Mailer: git-send-email 1.6.2.2.404.ge96f3.dirty

    The Cc list above has been expanded by additional
    addresses found in the patch commit message. By default
    send-email prompts before sending whenever this occurs.
    This behavior is controlled by the sendemail.confirm
    configuration setting.

    For additional information, run 'git send-email --help'.
    To retain the current behavior, but squelch this message,
    run 'git config --global sendemail.confirm auto'.

Send this email? ([y]es|[n]o|[q]uit|[a]ll): a
OK. Log says:
Sendmail: /usr/bin/msmtp -i git@vger.kernel.org dpmcgee@gmail.com
From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH 1/2] git-repack: use non-dashed update-server-info
Date: Sat,  4 Apr 2009 11:59:55 -0500
Message-Id: <1238864396-8964-1-git-send-email-dpmcgee@gmail.com>
X-Mailer: git-send-email 1.6.2.2.404.ge96f3.dirty

Result: OK
(mbox) Adding cc: Dan McGee <dpmcgee@gmail.com> from line 'From: Dan
McGee <dpmcgee@gmail.com>'
(body) Adding cc: Dan McGee <dpmcgee@gmail.com> from line
'Signed-off-by: Dan McGee <dpmcgee@gmail.com>'
OK. Log says:
Sendmail: /usr/bin/msmtp -i git@vger.kernel.org dpmcgee@gmail.com
From: Dan McGee <dpmcgee@gmail.com>
To: git@vger.kernel.org
Cc: Dan McGee <dpmcgee@gmail.com>
Subject: [PATCH 2/2] pack-objects: report actual number of threads to be used
Date: Sat,  4 Apr 2009 11:59:56 -0500
Message-Id: <1238864396-8964-2-git-send-email-dpmcgee@gmail.com>
X-Mailer: git-send-email 1.6.2.2.404.ge96f3.dirty
In-Reply-To: <1238864396-8964-1-git-send-email-dpmcgee@gmail.com>
References: <1238864396-8964-1-git-send-email-dpmcgee@gmail.com>

Result: OK

^ permalink raw reply

* Re: git send-email prompting too much
From: Bruce Stephens @ 2009-04-04 17:12 UTC (permalink / raw)
  To: Dan McGee; +Cc: git
In-Reply-To: <449c10960904041002s22124b74k8440af216b1de9ee@mail.gmail.com>

Dan McGee <dpmcgee@gmail.com> writes:

> I'm guessing this is related to commit
> 6e1825186bd052fc1f77b7c8c9a31fbb9a67d90c but I haven't bisected yet.
> Having to hit enter 10 times ad the Message-ID prompt seemed a bit odd
> to me. Has anyone else seen this behavior?

Yes.  Apparently one uses \C-d now.

[...]

^ permalink raw reply

* Re: [PATCH 2/2] pack-objects: report actual number of threads to be used
From: Jeff King @ 2009-04-04 18:06 UTC (permalink / raw)
  To: Dan McGee; +Cc: git
In-Reply-To: <1238864396-8964-2-git-send-email-dpmcgee@gmail.com>

On Sat, Apr 04, 2009 at 11:59:56AM -0500, Dan McGee wrote:

> In the case of a small repository, pack-objects is smart enough to not start
> more threads than necessary. However, the output to the user always reports
> the value of the pack.threads configuration and not the real number of
> threads to be used. This is easily fixed by moving the printing of the
> message after we have partitioned our work.
> 
> (pack.threads is on autodetect and would be set to 4)
> $ git-repack -a -d -f
> Counting objects: 55, done.
> Delta compression using 2 threads.
> Compressing objects: 100% (48/48), done.
> Writing objects: 100% (55/55), done.
> Total 55 (delta 10), reused 0 (delta 0)

That makes sense to me, though I wonder if it may confuse and frustrate
users who are expecting their awesome quad-core machine to be using 4
threads when it only uses 2. Is it worth printing both values, or some
indicator that we could have been using more?

-Peff

^ permalink raw reply

* Re: [PATCH 2/2] pack-objects: report actual number of threads to be  used
From: Dan McGee @ 2009-04-04 18:20 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20090404180601.GA14888@coredump.intra.peff.net>

On Sat, Apr 4, 2009 at 1:06 PM, Jeff King <peff@peff.net> wrote:
> On Sat, Apr 04, 2009 at 11:59:56AM -0500, Dan McGee wrote:
>
>> In the case of a small repository, pack-objects is smart enough to not start
>> more threads than necessary. However, the output to the user always reports
>> the value of the pack.threads configuration and not the real number of
>> threads to be used. This is easily fixed by moving the printing of the
>> message after we have partitioned our work.
>>
>> (pack.threads is on autodetect and would be set to 4)
>> $ git-repack -a -d -f
>> Counting objects: 55, done.
>> Delta compression using 2 threads.
>> Compressing objects: 100% (48/48), done.
>> Writing objects: 100% (55/55), done.
>> Total 55 (delta 10), reused 0 (delta 0)
>
> That makes sense to me, though I wonder if it may confuse and frustrate
> users who are expecting their awesome quad-core machine to be using 4
> threads when it only uses 2. Is it worth printing both values, or some
> indicator that we could have been using more?

I thought of this, but decided it wasn't really worth it. The default
window size of 10 makes it a very rare case that you will use fewer
than 4 threads. With the default, each thread needs a minimum of 20
objects, so even a 100-object repository would spawn the 4 threads.

I wouldn't be opposed to printing something special when
active_threads != delta_search_threads if other people do think it to
be necessary though.

-Dan

^ permalink raw reply

* [PATCH] revision.h: add includes of "diff.h" and "commit.h"
From: Christian Couder @ 2009-04-04 19:45 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jeff King, Nathaniel P Dawson, Johannes Sixt

Because they are needed by some features included in
"revision.h".

This makes the following just work:

        $ cat >1.c <<\EOF
        #include "cache.h"
        #include "revision.h"
        EOF
        $ cc -Wall -DSHA1_HEADER='<openssl/sha.h>' -c 1.c

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 revision.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/revision.h b/revision.h
index 5adfc91..495d7eb 100644
--- a/revision.h
+++ b/revision.h
@@ -3,6 +3,8 @@
 
 #include "parse-options.h"
 #include "grep.h"
+#include "diff.h"
+#include "commit.h"
 
 #define SEEN		(1u<<0)
 #define UNINTERESTING   (1u<<1)
-- 
1.6.2.1.530.g516a7.dirty

^ permalink raw reply related

* Re: git bisect issue
From: Christian Couder @ 2009-04-04 19:48 UTC (permalink / raw)
  To: malc; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0904041307360.10230@linmac.oyster.ru>

Hi,

Le samedi 4 avril 2009, malc@pulsesoft.com a écrit :
> Hello,
>
> I was trying to run git bisect today and stumbled upon this:
>
> $ git bisect start
> error: pathspec 'bisect' did not match any file(s) known to git.
>
> .git had some (stale?) BISECT_XXX files in it, and removing them
> helped. One of those (BISECT_START) consisted of a single line:
> "bisect". If i remember correctly i used to have a bisect branch
> in this particular repo.

When you start bisecting, the current branch is saved in .git/BISECT_START 
so if you started a bisection in a branch named "bisect", then "bisect" was 
saved in ".git/BISECT_START". Then you probably didn't use "git bisect 
reset" to stop bisecting, so the .git/BISECT_START file was not removed.

You probably deleted the "bisect" branch and later when you started a new 
bisection, "git bisect" found the .git/BISECT_START file, so it thought 
that you were currently bisecting.

It then tryed to abort the previous bisection by going back to branch saved 
in the .git/BISECT_START file, and that failed with the error message you 
saw.

The error message could perhaps be improved with this patch:

diff --git a/git-bisect.sh b/git-bisect.sh
index e313bde..093736c 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -77,7 +77,7 @@ bisect_start() {
        then
                # Reset to the rev from where we started.
                start_head=$(cat "$GIT_DIR/BISECT_START")
-               git checkout "$start_head" || exit
+               git checkout "$start_head" -- || exit
        else
                # Get rev from where we start.
                case "$head" in

it will give the following error message instead of the one you saw:

fatal: invalid reference: bisect

Regards,
Christian.

^ permalink raw reply related

* [PATCH] bisect: improve error message when branch checkout fails
From: Christian Couder @ 2009-04-04 20:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, malc

In "git-bisect.sh" the "git checkout" command is only used to
change the current branch, but it is used like this:

git checkout "$branch"

which will output the following misleading error message when
it fails:

error: pathspec 'foo' did not match any file(s) known to git.

This patch change the way we use "git checkout" like this:

git checkout "$branch" --

so that we will get the following error message:

fatal: invalid reference: foo

which is better.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index e313bde..df0ae63 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -77,7 +77,7 @@ bisect_start() {
 	then
 		# Reset to the rev from where we started.
 		start_head=$(cat "$GIT_DIR/BISECT_START")
-		git checkout "$start_head" || exit
+		git checkout "$start_head" -- || exit
 	else
 		# Get rev from where we start.
 		case "$head" in
@@ -370,7 +370,7 @@ bisect_checkout() {
 	_msg="$2"
 	echo "Bisecting: $_msg"
 	mark_expected_rev "$_rev"
-	git checkout -q "$_rev" || exit
+	git checkout -q "$_rev" -- || exit
 	git show-branch "$_rev"
 }
 
@@ -549,7 +549,7 @@ bisect_reset() {
 	*)
 	    usage ;;
 	esac
-	git checkout "$branch" && bisect_clean_state
+	git checkout "$branch" -- && bisect_clean_state
 }
 
 bisect_clean_state() {
-- 
1.6.2.2.404.ge96f3.dirty

^ permalink raw reply related

* [PATCH 0/4] start refactoring binary search function
From: Christian Couder @ 2009-04-04 20:59 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes Schindelin

There are many binary search functions in the code base and I have been
asked to refactor them in these message:

http://thread.gmane.org/gmane.comp.version-control.git/105363/focus=105436
http://thread.gmane.org/gmane.comp.version-control.git/114735/focus=115391

so here is a start

The following patch applies on top of pu where they can be squashed into other
patches:

  sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1
  patch-ids: use the new generic "sha1_pos" function to lookup sha1
  bisect: use the new generic "sha1_pos" function to lookup sha1
  replace_object: use the new generic "sha1_pos" function to lookup
    sha1

 bisect.c         |   23 +++++-------
 patch-ids.c      |   93 +++-----------------------------------------------
 replace_object.c |   24 +++++--------
 sha1-lookup.c    |  101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sha1-lookup.h    |    7 ++++
 5 files changed, 131 insertions(+), 117 deletions(-)

^ permalink raw reply


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