* Re: bug: git-repack -a -d produces broken pack on NFS
From: Alex Riesen @ 2006-04-28 22:27 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0604271500500.3701@g5.osdl.org>
Linus Torvalds, Fri, Apr 28, 2006 00:11:13 +0200:
> > NFS server: 2.6.15
> > Client: 2.6.17-rc2
> > mount options: tigra:/home /net/home nfs rw,nosuid,nodev,noatime,vers=3,rsize=8192,wsize=32768,hard,intr,proto=udp,timeo=7,retrans=3,addr=tigra 0 0
>
> It's repeatable? Can you check if it goes away if your remove "intr"?
It does not go away if I remove intr:
$ grep 'nfs\>' /proc/mounts
tigra:/home /net/home nfs rw,nosuid,nodev,noatime,vers=3,rsize=8192,wsize=32768,hard,proto=udp,timeo=7,retrans=3,addr=tigra 0 0
And this is really a broken packfile:
$ git fsck-objects --full
git-fsck-objects: error: Packfile .git/objects/pack/pack-9021635f04e29bb9f3313a54124f64589eca5764.pack SHA1 mismatch with itself
git-fsck-objects: fatal: failed to read delta-pack base object a23816d3e9a1684794c8e5a8f1cc0cce26fb61d8
And I actually was kind of sure about the hardware (like in: "it
worked flawlessly for in the past 2 years"). Until looked today in the
logs and saw this:
Apr 19 11:49:35 tigra kernel: eth1: tx underrun with maximum tx threshold, txcfg 0xd0f0102e.
Apr 19 11:49:35 tigra kernel: eth1: Link wake-up event 0xffffffff
Apr 19 11:49:35 tigra kernel: eth1: PCI error 0xf00000
Well, this is actually not _that_ day. And this:
Apr 28 23:42:19 tigra kernel: eth1: tx underrun with maximum tx threshold, txcfg 0xd0f0102e.
is not exactly the time of most recent test (the one without the "hard"
mount option). But this _is_ that very same interface, and "PCI error"
looks nasty. Ok, looking at the card... Seats kinda skewed in the
slot, pressing on it... Wow! (lights go out):
Apr 29 00:13:35 tigra kernel: eth1: Link wake-up event 0x00020b
Apr 29 00:13:35 tigra kernel: eth1: PCI error 0xf00000
Apr 29 00:13:39 tigra kernel: NETDEV WATCHDOG: eth1: transmit timed out
Apr 29 00:13:39 tigra kernel: eth1: Transmit timed out, status 0x000000, resetting...
Apr 29 00:13:39 tigra kernel: eth1: DSPCFG accepted after 0 usec.
Apr 29 00:13:39 tigra kernel: eth1: Setting full-duplex based on negotiated link capability.
Redoing test... (Two times only, it's late already):
$SRC/test2.git$ git repack -a -d
Generating pack...
Done counting 235775 objects.
Deltifying 235775 objects.
100% (235775/235775) done
Writing 235775 objects.
100% (235775/235775) done
Total 235775, written 235775 (delta 181885), reused 223766 (delta 171462)
Pack pack-9021635f04e29bb9f3313a54124f64589eca5764 created.
$SRC/test2.git$ git fsck-objects --full
dangling blob 419301f9bff67932cb9551f2d8436b277a3022b0
$SRC/test2.git$ git repack -a -d
Generating pack...
Done counting 235775 objects.
Deltifying 235775 objects.
100% (235775/235775) done
Writing 235775 objects.
100% (235775/235775) done
Total 235775, written 235775 (delta 181958), reused 235702 (delta 181885)
Pack pack-9021635f04e29bb9f3313a54124f64589eca5764 created.
$SRC/test2.git$ git fsck-objects --full
dangling blob 419301f9bff67932cb9551f2d8436b277a3022b0
Hmm... Ok, apologies everyone, I'm just lazy and stupid.
Still, would be nice not to loose a repository just because
user is an idiot.
^ permalink raw reply
* Re: Two gitweb feature requests
From: Jakub Narebski @ 2006-04-28 19:11 UTC (permalink / raw)
To: git
In-Reply-To: <Pine.LNX.4.64.0604281116020.3701@g5.osdl.org>
Linus Torvalds wrote:
> On Fri, 28 Apr 2006, Jakub Narebski wrote:
>>
>> I'd like to have 'parent directory' link for trees ('..' link) at the top
>> of it's contents. I know it is possible to use browser history for that,
>> but it would give greater similarity with 'directory listing' mode of WWW
>> servers.
>
> Well, a git "tree" doesn't actually _have_ a parent. It potentially has
> multiple.
I have forgot about that. Sorry for the noise, then.
[...]
> So you do need that "browser history" one way or another. Either in the
> browser (use the "back button") or by encoding the "how did we get here"
> information in the URI and the dynamically generated page content.
Or use JavaScript via <a href="javascript:history.go(-1)">..</a>
But that wouldn't help me, because when I open the link in new window (new
tab), the new window (new tab) doesn't inherit history from parent... so
browser's "back" button doesn't work. Ah, well...
> The downside is that you'd have two different web-pages for the same tree
> depending on which commit it came from. Which is not a downside from a
> user perspective, but it's a downside from a caching/server perspective,
> since it means less reuse of pages (maybe gitweb already does that,
> though).
Perhaps if "how we get there" information was encoded via POST... but I
don't know if there would be the difference in caching c.f. GET (encoding
in URI).
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* Re: Two gitweb feature requests
From: Linus Torvalds @ 2006-04-28 18:23 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e2tjqm$83n$1@sea.gmane.org>
On Fri, 28 Apr 2006, Jakub Narebski wrote:
>
> I'd like to have 'parent directory' link for trees ('..' link) at the top of
> it's contents. I know it is possible to use browser history for that, but
> it would give greater similarity with 'directory listing' mode of WWW
> servers.
Well, a git "tree" doesn't actually _have_ a parent. It potentially has
multiple.
So to get to "a parent", you literally do need to keep track of how you
got to the tree. Which is certainly possible (maybe it even ends up being
in the URI that gitk generates, I didn't check), but basically, if it
isn't tracked explicitly, it basically is impossible to find.
Not having back-pointers is what allows git to do data sharing and a lot
of other things efficiently. A tree is a tree is a tree, and has zero data
about what points to it, so as long as the _contents_ of a tree are the
same, you have exactly the same object. That means that the same subtree
can - and will - be pointed to by multiple upper-level trees and commits.
So you do need that "browser history" one way or another. Either in the
browser (use the "back button") or by encoding the "how did we get here"
information in the URI and the dynamically generated page content.
The downside is that you'd have two different web-pages for the same tree
depending on which commit it came from. Which is not a downside from a
user perspective, but it's a downside from a caching/server perspective,
since it means less reuse of pages (maybe gitweb already does that,
though).
Linus
^ permalink raw reply
* Re: Two gitweb feature requests
From: Jakub Narebski @ 2006-04-28 17:37 UTC (permalink / raw)
To: git
In-Reply-To: <1146144425.11909.450.camel@pmac.infradead.org>
I'd like to have 'parent directory' link for trees ('..' link) at the top of
it's contents. I know it is possible to use browser history for that, but
it would give greater similarity with 'directory listing' mode of WWW
servers.
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* Re: Two gitweb feature requests
From: sean @ 2006-04-28 16:26 UTC (permalink / raw)
To: David Woodhouse; +Cc: kay.sievers, git
In-Reply-To: <1146144425.11909.450.camel@pmac.infradead.org>
On Thu, 27 Apr 2006 14:27:05 +0100
David Woodhouse <dwmw2@infradead.org> wrote:
> First... When publishing trees, I currently give both the git:// URL for
> people who want to pull the tree, and the http:// URL to gitweb for
> those who just want to browse.
>
> It would be useful if I could get away with giving just one URL --
> probably the http:// one to gitweb. If gitweb were to have a mode in
> which it gave a referral to the git:// URL, and if the git tools would
> use that, then that would work well.
This sounds like a good idea.
> Secondly, it would be useful if gitweb would list the branches in a
> repository and allow each of them to be viewed in the same way as it
> does the master branch.
At the bottom of the Summary page it already lists the branches,
underneath the tags.
Sean
^ permalink raw reply
* [PATCH]: Allow misc https cert for git-svnimport
From: P. Christeas @ 2006-04-28 15:01 UTC (permalink / raw)
To: Eric Wong, git
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
Just had to access a server with a broken certificate (self signed), so I
added that patch to git-svnimport.
[-- Attachment #2: git-svnimport-ssl.patch --]
[-- Type: text/x-diff, Size: 2265 bytes --]
--- /usr/bin/git-svnimport 2006-04-13 09:39:39.000000000 +0300
+++ /home/panos/bin/git-svnimport 2006-04-28 17:55:45.000000000 +0300
@@ -96,9 +96,14 @@
sub conn {
my $self = shift;
my $repo = $self->{'fullrep'};
- my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider,
+# my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider,
+# SVN::Client::get_ssl_server_trust_file_provider,
+# SVN::Client::get_ssl_server_trust_prompt_provider(\&_trust_callback),
+# SVN::Client::get_username_provider]);
+ my $auth = [SVN::Client::get_simple_provider,
SVN::Client::get_ssl_server_trust_file_provider,
- SVN::Client::get_username_provider]);
+ SVN::Client::get_ssl_server_trust_prompt_provider(\&_trust_callback),
+ SVN::Client::get_username_provider];
my $s = SVN::Ra->new(url => $repo, auth => $auth);
die "SVN connection to $repo: $!\n" unless defined $s;
$self->{'svn'} = $s;
@@ -125,6 +130,45 @@
return $name;
}
+sub _trust_callback {
+ my ($cred,$realm,$ifailed,$server_cert_info,$may_save) = @_;
+ #$cred->accepted_failures($SVN::Auth::SSL::UNKNOWNCA);
+ print "SSL certificate is not trusted: $ifailed \n";
+ print "Fingerprint: " . $server_cert_info->fingerprint . "\n";
+ print "Hostname: ". $server_cert_info->hostname ;
+ print " (MISMATCH)" if ( $ifailed & $SVN::Auth::SSL::CNMISMATCH);
+ print "\n";
+
+ print "Valid from: ". $server_cert_info->valid_from;
+ print " (NOT YET)" if ( $ifailed & $SVN::Auth::SSL::NOTYETVALID);
+ print "\n";
+
+ print "Valid until: ". $server_cert_info->valid_until;
+ print " (EXPIRED)" if ( $ifailed & $SVN::Auth::SSL::EXPIRED);
+ print "\n";
+
+ print "Issuer: ". $server_cert_info->issuer_dname;
+ print " (UNKNOWN)" if ( $ifailed & $SVN::Auth::SSL::UNKNOWNCA);
+ print "\n\n";
+
+ print "Do you still want to accept that certificate? [y/N] ";
+ my $accept = <STDIN>;
+ chomp($accept);
+ print "\n";
+ if (($accept eq "y") or ($accept eq "Y" )) {
+ $cred->accepted_failures($ifailed);
+ # print "Save cert, so that it is accepted in future calls? [y/N] ";
+ # my $mmsave = <STDIN>;
+ # chomp($mmsave);
+ # if (($mmsave eq "y") or ($mmsave eq "Y" )) {
+ # $may_save = 1;
+ # }
+ print "\n";
+ }
+
+}
+
+
package main;
use URI;
^ permalink raw reply
* Re: Fix asciidoc callouts in git man pages
From: sean @ 2006-04-28 14:15 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
In-Reply-To: <e2t7f6$p1i$1@sea.gmane.org>
On Fri, 28 Apr 2006 16:06:06 +0200
Jakub Narebski <jnareb@gmail.com> wrote:
> Have you sent bugreport/patch to the authors of asciidoc, by the way?
Have now ;o) My xsl skills probably won't impress them any, but perhaps
they'll put some time into including the feature in a future release.
Cheers,
Sean
^ permalink raw reply
* Re: Fix asciidoc callouts in git man pages
From: Jakub Narebski @ 2006-04-28 14:06 UTC (permalink / raw)
To: git
In-Reply-To: <BAYC1-PASMTP1046BB48C01D83AC57A694AEB20@CEZ.ICE>
<opublikowany i wysłany>
Sean Estabrooks wrote:
> Started out just wanting to update the git-branch man page
> to include the "-r" option but noticed that the asciidoc
> callouts weren't being rendered in its man page. Then
> noticed the same was true for all the man pages where
> they are used.
>
> It turns out we've not been following the guidelines
> properly on how to use them. The fact that they show up
> in a useful way in the html docs is really an accident.
> Even there they're not showing up as intended.
>
> Unfortunately, even after all the docs are fixed up to use
> the proper format, they still don't render properly in the
> man format. Seems this is a missing feature in the "xmlto"
> command.
>
> The final patch in this series adds an xsl fragment which
> is passed to xmlto so that the callouts appear properly in
> the man pages.
Have you sent bugreport/patch to the authors of asciidoc, by the way?
--
Jakub Narebski
Warsaw, Poland
^ permalink raw reply
* [PATCH] Fix up remaining man pages that use asciidoc "callouts".
From: Sean Estabrooks @ 2006-04-28 13:15 UTC (permalink / raw)
To: git; +Cc: Sean Estabrooks
In-Reply-To: <11462301063885-git-send-email-seanlkml@sympatico.ca>
Unfortunately docbook does not allow a callout to be
referenced from inside a callout list description.
Rewrite one paragraph in git-reset man page to work
around this limitation.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
Documentation/everyday.txt | 45 +++++++++++------------
Documentation/git-checkout.txt | 18 +++++----
Documentation/git-diff.txt | 38 ++++++++++---------
Documentation/git-init-db.txt | 8 ++--
Documentation/git-reset.txt | 72 ++++++++++++++++++------------------
Documentation/git-update-index.txt | 31 ++++++++--------
6 files changed, 104 insertions(+), 108 deletions(-)
481f9838c408f36fe74a44197865b54842174546
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index 3ab9b91..4b56370 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -61,7 +61,8 @@ Check health and remove cruft.::
$ git count-objects <2>
$ git repack <3>
$ git prune <4>
-
+------------
++
<1> running without "--full" is usually cheap and assures the
repository health reasonably well.
<2> check how many loose objects there are and how much
@@ -69,17 +70,16 @@ diskspace is wasted by not repacking.
<3> without "-a" repacks incrementally. repacking every 4-5MB
of loose objects accumulation may be a good rule of thumb.
<4> after repack, prune removes the duplicate loose objects.
-------------
Repack a small project into single pack.::
+
------------
$ git repack -a -d <1>
$ git prune
-
+------------
++
<1> pack all the objects reachable from the refs into one pack
and remove unneeded other packs
-------------
Individual Developer (Standalone)[[Individual Developer (Standalone)]]
@@ -129,10 +129,10 @@ Extract a tarball and create a working t
$ git add . <1>
$ git commit -m 'import of frotz source tree.'
$ git tag v2.43 <2>
-
+------------
++
<1> add everything under the current directory.
<2> make a lightweight, unannotated tag.
-------------
Create a topic branch and develop.::
+
@@ -153,7 +153,8 @@ Create a topic branch and develop.::
$ git pull . alsa-audio <10>
$ git log --since='3 days ago' <11>
$ git log v2.43.. curses/ <12>
-
+------------
++
<1> create a new topic branch.
<2> revert your botched changes in "curses/ux_audio_oss.c".
<3> you need to tell git if you added a new file; removal and
@@ -170,7 +171,6 @@ you originally wrote.
combined and include --max-count=10 (show 10 commits), --until='2005-12-10'.
<12> view only the changes that touch what's in curses/
directory, since v2.43 tag.
-------------
Individual Developer (Participant)[[Individual Developer (Participant)]]
@@ -208,7 +208,8 @@ Clone the upstream and work on it. Feed
$ git reset --hard ORIG_HEAD <6>
$ git prune <7>
$ git fetch --tags <8>
-
+------------
++
<1> repeat as needed.
<2> extract patches from your branch for e-mail submission.
<3> "pull" fetches from "origin" by default and merges into the
@@ -221,7 +222,6 @@ area we are interested in.
<7> garbage collect leftover objects from reverted pull.
<8> from time to time, obtain official tags from the "origin"
and store them under .git/refs/tags/.
-------------
Push into another repository.::
@@ -239,7 +239,8 @@ satellite$ git push origin <4>
mothership$ cd frotz
mothership$ git checkout master
mothership$ git pull . satellite <5>
-
+------------
++
<1> mothership machine has a frotz repository under your home
directory; clone from it to start a repository on the satellite
machine.
@@ -252,7 +253,6 @@ to local "origin" branch.
mothership machine. You could use this as a back-up method.
<5> on mothership machine, merge the work done on the satellite
machine into the master branch.
-------------
Branch off of a specific tag.::
+
@@ -262,12 +262,12 @@ Branch off of a specific tag.::
$ git checkout master
$ git format-patch -k -m --stdout v2.6.14..private2.6.14 |
git am -3 -k <2>
-
+------------
++
<1> create a private branch based on a well known (but somewhat behind)
tag.
<2> forward port all changes in private2.6.14 branch to master branch
without a formal "merging".
-------------
Integrator[[Integrator]]
@@ -317,7 +317,8 @@ My typical GIT day.::
$ git fetch ko && git show-branch master maint 'tags/ko-*' <11>
$ git push ko <12>
$ git push ko v0.99.9x <13>
-
+------------
++
<1> see what I was in the middle of doing, if any.
<2> see what topic branches I have and think about how ready
they are.
@@ -346,7 +347,6 @@ In the output from "git show-branch", "m
everything "ko-master" has.
<12> push out the bleeding edge.
<13> push the tag out, too.
-------------
Repository Administration[[Repository Administration]]
@@ -367,7 +367,6 @@ example of managing a shared central rep
Examples
~~~~~~~~
-
Run git-daemon to serve /pub/scm from inetd.::
+
------------
@@ -388,13 +387,13 @@ cindy:x:1002:1002::/home/cindy:/usr/bin/
david:x:1003:1003::/home/david:/usr/bin/git-shell
$ grep git /etc/shells <2>
/usr/bin/git-shell
-
+------------
++
<1> log-in shell is set to /usr/bin/git-shell, which does not
allow anything but "git push" and "git pull". The users should
get an ssh access to the machine.
<2> in many distributions /etc/shells needs to list what is used
as the login shell.
-------------
CVS-style shared repository.::
+
@@ -419,7 +418,8 @@ git:x:9418:alice,bob,cindy,david
refs/heads/master alice\|cindy
refs/heads/doc-update bob
refs/tags/v[0-9]* david
-
+------------
++
<1> place the developers into the same git group.
<2> and make the shared repository writable by the group.
<3> use update-hook example by Carl from Documentation/howto/
@@ -427,7 +427,6 @@ for branch policy control.
<4> alice and cindy can push into master, only bob can push into doc-update.
david is the release manager and is the only person who can
create and push version tags.
-------------
HTTP server to support dumb protocol transfer.::
+
@@ -435,7 +434,7 @@ HTTP server to support dumb protocol tra
dev$ git update-server-info <1>
dev$ ftp user@isp.example.com <2>
ftp> cp -r .git /home/user/myproject.git
-
+------------
++
<1> make sure your info/refs and objects/info/packs are up-to-date
<2> upload to public HTTP server hosted by your ISP.
-------------
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 985bb2f..78f2fe6 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -66,19 +66,19 @@ the `Makefile` to two revisions back, de
mistake, and gets it back from the index.
+
------------
-$ git checkout master <1>
-$ git checkout master~2 Makefile <2>
+$ git checkout master <1>
+$ git checkout master~2 Makefile <2>
$ rm -f hello.c
-$ git checkout hello.c <3>
-
+$ git checkout hello.c <3>
+------------
++
<1> switch branch
<2> take out a file out of other commit
-<3> or "git checkout -- hello.c", as in the next example.
-------------
+<3> restore hello.c from HEAD of current branch
+
-If you have an unfortunate branch that is named `hello.c`, the
-last step above would be confused as an instruction to switch to
-that branch. You should instead write:
+If you have an unfortunate branch that is named `hello.c`, this
+step would be confused as an instruction to switch to that branch.
+You should instead write:
+
------------
$ git checkout -- hello.c
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 890931c..7267bcd 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -46,40 +46,41 @@ EXAMPLES
Various ways to check your working tree::
+
------------
-$ git diff <1>
-$ git diff --cached <2>
-$ git diff HEAD <3>
-
+$ git diff <1>
+$ git diff --cached <2>
+$ git diff HEAD <3>
+------------
++
<1> changes in the working tree since your last git-update-index.
<2> changes between the index and your last commit; what you
would be committing if you run "git commit" without "-a" option.
<3> changes in the working tree since your last commit; what you
would be committing if you run "git commit -a"
-------------
Comparing with arbitrary commits::
+
------------
-$ git diff test <1>
-$ git diff HEAD -- ./test <2>
-$ git diff HEAD^ HEAD <3>
-
+$ git diff test <1>
+$ git diff HEAD -- ./test <2>
+$ git diff HEAD^ HEAD <3>
+------------
++
<1> instead of using the tip of the current branch, compare with the
tip of "test" branch.
<2> instead of comparing with the tip of "test" branch, compare with
the tip of the current branch, but limit the comparison to the
file "test".
<3> compare the version before the last commit and the last commit.
-------------
Limiting the diff output::
+
------------
-$ git diff --diff-filter=MRC <1>
-$ git diff --name-status -r <2>
-$ git diff arch/i386 include/asm-i386 <3>
-
+$ git diff --diff-filter=MRC <1>
+$ git diff --name-status -r <2>
+$ git diff arch/i386 include/asm-i386 <3>
+------------
++
<1> show only modification, rename and copy, but not addition
nor deletion.
<2> show only names and the nature of change, but not actual
@@ -88,18 +89,17 @@ which in turn also disables recursive be
you would only see the directory name if there is a change in a
file in a subdirectory.
<3> limit diff output to named subtrees.
-------------
Munging the diff output::
+
------------
-$ git diff --find-copies-harder -B -C <1>
-$ git diff -R <2>
-
+$ git diff --find-copies-harder -B -C <1>
+$ git diff -R <2>
+------------
++
<1> spend extra cycles to find renames, copies and complete
rewrites (very expensive).
<2> output diff in reverse.
-------------
Author
diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt
index aeb1115..8a150d8 100644
--- a/Documentation/git-init-db.txt
+++ b/Documentation/git-init-db.txt
@@ -60,12 +60,12 @@ Start a new git repository for an existi
+
----------------
$ cd /path/to/my/codebase
-$ git-init-db <1>
-$ git-add . <2>
-
+$ git-init-db <1>
+$ git-add . <2>
+----------------
++
<1> prepare /path/to/my/codebase/.git directory
<2> add all existing file to the index
-----------------
Author
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index b7b9798..b17cdba 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -49,10 +49,11 @@ Undo a commit and redo::
+
------------
$ git commit ...
-$ git reset --soft HEAD^ <1>
-$ edit <2>
-$ git commit -a -c ORIG_HEAD <3>
-
+$ git reset --soft HEAD^ <1>
+$ edit <2>
+$ git commit -a -c ORIG_HEAD <3>
+------------
++
<1> This is most often done when you remembered what you
just committed is incomplete, or you misspelled your commit
message, or both. Leaves working tree as it was before "reset".
@@ -60,43 +61,43 @@ message, or both. Leaves working tree a
<3> "reset" copies the old head to .git/ORIG_HEAD; redo the
commit by starting with its log message. If you do not need to
edit the message further, you can give -C option instead.
-------------
Undo commits permanently::
+
------------
$ git commit ...
-$ git reset --hard HEAD~3 <1>
-
+$ git reset --hard HEAD~3 <1>
+------------
++
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
and you do not want to ever see them again. Do *not* do this if
you have already given these commits to somebody else.
-------------
Undo a commit, making it a topic branch::
+
------------
-$ git branch topic/wip <1>
-$ git reset --hard HEAD~3 <2>
-$ git checkout topic/wip <3>
-
+$ git branch topic/wip <1>
+$ git reset --hard HEAD~3 <2>
+$ git checkout topic/wip <3>
+------------
++
<1> You have made some commits, but realize they were premature
to be in the "master" branch. You want to continue polishing
them in a topic branch, so create "topic/wip" branch off of the
current HEAD.
<2> Rewind the master branch to get rid of those three commits.
<3> Switch to "topic/wip" branch and keep working.
-------------
Undo update-index::
+
------------
-$ edit <1>
+$ edit <1>
$ git-update-index frotz.c filfre.c
-$ mailx <2>
-$ git reset <3>
-$ git pull git://info.example.com/ nitfol <4>
-
+$ mailx <2>
+$ git reset <3>
+$ git pull git://info.example.com/ nitfol <4>
+------------
++
<1> you are happily working on something, and find the changes
in these files are in good order. You do not want to see them
when you run "git diff", because you plan to work on other files
@@ -109,12 +110,11 @@ index changes for these two files. Your
remain there.
<4> then you can pull and merge, leaving frotz.c and filfre.c
changes still in the working tree.
-------------
Undo a merge or pull::
+
------------
-$ git pull <1>
+$ git pull <1>
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
@@ -122,20 +122,19 @@ Nope.
Auto-merging nitfol
CONFLICT (content): Merge conflict in nitfol
Automatic merge failed/prevented; fix up by hand
-$ git reset --hard <2>
-
+$ git reset --hard <2>
+$ git pull . topic/branch <3>
+Updating from 41223... to 13134...
+Fast forward
+$ git reset --hard ORIG_HEAD <4>
+------------
++
<1> try to update from the upstream resulted in a lot of
conflicts; you were not ready to spend a lot of time merging
right now, so you decide to do that later.
<2> "pull" has not made merge commit, so "git reset --hard"
which is a synonym for "git reset --hard HEAD" clears the mess
from the index file and the working tree.
-
-$ git pull . topic/branch <3>
-Updating from 41223... to 13134...
-Fast forward
-$ git reset --hard ORIG_HEAD <4>
-
<3> merge a topic branch into the current branch, which resulted
in a fast forward.
<4> but you decided that the topic branch is not ready for public
@@ -143,7 +142,6 @@ consumption yet. "pull" or "merge" alwa
tip of the current branch in ORIG_HEAD, so resetting hard to it
brings your index file and the working tree back to that state,
and resets the tip of the branch to that commit.
-------------
Interrupted workflow::
+
@@ -155,21 +153,21 @@ need to get to the other branch for a qu
------------
$ git checkout feature ;# you were working in "feature" branch and
$ work work work ;# got interrupted
-$ git commit -a -m 'snapshot WIP' <1>
+$ git commit -a -m 'snapshot WIP' <1>
$ git checkout master
$ fix fix fix
$ git commit ;# commit with real log
$ git checkout feature
-$ git reset --soft HEAD^ ;# go back to WIP state <2>
-$ git reset <3>
-
+$ git reset --soft HEAD^ ;# go back to WIP state <2>
+$ git reset <3>
+------------
++
<1> This commit will get blown away so a throw-away log message is OK.
<2> This removes the 'WIP' commit from the commit history, and sets
your working tree to the state just before you made that snapshot.
-<3> After <2>, the index file still has all the WIP changes you
- committed in <1>. This sets it to the last commit you were
- basing the WIP changes on.
-------------
+<3> At this point the index file still has all the WIP changes you
+ committed as 'snapshot WIP'. This updates the index to show your
+ WIP files as uncommitted.
Author
------
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 0a1b0ad..d4137fc 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -247,34 +247,33 @@ To update and refresh only the files alr
$ git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh
----------------
-On an inefficient filesystem with `core.ignorestat` set:
-
+On an inefficient filesystem with `core.ignorestat` set::
++
------------
-$ git update-index --really-refresh <1>
-$ git update-index --no-assume-unchanged foo.c <2>
-$ git diff --name-only <3>
+$ git update-index --really-refresh <1>
+$ git update-index --no-assume-unchanged foo.c <2>
+$ git diff --name-only <3>
$ edit foo.c
-$ git diff --name-only <4>
+$ git diff --name-only <4>
M foo.c
-$ git update-index foo.c <5>
-$ git diff --name-only <6>
+$ git update-index foo.c <5>
+$ git diff --name-only <6>
$ edit foo.c
-$ git diff --name-only <7>
-$ git update-index --no-assume-unchanged foo.c <8>
-$ git diff --name-only <9>
+$ git diff --name-only <7>
+$ git update-index --no-assume-unchanged foo.c <8>
+$ git diff --name-only <9>
M foo.c
-
-<1> forces lstat(2) to set "assume unchanged" bits for paths
- that match index.
+------------
++
+<1> forces lstat(2) to set "assume unchanged" bits for paths that match index.
<2> mark the path to be edited.
<3> this does lstat(2) and finds index matches the path.
-<4> this does lstat(2) and finds index does not match the path.
+<4> this does lstat(2) and finds index does *not* match the path.
<5> registering the new version to index sets "assume unchanged" bit.
<6> and it is assumed unchanged.
<7> even after you edit it.
<8> you can tell about the change after the fact.
<9> now it checks with lstat(2) and finds it has been changed.
-------------
Configuration
--
1.3.1.gc672
^ permalink raw reply related
* [PATCH] Fix trivial typo in git-log man page.
From: Sean Estabrooks @ 2006-04-28 13:15 UTC (permalink / raw)
To: git; +Cc: Sean Estabrooks
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
Documentation/git-log.txt | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
0afa7822c6a0d6ffa82f9d9b64c78df8587e190d
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 76cb894..af378ff 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -14,13 +14,12 @@ DESCRIPTION
-----------
Shows the commit logs.
-The command takes options applicable to the gitlink::git-rev-list[1]
+The command takes options applicable to the gitlink:git-rev-list[1]
command to control what is shown and how, and options applicable to
-the gitlink::git-diff-tree[1] commands to control how the change
+the gitlink:git-diff-tree[1] commands to control how the change
each commit introduces are shown.
-This manual page describes only the most frequently used
-options.
+This manual page describes only the most frequently used options.
OPTIONS
--
1.3.1.gc672
^ permalink raw reply related
* [PATCH] Properly render asciidoc "callouts" in git man pages.
From: Sean Estabrooks @ 2006-04-28 13:15 UTC (permalink / raw)
To: git; +Cc: Sean Estabrooks
In-Reply-To: <1146230106696-git-send-email-seanlkml@sympatico.ca>
Adds an xsl fragment to render docbook callouts when
converting to man page format. Update the Makefile
to have "xmlto" use it when generating man pages.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
Documentation/Makefile | 2 +-
Documentation/callouts.xsl | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
create mode 100644 Documentation/callouts.xsl
82ee912fb2a58194cac3d65b15abc98190a3359a
diff --git a/Documentation/Makefile b/Documentation/Makefile
index f4cbf7e..c1af22c 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -79,7 +79,7 @@ clean:
asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
%.1 %.7 : %.xml
- xmlto man $<
+ xmlto -m callouts.xsl man $<
%.xml : %.txt
asciidoc -b docbook -d manpage -f asciidoc.conf $<
diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
new file mode 100644
index 0000000..ad03755
--- /dev/null
+++ b/Documentation/callouts.xsl
@@ -0,0 +1,16 @@
+<!-- callout.xsl: converts asciidoc callouts to man page format -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="co">
+ <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
+</xsl:template>
+<xsl:template match="calloutlist">
+ <xsl:text>.sp </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+<xsl:template match="callout">
+ <xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
+ <xsl:apply-templates/>
+ <xsl:text>.br </xsl:text>
+</xsl:template>
+</xsl:stylesheet>
--
1.3.1.gc672
^ permalink raw reply related
* [PATCH] Update the git-branch man page to include the "-r" option,
From: Sean Estabrooks @ 2006-04-28 13:15 UTC (permalink / raw)
To: git; +Cc: Sean Estabrooks
In-Reply-To: <11462301062278-git-send-email-seanlkml@sympatico.ca>
and fix up asciidoc "callouts"
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
Documentation/git-branch.txt | 57 +++++++++++++++++++++++++++++-------------
1 files changed, 39 insertions(+), 18 deletions(-)
5f70eb7e8c318528885cdd9b35bfa1d92cbf6782
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 71ecd85..050e1f7 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -3,22 +3,27 @@ git-branch(1)
NAME
----
-git-branch - Create a new branch, or remove an old one
+git-branch - List, create, or delete branches.
SYNOPSIS
--------
[verse]
-'git-branch' [[-f] <branchname> [<start-point>]]
-'git-branch' (-d | -D) <branchname>
+'git-branch' [-r]
+'git-branch' [-f] <branchname> [<start-point>]
+'git-branch' (-d | -D) <branchname>...
DESCRIPTION
-----------
-If no argument is provided, show available branches and mark current
-branch with star. Otherwise, create a new branch of name <branchname>.
-If a starting point is also specified, that will be where the branch is
-created, otherwise it will be created at the current HEAD.
+With no arguments given (or just `-r`) a list of available branches
+will be shown, the current branch will be highlighted with an asterisk.
-With a `-d` or `-D` option, `<branchname>` will be deleted.
+In its second form, a new branch named <branchname> will be created.
+It will start out with a head equal to the one given as <start-point>.
+If no <start-point> is given, the branch will be created with a head
+equal to that of the currently checked out branch.
+
+With a `-d` or `-D` option, `<branchname>` will be deleted. You may
+specify more than one branch for deletion.
OPTIONS
@@ -30,40 +35,56 @@ OPTIONS
Delete a branch irrespective of its index status.
-f::
- Force a reset of <branchname> to <start-point> (or current head).
+ Force the creation of a new branch even if it means deleting
+ a branch that already exists with the same name.
+
+-r::
+ List only the "remote" branches.
<branchname>::
The name of the branch to create or delete.
<start-point>::
- Where to create the branch; defaults to HEAD. This
- option has no meaning with -d and -D.
+ The new branch will be created with a HEAD equal to this. It may
+ be given as a branch name, a commit-id, or a tag. If this option
+ is omitted, the current branch is assumed.
+
Examples
-~~~~~~~~
+--------
Start development off of a known tag::
+
------------
$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
$ cd my2.6
-$ git branch my2.6.14 v2.6.14 <1>
+$ git branch my2.6.14 v2.6.14 <1>
$ git checkout my2.6.14
-
-<1> These two steps are the same as "checkout -b my2.6.14 v2.6.14".
------------
++
+<1> This step and the next one could be combined into a single step with
+"checkout -b my2.6.14 v2.6.14".
Delete unneeded branch::
+
------------
$ git clone git://git.kernel.org/.../git.git my.git
$ cd my.git
-$ git branch -D todo <1>
-
+$ git branch -D todo <1>
+------------
++
<1> delete todo branch even if the "master" branch does not have all
commits from todo branch.
-------------
+
+
+Notes
+-----
+
+If you are creating a branch that you want to immediately checkout, it's
+easier to use the git checkout command with its `-b` option to create
+a branch and check it out with a single command.
+
Author
------
--
1.3.1.gc672
^ permalink raw reply related
* Fix asciidoc callouts in git man pages
From: Sean Estabrooks @ 2006-04-28 13:13 UTC (permalink / raw)
To: git
Started out just wanting to update the git-branch man page
to include the "-r" option but noticed that the asciidoc
callouts weren't being rendered in its man page. Then
noticed the same was true for all the man pages where
they are used.
It turns out we've not been following the guidelines
properly on how to use them. The fact that they show up
in a useful way in the html docs is really an accident.
Even there they're not showing up as intended.
Unfortunately, even after all the docs are fixed up to use
the proper format, they still don't render properly in the
man format. Seems this is a missing feature in the "xmlto"
command.
The final patch in this series adds an xsl fragment which
is passed to xmlto so that the callouts appear properly in
the man pages.
Sean
Documentation/Makefile | 2 +
Documentation/callouts.xsl | 16 ++++++++
Documentation/everyday.txt | 45 +++++++++++------------
Documentation/git-branch.txt | 57 ++++++++++++++++++++---------
Documentation/git-checkout.txt | 18 +++++----
Documentation/git-diff.txt | 38 ++++++++++---------
Documentation/git-init-db.txt | 8 ++--
Documentation/git-log.txt | 7 ++--
Documentation/git-reset.txt | 72 ++++++++++++++++++------------------
Documentation/git-update-index.txt | 31 ++++++++--------
10 files changed, 163 insertions(+), 131 deletions(-)
^ permalink raw reply
* [PATCH] annotate: display usage information if no filename was given
From: Matthias Kestenholz @ 2006-04-28 8:41 UTC (permalink / raw)
To: junkio; +Cc: git
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
git-annotate.perl | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
ec31877f02673ed1db9d1485ac0065d51cbb7039
diff --git a/git-annotate.perl b/git-annotate.perl
index 9df72a1..bf920a5 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -10,9 +10,10 @@ use warnings;
use strict;
use Getopt::Long;
use POSIX qw(strftime gmtime);
+use File::Basename qw(basename dirname);
sub usage() {
- print STDERR 'Usage: ${\basename $0} [-s] [-S revs-file] file [ revision ]
+ print STDERR "Usage: ${\basename $0} [-s] [-S revs-file] file [ revision ]
-l, --long
Show long rev (Defaults off)
-t, --time
@@ -23,7 +24,7 @@ sub usage() {
Use revs from revs-file instead of calling git-rev-list
-h, --help
This message.
-';
+";
exit(1);
}
@@ -35,7 +36,7 @@ my $rc = GetOptions( "long|l" => \$longr
"help|h" => \$help,
"rename|r" => \$rename,
"rev-file|S=s" => \$rev_file);
-if (!$rc or $help) {
+if (!$rc or $help or !@ARGV) {
usage();
}
--
1.3.1.gc4586
^ permalink raw reply related
* [PATCH] annotate: fix warning about uninitialized scalar
From: Matthias Kestenholz @ 2006-04-28 8:42 UTC (permalink / raw)
To: junkio; +Cc: git
Use of uninitialized value in scalar chomp at
./git-annotate.perl line 212, <$kid> chunk 4.
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
---
git-annotate.perl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
5322aefa820eef2d635d5dbf621269aefce52135
diff --git a/git-annotate.perl b/git-annotate.perl
index bf920a5..5f8a766 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -209,6 +209,9 @@ sub find_parent_renames {
while (my $change = <$patch>) {
chomp $change;
my $filename = <$patch>;
+ if(!$filename) {
+ next;
+ }
chomp $filename;
if ($change =~ m/^[AMD]$/ ) {
--
1.3.1.gc4586
^ permalink raw reply related
* Re: fatal: git-write-tree: not able to write tree
From: Junio C Hamano @ 2006-04-28 9:01 UTC (permalink / raw)
To: Brown, Len; +Cc: git
In-Reply-To: <CFF307C98FEABE47A452B27C06B85BB64A432C@hdsmsx411.amr.corp.intel.com>
"Brown, Len" <len.brown@intel.com> writes about the command "git
am -3 --resolved", after hand merging _but_ without update-index
to actually mark the paths that have been resolved, results in
"write-tree" failure.
> I'm okay with git being conservative and not doing the update-index
> for me. Perhaps the thing to do here is to make the failure message
> more useful?
>
> "fatal: git-write-tree: not able to write tree"
>
> everything after "fatal" here is effectively a string
> of random characters to the hapless user.
That's very true. Perhaps something like this?
-- >8 --
git-am --resolved: more usable error message.
After doing the hard work of hand resolving the conflicts in the
working tree, if the user forgets to run update-index to mark
the paths that have been resolved, the command gave an
unfriendly "fatal: git-write-tree: not able to write tree" error
message. Catch the situation early and give more meaningful
message and suggestion.
Noticed and suggested by Len Brown.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-am.sh b/git-am.sh
index eab4aa8..872145b 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -376,6 +376,13 @@ do
echo "No changes - did you forget update-index?"
stop_here $this
fi
+ unmerged=$(git-ls-files -u)
+ if test -n "$unmerged"
+ then
+ echo "You still have unmerged paths in your index"
+ echo "did you forget update-index?"
+ stop_here $this
+ fi
apply_status=0
;;
esac
^ permalink raw reply related
* RE: fatal: git-write-tree: not able to write tree
From: Brown, Len @ 2006-04-28 8:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
>> git am --3way --interactive --signoff --utf8 --resolved
>Please say "--resolved" after you have actually resolved them,
>eh, meaning, (1) edit the working tree file into a desired
>shape, and (2) git-update-index drivers/acpi/thermal.c.
Thanks Junio, once again, for your help, we're up and running!
I'm okay with git being conservative and not doing the update-index
for me. Perhaps the thing to do here is to make the failure message
more useful?
"fatal: git-write-tree: not able to write tree"
everything after "fatal" here is effectively a string
of random characters to the hapless user.
thanks,
-Len
^ permalink raw reply
* Re: fatal: git-write-tree: not able to write tree
From: Junio C Hamano @ 2006-04-28 8:32 UTC (permalink / raw)
To: Len Brown; +Cc: git
In-Reply-To: <200604280430.33100.len.brown@intel.com>
Len Brown <len.brown@intel.com> writes:
> I'm trying to use git-am to apply a patch series in a mailbox.
>
> The first patch has a conflict, which I edit to fix, and and then invoke
> git am --3way --interactive --signoff --utf8 --resolved
>
> but it bails out with this:
>
> drivers/acpi/thermal.c: unmerged (4829f067a3e7acfbeed8b230caac00b1ed4b8554)
> drivers/acpi/thermal.c: unmerged (528d198c28512af1627cce481575f37a599c0fe8)
> drivers/acpi/thermal.c: unmerged (db3bef1a3e51801128e7553f3e546c8272cc9ee1)
> fatal: git-write-tree: not able to write tree
>
> I've tried various incantations of git reset on the theory that there is some
> old state hanging around someplace, but have not been able to check in this
> file.
>
> clues?
Please say "--resolved" after you have actually resolved them,
eh, meaning, (1) edit the working tree file into a desired
shape, and (2) git-update-index drivers/acpi/thermal.c.
I've considered making --resolved to do update-index for all
paths that are unmerged in the index, but that risks going
forward by mistake when you still have other paths to resolve,
so...
^ permalink raw reply
* fatal: git-write-tree: not able to write tree
From: Len Brown @ 2006-04-28 8:30 UTC (permalink / raw)
To: git
I'm trying to use git-am to apply a patch series in a mailbox.
The first patch has a conflict, which I edit to fix, and and then invoke
git am --3way --interactive --signoff --utf8 --resolved
but it bails out with this:
drivers/acpi/thermal.c: unmerged (4829f067a3e7acfbeed8b230caac00b1ed4b8554)
drivers/acpi/thermal.c: unmerged (528d198c28512af1627cce481575f37a599c0fe8)
drivers/acpi/thermal.c: unmerged (db3bef1a3e51801128e7553f3e546c8272cc9ee1)
fatal: git-write-tree: not able to write tree
I've tried various incantations of git reset on the theory that there is some
old state hanging around someplace, but have not been able to check in this
file.
clues?
thanks,
-Len
^ permalink raw reply
* Re: [PATCH] Add a test case for rerere
From: Uwe Zeisberger @ 2006-04-28 8:02 UTC (permalink / raw)
To: git
In-Reply-To: <20060428075604.GA30714@digi.com>
Hello,
Uwe Zeisberger wrote:
> +echo "added in branch" >> file-common &&
> +git add file-branch file-common &&
> +git commit -m "branch1" -i file-base file-branch file-common &&
> +git branch branch1'
> +
> ...
> +
> +test_expect_failure 'pull branch1' \
> +'git pull . branch1'
When typing the test I first tried to pull branch^, but this failed with
"no such remote ref refs/heads/branch^". Is it intended that one can
only pull branches and not any rev?
Best regards
Uwe
PS: I added a double blank line in the file. Sorry for that...
--
Uwe Zeisberger
http://www.google.com/search?q=Planck%27s+constant%3D
^ permalink raw reply
* [PATCH] Add a test case for rerere
From: Uwe Zeisberger @ 2006-04-28 7:56 UTC (permalink / raw)
To: git
Currently this test fails because rerere is not able to record
resolves for a file that don't exist in the merge base but in
both branches to merge.
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
---
t/t8003-rerere.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
create mode 100644 t/t8003-rerere.sh
It's the last command that fails because rerere didn't record the
conflict between branch1:file-common and master:file-common.
Please feel free to change the filename as I don't know/see the naming
scheme of the tests.
Best regards
Uwe
ff012a80cafa3fe905de72d0db8b616ff76d0038
diff --git a/t/t8003-rerere.sh b/t/t8003-rerere.sh
new file mode 100644
index 0000000..1bb66ff
--- /dev/null
+++ b/t/t8003-rerere.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+test_description='git-rerere'
+. ./test-lib.sh
+
+
+test_expect_success 'prepare repository' \
+'mkdir .git/rr-cache &&
+echo "content" > file-base &&
+git add file-base &&
+git commit -m "Initial commit" &&
+git branch branch &&
+echo "added after branch" >> file-base &&
+echo "added after branch" >> file-common &&
+git add file-common &&
+git commit -m "master1" -i file-base file-common &&
+git checkout branch &&
+echo "added in branch" >> file-base &&
+echo "only in branch" > file-branch &&
+echo "added in branch" >> file-common &&
+git add file-branch file-common &&
+git commit -m "branch1" -i file-base file-branch file-common &&
+git branch branch1'
+
+test_expect_failure 'pull master' \
+'git pull . master'
+
+cat >> file-base-expect << EOF
+content
+<<<<<<< HEAD/file-base
+added in branch
+=======
+added after branch
+>>>>>>> `git rev-parse master`/file-base
+EOF
+
+test_expect_success 'merge result' \
+'cmp file-base file-base-expect &&
+git cat-file blob HEAD:file-common | cmp file-common~HEAD - &&
+git cat-file blob master:file-common | cmp file-common~`git rev-parse master` - &&
+git cat-file blob HEAD:file-branch | cmp file-branch -'
+
+test_expect_success 'record and resolve confilcts' \
+'git rerere &&
+echo "content
+added in branch
+added after branch" > file-base &&
+echo "added in branch
+added after branch" > file-common &&
+git rerere &&
+git-ls-files -o | xargs rm &&
+git commit -m "resolved conflicts" -i file-base file-common file-branch &&
+git-checkout master
+'
+
+test_expect_failure 'pull branch1' \
+'git pull . branch1'
+
+test_expect_success 'reuse recorded resolve' \
+'git rerere &&
+git cat-file blob branch:file-branch | cmp file-branch - &&
+git cat-file blob branch:file-base | cmp file-base - &&
+git cat-file blob branch:file-common | cmp file-common -'
+
+test_done
+
--
1.3.1.gac92
--
Uwe Zeisberger
FS Forth-Systeme GmbH, A Digi International Company
Kueferstrasse 8, D-79206 Breisach, Germany
Phone: +49 (7667) 908 0 Fax: +49 (7667) 908 200
Web: www.fsforth.de, www.digi.com
^ permalink raw reply related
* Re: new gitk feature
From: Linus Torvalds @ 2006-04-28 5:11 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
In-Reply-To: <17489.22838.502099.575465@cargo.ozlabs.ibm.com>
On Fri, 28 Apr 2006, Paul Mackerras wrote:
> Linus Torvalds writes:
> > Any possibility of something light that? I'd _love_ to be able to see the
> > whole tree, but with things that touch certain files or things that are
> > newer highlighted.
>
> That should be quite doable. How about I show the commits that are in
> the highlight view in bold? That won't conflict with the existing
> yellow background for commits that match the find criteria.
Bold sounds good to me.
> > (Btw, the "revision information" is also cool things like "--unpacked". I
> > actually use "gitk --unpacked" every once in a while, just because it's
> > such a cool way to say "show me everything I've added since I packed the
> > repo last).
>
> OK, I didn't know about --unpacked. :) I plan to add stuff to the
> view definition window to allow you to select commits to
> include/exclude by reachability from given commits (by head/tag/ID)
> and when I do I can add a way to say --unpacked too.
It's more of a gimmick, but I find myself using it occasionally just to
decide whether it's time to repack. It falls out automatically - not
because I thought I'd ever want it, but because the --unpacked semantics
for git-rev-list are what incremental packing needed.
(Of course, sane people probably just do "git count-objects" to decide to
repack).
Linus
^ permalink raw reply
* Re: PATCH: New diff-delta.c implementation (updated)
From: Junio C Hamano @ 2006-04-28 4:28 UTC (permalink / raw)
To: Geert Bosch; +Cc: git
In-Reply-To: <7v1wvigzka.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> In the kernel repository (checked out is near the tip of the
> source tree), the largest files are fs/nls/nls_cp949.c (900kB
> korean character encoding), drivers/usb/misc/emi62_fw_s.h
> (800kB, Emagic firmware blob), arch/m68k/ifpsp060/src/fpsp.S
> (750kB, floating point emulation?), and nowhere near your
> algorithm really should shine.
>
> We would probably want some internal logic that says "if we see
> that blobs larger than X MB is involved in the packing, we
> should use this version of diff-delta, otherwise the other one."
Third impression, synthetic workload. A sequence of single file
project, the file is tarball of git.git tree (that is,
"git-tar-tree vX.Y.Z >tarball"), 120 objects or so (1 commit per
rev, 1 tree to hold 1 blob). The (uncompressed) size of the 40
blobs in the pack are between 2.06MB - 2.86MB (average 2.30MB).
(Nico)
Total 123, written 123 (delta 38), reused 0 (delta 0)
67.26user 1.03system 1:08.76elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+136066minor)pagefaults 0swaps
1822079 pack-nico-26989d516c62197592d0d52db24dfc6a58b633eb.pack
(Geert)
Total 123, written 123 (delta 38), reused 0 (delta 0)
67.23user 1.35system 1:09.25elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+164124minor)pagefaults 0swaps
1683139 pack-geert-26989d516c62197592d0d52db24dfc6a58b633eb.pack
That's an 8% improvement in the same time, which is quite
impressive. But I am _very_ unhappy about this particular
synthetic workload. I wonder if there are projects with many
large blobs that is updated often, so that we can use it as a
yardstick. Maybe Wine people have icons, background images and
sounds perhaps? But I suspect you would not update them that
often.
Thinking about it, it does not make much sense, at least to me,
to store large tarballs or binary blobs or whatnot in a SCM (we
are _not_ in the archival business) and keeping track of their
changes. The tarball is out of question -- it is not a source
(in GPL sense of the word -- it is not a preferred way to make
modification; you modify constituent files and bundle up the
result as a new tarball). Graphics images, perhaps.
^ permalink raw reply
* Re: PATCH: New diff-delta.c implementation (updated)
From: Junio C Hamano @ 2006-04-28 3:16 UTC (permalink / raw)
To: Geert Bosch; +Cc: git
In-Reply-To: <Pine.GSO.4.60.0604272132170.9650@nile.gnat.com>
Geert Bosch <bosch@gnat.com> writes:
> Even though the previous version did really well on large files
> with many changes, performance was lacking for the many small
> files with very few changes that are so common for a VCS.
>...
> The result has been only a slight increase in delta size for
> very large test cases (but with better performance), and
> both smaller deltas and faster execution speed for repacking
> git.git. I had trouble cloning the Linux kernel repository,
> but am now reasonably confident this will outperform the
> existing algorithm pretty consistently.
Interesting.
Initial impression, the same test as before (a full packing of
the git.git repository that does not have _any_ pack -- all 18k
objects are loose).
First, the incumbent, with the "reusing delta-index" patch applied.
Total 17724, written 17724 (delta 12002), reused 0 (delta 0)
34.02user 6.48system 0:42.87elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+434478minor)pagefaults 0swaps
6188418 pack-nico-f1fac077a093ffdaf094aab2b7f11859ec0c18f1.pack
Then diff-delta.c replaced with your version.
Total 17724, written 17724 (delta 12012), reused 0 (delta 0)
44.87user 6.54system 0:54.01elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+441124minor)pagefaults 0swaps
6099183 pack-geert-f1fac077a093ffdaf094aab2b7f11859ec0c18f1.pack
Second impression, in a recent kernel tree which is mostly
packed. Packing 41k objects (v2.6.16..v2.6.17-rc3), with
"git-pack-objects --no-reuse-delta".
(Nico)
Total 41591, written 41591 (delta 29285), reused 8563 (delta 0)
169.08user 12.60system 3:27.68elapsed 87%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (2major+1099928minor)pagefaults 0swaps
37363966 pack-nico-b9e4339c482cb7d787a2117e6da6eb2114053abc.pack
(Geert)
Total 41591, written 41591 (delta 29347), reused 8427 (delta 0)
243.71user 12.32system 4:28.11elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+1077843minor)pagefaults 0swaps
37165890 pack-geert-b9e4339c482cb7d787a2117e6da6eb2114053abc.pack
Of course, the absolute numbers do not matter, but for the
record these are on my Duron 750, 760MB or so RAM and with
relatively slow disks.
In the kernel repository (checked out is near the tip of the
source tree), the largest files are fs/nls/nls_cp949.c (900kB
korean character encoding), drivers/usb/misc/emi62_fw_s.h
(800kB, Emagic firmware blob), arch/m68k/ifpsp060/src/fpsp.S
(750kB, floating point emulation?), and nowhere near your
algorithm really should shine.
We would probably want some internal logic that says "if we see
that blobs larger than X MB is involved in the packing, we
should use this version of diff-delta, otherwise the other one."
^ permalink raw reply
* Re: PATCH: New diff-delta.c implementation (updated)
From: Geert Bosch @ 2006-04-28 2:07 UTC (permalink / raw)
To: Git Mailing List
In-Reply-To: <Pine.GSO.4.60.0604272132170.9650@nile.gnat.com>
On Apr 27, 2006, at 21:59, Geert Bosch wrote:
> The result has been only a slight increase in delta size for
> very large test cases (but with better performance),
Just to clarify: this is compared to my initial implementation.
For very large test cases, both delta size and execution time
are much less than the current implementation.
-Geert
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox