* Re: [PATCH] fix compare symlink against readlink not data
From: Kay Sievers @ 2005-05-06 16:59 UTC (permalink / raw)
To: Greg KH; +Cc: Linus Torvalds, git
In-Reply-To: <20050506163603.GA17766@kroah.com>
On Fri, 2005-05-06 at 09:36 -0700, Greg KH wrote:
> On Fri, May 06, 2005 at 06:23:34PM +0200, Kay Sievers wrote:
> > On Fri, 2005-05-06 at 09:03 -0700, Greg KH wrote:
> > > On Fri, May 06, 2005 at 03:45:01PM +0200, Kay Sievers wrote:
> > > > Fix update-cache to compare the blob of a symlink against the link-target
> > > > and not the file it points to. Also ignore all permissions applied to
> > > > links.
> > > > Thanks to Greg for recognizing this while he added our list of symlinks
> > > > back to the udev repository.
> > >
> > > Hm, even with this patch applied (it's in Linus's tree right now), I
> > > still get the following with a clean checked out udev tree:
> > > $ cg-diff
> > > Index: test/sys/block/cciss!c0d0/device
> > > ===================================================================
> >
> > I can't reproduce this. Are you sure, that the git-core binaries are
> > called and not the cogito ones?
> >
> > git-update-cache --refresh
> > git-diff-cache -r HEAD
> > from the core-git should print nothing.
>
> Odd. If I reclone the whole tree from the udev kernel.org tree, then it
> works just fine. If I create a new copy of my local tree, I still have
> the same problem. Diffing the trees shows no difference in the objects
> at all...
>
> Can you add a symlink to a local tree and see if you can duplicate this?
Works as it should be.
What happens when you throw away your old .git/index with?
git-read-tree HEAD
Kay
^ permalink raw reply
* Re: How do I...
From: Frank Sorenson @ 2005-05-06 16:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, git
In-Reply-To: <7vsm10cnx3.fsf@assigned-by-dhcp.cox.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Junio C Hamano wrote:
> Yourself or not, I think it is a good idea to do something that
> does exactly Frank wants, namely, just list commits. Even
> better would be, to take commits with multiple parents into
> account, list of <commit> <parent> pairs, like:
>
> $ git-file-revs Makefile
> f7eb55....... aaaaaa.......
> f7eb55....... bbbbbb.......
> aaaaaa....... dddddd.......
>
> which shows commit f7eb55... changed it relative to both of its
> parents aaaaaa... and bbbbbb...
Note that I could be just thinking about this all wrong, so my
terminology could be in left field. Here, I'm mostly just interested in
the case where "Hey, something broke with drivers/char/i8k.c. When was
this changed? Who changed what?"
Thanks,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCe5+yaI0dwg4A47wRAhIwAKD7R/D3ZU7JZz0mytEO04u04OTVZwCbBFhG
sEYSTYiLLIMuLxU+r1mNuGw=
=Mcg2
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: How do I...
From: Frank Sorenson @ 2005-05-06 16:39 UTC (permalink / raw)
To: Dave Kleikamp; +Cc: Git Mailing List
In-Reply-To: <1115390221.10459.4.camel@localhost>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave Kleikamp wrote:
> On Fri, 2005-05-06 at 03:49 -0600, Frank Sorenson wrote:
>
>
>>After doing a cg-update, can I cg-log just the changes since the last
>>update? Alternatively, how can I tell cg-log I'm caught up, and don't
>>need anything historical?
>
>
> (Assuming pulling from "origin")
> Instead of doing cg-update, do cg-pull. Then "cg-log :origin" will give
> you you the changesets you just pulled.
Super. This works great. Thanks.
> "cg-merge origin" will then
> complete operation, thereby catching you up.
Okay, not quite so great. Here's the ouput when I ran it to update my
kernel this morning. Note that I haven't made any local modifications.
I'm seeing this sort of thing often enough that I'm blowing away my
whole git tree and regenerating it to get back to a stable state once or
twice a week. I'm sure there's another way, but without me making
modifications on my end, I wouldn't expect this to happen. Suggestions
are welcome! :)
# cg-merge origin
Fast-forwarding 6741f3a7f9922391cd02b3ca1329e669497dc22f ->
2512809255d018744fe6c2f5e996c83769846c07
on top of 6741f3a7f9922391cd02b3ca1329e669497dc22f...
patching file fs/proc/Makefile
patching file fs/proc/array.c
patching file fs/proc/base.c
patching file fs/proc/generic.c
patching file fs/proc/inode-alloc.txt
patching file fs/proc/inode.c
patching file fs/proc/internal.h
patching file fs/proc/kcore.c
patching file fs/proc/kmsg.c
patching file fs/proc/mmu.c
patching file fs/proc/nommu.c
patching file fs/proc/proc_devtree.c
patching file fs/proc/proc_misc.c
patching file fs/proc/proc_tty.c
patching file fs/proc/root.c
patching file fs/proc/task_mmu.c
patching file fs/proc/task_nommu.c
touch: cannot touch `fs/proc/Makefile': No such file or directory
touch: cannot touch `fs/proc/array.c': No such file or directory
touch: cannot touch `fs/proc/base.c': No such file or directory
touch: cannot touch `fs/proc/generic.c': No such file or directory
touch: cannot touch `fs/proc/inode-alloc.txt': No such file or directory
touch: cannot touch `fs/proc/inode.c': No such file or directory
touch: cannot touch `fs/proc/internal.h': No such file or directory
touch: cannot touch `fs/proc/kcore.c': No such file or directory
touch: cannot touch `fs/proc/kmsg.c': No such file or directory
touch: cannot touch `fs/proc/mmu.c': No such file or directory
touch: cannot touch `fs/proc/nommu.c': No such file or directory
touch: cannot touch `fs/proc/proc_devtree.c': No such file or directory
touch: cannot touch `fs/proc/proc_misc.c': No such file or directory
touch: cannot touch `fs/proc/proc_tty.c': No such file or directory
touch: cannot touch `fs/proc/root.c': No such file or directory
touch: cannot touch `fs/proc/task_mmu.c': No such file or directory
touch: cannot touch `fs/proc/task_nommu.c': No such file or directory
rm: cannot remove `fs/proc/Makefile': No such file or directory
rm: cannot remove `fs/proc/array.c': No such file or directory
rm: cannot remove `fs/proc/base.c': No such file or directory
rm: cannot remove `fs/proc/generic.c': No such file or directory
rm: cannot remove `fs/proc/inode-alloc.txt': No such file or directory
rm: cannot remove `fs/proc/inode.c': No such file or directory
rm: cannot remove `fs/proc/internal.h': No such file or directory
rm: cannot remove `fs/proc/kcore.c': No such file or directory
rm: cannot remove `fs/proc/kmsg.c': No such file or directory
rm: cannot remove `fs/proc/mmu.c': No such file or directory
rm: cannot remove `fs/proc/nommu.c': No such file or directory
rm: cannot remove `fs/proc/proc_devtree.c': No such file or directory
rm: cannot remove `fs/proc/proc_misc.c': No such file or directory
rm: cannot remove `fs/proc/proc_tty.c': No such file or directory
rm: cannot remove `fs/proc/root.c': No such file or directory
rm: cannot remove `fs/proc/task_mmu.c': No such file or directory
rm: cannot remove `fs/proc/task_nommu.c': No such file or directory
fs/proc/Makefile: needs update
fs/proc/array.c: needs update
fs/proc/base.c: needs update
fs/proc/generic.c: needs update
fs/proc/inode-alloc.txt: needs update
fs/proc/inode.c: needs update
fs/proc/internal.h: needs update
fs/proc/kcore.c: needs update
fs/proc/kmsg.c: needs update
fs/proc/mmu.c: needs update
fs/proc/nommu.c: needs update
fs/proc/proc_devtree.c: needs update
fs/proc/proc_misc.c: needs update
fs/proc/proc_tty.c: needs update
fs/proc/root.c: needs update
fs/proc/task_mmu.c: needs update
fs/proc/task_nommu.c: needs update
Thanks,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCe53EaI0dwg4A47wRAt5dAJ4wEG8KmRvEnqLMOtDiNrZqRhURMgCfTUaE
JLGGFnRN4YGhix/7SkOwAtg=
=aDQu
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: [PATCH] fix compare symlink against readlink not data
From: Greg KH @ 2005-05-06 16:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Kay Sievers, Linus Torvalds, git
In-Reply-To: <7vy8ascod4.fsf@assigned-by-dhcp.cox.net>
On Fri, May 06, 2005 at 09:26:15AM -0700, Junio C Hamano wrote:
>
> Also could you try the low-level git command, git-diff-cache -p,
> against the tree you are comparing? The built-in diff stuff
> might get this wrong too.
No, 'git-diff-cache -r HEAD' shows me:
$ git-diff-cache -r HEAD
*120000->100644 blob 2d78258b1a0fe49afabc8c16a352117df5dc338a->2d78258b1a0fe49afabc8c16a352117df5dc338a test/sys/block/cciss!c0d0/device
*120000->100644 blob 2d78258b1a0fe49afabc8c16a352117df5dc338a->2d78258b1a0fe49afabc8c16a352117df5dc338a test/sys/block/rd!c0d0/device
*120000->100644 blob 2d78258b1a0fe49afabc8c16a352117df5dc338a->2d78258b1a0fe49afabc8c16a352117df5dc338a test/sys/block/sda/device
*120000->100644 blob 1c776568bdc9dc750addd0885dded6b008a44460->1c776568bdc9dc750addd0885dded6b008a44460 test/sys/bus/pci/devices/0000:00:09.0
*120000->100644 blob e000c77614a23ad57fed284bd007ed7c1cb7872e->e000c77614a23ad57fed284bd007ed7c1cb7872e test/sys/bus/pci/devices/0000:00:1e.0
*120000->100644 blob 630d35bf617944a4ba6afc90ca5176cb342a2662->630d35bf617944a4ba6afc90ca5176cb342a2662 test/sys/bus/pci/devices/0000:02:05.0
*120000->100644 blob bd644e0e9d0c2f289bc4a3e3a034d528d5d671cc->bd644e0e9d0c2f289bc4a3e3a034d528d5d671cc test/sys/bus/pci/drivers/aic7xxx/0000:02:05.0
*120000->100644 blob ebb65b3bac36ef935a55a7f1010e4d3a242188eb->ebb65b3bac36ef935a55a7f1010e4d3a242188eb test/sys/bus/scsi/devices/0:0:0:0
*120000->100644 blob 239003f712dd9112171e635a44160da1898f5996->239003f712dd9112171e635a44160da1898f5996 test/sys/bus/scsi/drivers/sd/0:0:0:0
*120000->100644 blob b7733a68e08e564300212a22c9f81888c12bb55a->b7733a68e08e564300212a22c9f81888c12bb55a test/sys/bus/usb-serial/devices/ttyUSB0
*120000->100644 blob 177f109e4899cf4008b9413933392d4f07832fdc->177f109e4899cf4008b9413933392d4f07832fdc test/sys/bus/usb-serial/drivers/PL-2303/ttyUSB0
*120000->100644 blob 9137978832942ecce572d376f14244c1588748a2->9137978832942ecce572d376f14244c1588748a2 test/sys/bus/usb/devices/3-0:1.0
*120000->100644 blob e47b4d58c4e5406bdba3ea1384c0c3efe007b8f6->e47b4d58c4e5406bdba3ea1384c0c3efe007b8f6 test/sys/bus/usb/devices/3-1
*120000->100644 blob f519185eb36af29f79ca89d4b3d51011756b6837->f519185eb36af29f79ca89d4b3d51011756b6837 test/sys/bus/usb/devices/3-1:1.0
*120000->100644 blob fb1919e7c9794ce31a257b50621f71f6f4f8bdef->fb1919e7c9794ce31a257b50621f71f6f4f8bdef test/sys/bus/usb/devices/usb3
*120000->100644 blob 2bc160c20cd950c52e34d4bab30e1e25d6f4df34->2bc160c20cd950c52e34d4bab30e1e25d6f4df34 test/sys/bus/usb/drivers/hub/3-0:1.0
*120000->100644 blob 49d32d5abd7e26766f4c905f1d4edf1e28f8b322->49d32d5abd7e26766f4c905f1d4edf1e28f8b322 test/sys/bus/usb/drivers/pl2303/3-1:1.0
*120000->100644 blob 03c76193e99a93c7ff45c9ac986d2bc8e0706b0b->03c76193e99a93c7ff45c9ac986d2bc8e0706b0b test/sys/bus/usb/drivers/usb/3-1
*120000->100644 blob 61dc52a61345178c8c171ecfe96df9646af2f16c->61dc52a61345178c8c171ecfe96df9646af2f16c test/sys/bus/usb/drivers/usb/usb3
*120000->100644 blob b7733a68e08e564300212a22c9f81888c12bb55a->b7733a68e08e564300212a22c9f81888c12bb55a test/sys/class/tty/ttyUSB0/device
*120000->100644 blob 9ff2c81f529a95bd93ddaf66de6a72c74166c268->9ff2c81f529a95bd93ddaf66de6a72c74166c268 test/sys/devices/pci0000:00/0000:00:09.0/usb3/3-1/ttyUSB0/driver
thanks,
greg k-h
^ permalink raw reply
* Re: How do I...
From: David Woodhouse @ 2005-05-06 16:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Frank Sorenson, git
In-Reply-To: <Pine.LNX.4.58.0505060905090.2233@ppc970.osdl.org>
On Fri, 2005-05-06 at 09:13 -0700, Linus Torvalds wrote:
> There has been at least two different scripts for this posted, and one C
> source code version.
>
> I just haven't integrated them, because I'm an idiot, and too much choice
> makes me run around in small circles and clucking.
>
> Guys - whoever wrote one of the scripts, can you please send out your
> current version to the git list and cc me, and explain why yours is
> superior to the other peoples version. Please?
I already explained why mine sucks and shouldn't be merged. It was a
proof of concept; hoping for the stone soup effect.
I haven't seen a C version or indeed anything which actually does the
right thing, although I outlined how it would work and _threatened_ to
do one. I had a half-arsed attempt at it on the way home from
linux.conf.au but my brain tends to melt while I'm on airplanes so I
didn't get very far.
--
dwmw2
^ permalink raw reply
* Re: [PATCH] fix compare symlink against readlink not data
From: Greg KH @ 2005-05-06 16:36 UTC (permalink / raw)
To: Kay Sievers; +Cc: Linus Torvalds, git
In-Reply-To: <1115396614.32065.23.camel@localhost.localdomain>
On Fri, May 06, 2005 at 06:23:34PM +0200, Kay Sievers wrote:
> On Fri, 2005-05-06 at 09:03 -0700, Greg KH wrote:
> > On Fri, May 06, 2005 at 03:45:01PM +0200, Kay Sievers wrote:
> > > Fix update-cache to compare the blob of a symlink against the link-target
> > > and not the file it points to. Also ignore all permissions applied to
> > > links.
> > > Thanks to Greg for recognizing this while he added our list of symlinks
> > > back to the udev repository.
> >
> > Hm, even with this patch applied (it's in Linus's tree right now), I
> > still get the following with a clean checked out udev tree:
> > $ cg-diff
> > Index: test/sys/block/cciss!c0d0/device
> > ===================================================================
>
> I can't reproduce this. Are you sure, that the git-core binaries are
> called and not the cogito ones?
>
> git-update-cache --refresh
> git-diff-cache -r HEAD
> from the core-git should print nothing.
Odd. If I reclone the whole tree from the udev kernel.org tree, then it
works just fine. If I create a new copy of my local tree, I still have
the same problem. Diffing the trees shows no difference in the objects
at all...
Can you add a symlink to a local tree and see if you can duplicate this?
thanks,
greg k-h
^ permalink raw reply
* Re: How do I...
From: Junio C Hamano @ 2005-05-06 16:35 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Frank Sorenson, git
In-Reply-To: <Pine.LNX.4.58.0505060905090.2233@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> On Fri, 6 May 2005, Frank Sorenson wrote:
>>
>> Okay, I've got some "How can I?" questions. I hope I'm not the only one
>> still working to "git it".
>>
>> How can I git a list of commits that have modified a particular file?
>> For example, I'd like to do something like this:
>> # git-file-revs Makefile
>> f7eb55878f11575281add2a5726e483aed5e45bb
>> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
>> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
LT> Guys - whoever wrote one of the scripts, can you please send out your
LT> current version to the git list and cc me, and explain why yours is
LT> superior to the other peoples version. Please?
I think I mentioned and posted an interactive version called
jit-trackdown. It is part of JIT found at [*1*]. You may have
an older version that does not have the command.
LT> But I might cook something up myself too.
Yourself or not, I think it is a good idea to do something that
does exactly Frank wants, namely, just list commits. Even
better would be, to take commits with multiple parents into
account, list of <commit> <parent> pairs, like:
$ git-file-revs Makefile
f7eb55....... aaaaaa.......
f7eb55....... bbbbbb.......
aaaaaa....... dddddd.......
which shows commit f7eb55... changed it relative to both of its
parents aaaaaa... and bbbbbb...
[Footnotes]
*1* http://members.cox.net/junkio/
^ permalink raw reply
* Re: [PATCH] fix compare symlink against readlink not data
From: Junio C Hamano @ 2005-05-06 16:26 UTC (permalink / raw)
To: Greg KH; +Cc: Kay Sievers, Linus Torvalds, git
In-Reply-To: <20050506160359.GB6904@kroah.com>
>>>>> "GKH" == Greg KH <greg@kroah.com> writes:
GKH> On Fri, May 06, 2005 at 03:45:01PM +0200, Kay Sievers wrote:
>> Thanks to Greg for recognizing this while he added our list of symlinks
>> back to the udev repository.
GKH> Hm, even with this patch applied (it's in Linus's tree right now), I
GKH> still get the following with a clean checked out udev tree:
GKH> $ cg-diff
GKH> Index: test/sys/block/cciss!c0d0/device
GKH> ===================================================================
GKH> Index: test/sys/block/rd!c0d0/device
GKH> ===================================================================
GKH> Any idea?
I do not use Cogito but probably it is this piece of code in
cg-Xdiffdo. It is assuming that a valid SHA1 means it can diff
against the filesystem object that resides there. It used to be
the case before symlinks but not anymore.
mkbanner () {
loc=$1; treeid=$2; fname=$3; mode=$4; sha1=$5;
if [ "$sha1" != "0000000000000000000000000000000000000000" ]; then
git-cat-file blob $sha1 >$loc
else
ln -s "$(pwd)/$fname" "$loc"
sha1="!"
fi
Maybe changing the if to (I'm writing this in e-mail editor so
completely untested) something like:
if expr "$sha1" : '0*$' >/dev/null ||
expr "$mode" : '.*120000$' >/dev/null
then
git-cat-file blob "$sha1" >$loc
would help?
Also could you try the low-level git command, git-diff-cache -p,
against the tree you are comparing? The built-in diff stuff
might get this wrong too.
^ permalink raw reply
* Re: [PATCH] fix compare symlink against readlink not data
From: Kay Sievers @ 2005-05-06 16:23 UTC (permalink / raw)
To: Greg KH; +Cc: Linus Torvalds, git
In-Reply-To: <20050506160359.GB6904@kroah.com>
On Fri, 2005-05-06 at 09:03 -0700, Greg KH wrote:
> On Fri, May 06, 2005 at 03:45:01PM +0200, Kay Sievers wrote:
> > Fix update-cache to compare the blob of a symlink against the link-target
> > and not the file it points to. Also ignore all permissions applied to
> > links.
> > Thanks to Greg for recognizing this while he added our list of symlinks
> > back to the udev repository.
>
> Hm, even with this patch applied (it's in Linus's tree right now), I
> still get the following with a clean checked out udev tree:
> $ cg-diff
> Index: test/sys/block/cciss!c0d0/device
> ===================================================================
I can't reproduce this. Are you sure, that the git-core binaries are
called and not the cogito ones?
git-update-cache --refresh
git-diff-cache -r HEAD
from the core-git should print nothing.
Thanks,
Kay
^ permalink raw reply
* cg-update doesn't clean away empty directories
From: Luck, Tony @ 2005-05-06 16:22 UTC (permalink / raw)
To: git
I just did a cg-update from Linus' tree, and all the files
in Documentation/BK-Usage were neatly thrown away from my
working directory. But Documentation/BK-Usage itself is
still there. Looking at the output from git-ls-tree it was
removed from the GIT level.
-Tony
^ permalink raw reply
* Re: Version of dirdiff to display diffs between git trees
From: Linus Torvalds @ 2005-05-06 16:19 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
In-Reply-To: <17019.28326.351036.268948@cargo.ozlabs.ibm.com>
On Fri, 6 May 2005, Paul Mackerras wrote:
> The main window summarizes which files have changed. Double-clicking
> on a file name pops up a diff viewer window which displays the
> differences between the different versions of the file in a
> color-coded unidiff format. I find it useful to copy .git/HEAD to
> .git/OLD_HEAD before doing an update on my linux-2.6 repository, and
> then after the update do
If you use git-pull-script, it does this for you (except it calls it
ORIG_HEAD), and you can just do
git-diff-tree -p ORIG_HEAD HEAD
to see the changes. In fact git-pull-script will do that for you, and
output the diffstat of it.
Having the original head is also nice for when you decide that the other
side has had a few too many drugs, in which case you just do
cat .git/ORIG_HEAD > .git/HEAD
git-read-tree -m HEAD
git-checkout-cache -f -a
git-update-cache --refresh
and you're back to your original head (the above is basically "unpull").
Linus
^ permalink raw reply
* Re: Locking the repository
From: Linus Torvalds @ 2005-05-06 16:15 UTC (permalink / raw)
To: Thomas Glanzmann; +Cc: GIT
In-Reply-To: <20050506123122.GF11506@cip.informatik.uni-erlangen.de>
On Fri, 6 May 2005, Thomas Glanzmann wrote:
>
> I need a way to lock a repository for certain actions.
Nope - if you want to serialize something, you'll need to write your own
serialization scripts. git doesn't care, because all the git operations
should be totally lockless already. There just isn't any reason to lock as
far as git is concerned, since the objects are immutable.
The only exception is the "index" file, where we don't want concurrect
index updates. So that is handled by writers creating the new "index.lock"
file first, and then when they are done, they rename it to "index".
Linus
^ permalink raw reply
* Re: How do I...
From: Linus Torvalds @ 2005-05-06 16:13 UTC (permalink / raw)
To: Frank Sorenson; +Cc: git
In-Reply-To: <427B3DB3.4000507@tuxrocks.com>
On Fri, 6 May 2005, Frank Sorenson wrote:
>
> Okay, I've got some "How can I?" questions. I hope I'm not the only one
> still working to "git it".
>
> How can I git a list of commits that have modified a particular file?
> For example, I'd like to do something like this:
> # git-file-revs Makefile
> f7eb55878f11575281add2a5726e483aed5e45bb
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
There has been at least two different scripts for this posted, and one C
source code version.
I just haven't integrated them, because I'm an idiot, and too much choice
makes me run around in small circles and clucking.
Guys - whoever wrote one of the scripts, can you please send out your
current version to the git list and cc me, and explain why yours is
superior to the other peoples version. Please?
But I might cook something up myself too.
> How can I output a list of the filename(s) modified by a particular
> commit? (for example)
> # git-commit-info files 6741f3a7f9922391cd02b3ca1329e669497dc22f
You need to use "git-tree-diff", but it doesn't want one commit, it wants
two.
In the case of "what did this one commit change", you need to look up its
parents (there can be more than one! In fact, the current git repository
has one entry with _five_ parents), and then you need to select one of
them as the reference. In other words, if it's a merge, you need to select
which side you care about.
> Can I use cg-log to output just the information about a particular
> commit? (I don't need all the commits, just the one I'm interested in).
You don't even need cg-log for that. If you already know which commit
you're interested in, just output that one commit:
git-cat-file commit <commit-name-here>
> After doing a cg-update, can I cg-log just the changes since the last
> update? Alternatively, how can I tell cg-log I'm caught up, and don't
> need anything historical?
I don't know how to do with with cg-update, but if you use the
"git-pull-script" thing, you can do
git-diff-tree -p ORIG_HEAD HEAD
which shows you what the pull brought in.
> Can I do these with git/cogito, or will I need to start diving deeper
> into the code?
Apart from finding the "which commit changed this", it's all trivially
doable. And the "which commit" thing is also trivially doable if you just
find the script..
Linus
^ permalink raw reply
* Re: [PATCH] fix compare symlink against readlink not data
From: Greg KH @ 2005-05-06 16:03 UTC (permalink / raw)
To: Kay Sievers; +Cc: Linus Torvalds, git
In-Reply-To: <20050506134501.GA11430@vrfy.org>
On Fri, May 06, 2005 at 03:45:01PM +0200, Kay Sievers wrote:
> Fix update-cache to compare the blob of a symlink against the link-target
> and not the file it points to. Also ignore all permissions applied to
> links.
> Thanks to Greg for recognizing this while he added our list of symlinks
> back to the udev repository.
Hm, even with this patch applied (it's in Linus's tree right now), I
still get the following with a clean checked out udev tree:
$ cg-diff
Index: test/sys/block/cciss!c0d0/device
===================================================================
Index: test/sys/block/rd!c0d0/device
===================================================================
Index: test/sys/block/sda/device
===================================================================
Index: test/sys/bus/pci/devices/0000:00:09.0
===================================================================
Index: test/sys/bus/pci/devices/0000:00:1e.0
===================================================================
Index: test/sys/bus/pci/devices/0000:02:05.0
===================================================================
Index: test/sys/bus/pci/drivers/aic7xxx/0000:02:05.0
===================================================================
Index: test/sys/bus/scsi/devices/0:0:0:0
===================================================================
Index: test/sys/bus/scsi/drivers/sd/0:0:0:0
===================================================================
Index: test/sys/bus/usb-serial/devices/ttyUSB0
===================================================================
Index: test/sys/bus/usb-serial/drivers/PL-2303/ttyUSB0
===================================================================
Index: test/sys/bus/usb/devices/3-0:1.0
===================================================================
Index: test/sys/bus/usb/devices/3-1
===================================================================
Index: test/sys/bus/usb/devices/3-1:1.0
===================================================================
Index: test/sys/bus/usb/devices/usb3
===================================================================
Index: test/sys/bus/usb/drivers/hub/3-0:1.0
===================================================================
Index: test/sys/bus/usb/drivers/pl2303/3-1:1.0
===================================================================
Index: test/sys/bus/usb/drivers/usb/3-1
===================================================================
Index: test/sys/bus/usb/drivers/usb/usb3
===================================================================
Index: test/sys/class/tty/ttyUSB0/device
===================================================================
Index: test/sys/devices/pci0000:00/0000:00:09.0/usb3/3-1/ttyUSB0/driver
===================================================================
Any idea?
thanks,
greg k-h
^ permalink raw reply
* Re: How do I...
From: Dave Kleikamp @ 2005-05-06 14:37 UTC (permalink / raw)
To: Frank Sorenson; +Cc: Git Mailing List
In-Reply-To: <427B3DB3.4000507@tuxrocks.com>
On Fri, 2005-05-06 at 03:49 -0600, Frank Sorenson wrote:
> After doing a cg-update, can I cg-log just the changes since the last
> update? Alternatively, how can I tell cg-log I'm caught up, and don't
> need anything historical?
(Assuming pulling from "origin")
Instead of doing cg-update, do cg-pull. Then "cg-log :origin" will give
you you the changesets you just pulled. "cg-merge origin" will then
complete operation, thereby catching you up.
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply
* [PATCH] make INSTALL binary in Makefile configurable via make variable
From: Thomas Glanzmann @ 2005-05-06 13:46 UTC (permalink / raw)
To: GIT
[PATCH] make INSTALL binary in Makefile configurable via make variable
On Solaris machines gnu install called ginstall
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@
CC=gcc
AR=ar
+INSTALL=install
SCRIPTS=git-apply-patch-script git-merge-one-file-script git-prune-script \
git-pull-script git-tag-script git-resolve-script
@@ -26,7 +27,7 @@
all: $(PROG)
install: $(PROG) $(SCRIPTS)
- install $(PROG) $(SCRIPTS) $(HOME)/bin/
+ $(INSTALL) $(PROG) $(SCRIPTS) $(HOME)/bin/
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o
^ permalink raw reply
* [PATCH] fix compare symlink against readlink not data
From: Kay Sievers @ 2005-05-06 13:45 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
Fix update-cache to compare the blob of a symlink against the link-target
and not the file it points to. Also ignore all permissions applied to
links.
Thanks to Greg for recognizing this while he added our list of symlinks
back to the udev repository.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---
--- a/diff-files.c
+++ b/diff-files.c
@@ -111,7 +111,7 @@ int main(int argc, char **argv)
continue;
}
- if (stat(ce->name, &st) < 0) {
+ if (lstat(ce->name, &st) < 0) {
if (errno != ENOENT) {
perror(ce->name);
continue;
--- a/read-cache.c
+++ b/read-cache.c
@@ -16,6 +16,9 @@ int cache_match_stat(struct cache_entry
switch (ntohl(ce->ce_mode) & S_IFMT) {
case S_IFREG:
changed |= !S_ISREG(st->st_mode) ? TYPE_CHANGED : 0;
+ /* We consider only the owner x bit to be relevant for "mode changes" */
+ if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))
+ changed |= MODE_CHANGED;
break;
case S_IFLNK:
changed |= !S_ISLNK(st->st_mode) ? TYPE_CHANGED : 0;
@@ -43,9 +46,6 @@ int cache_match_stat(struct cache_entry
if (ce->ce_uid != htonl(st->st_uid) ||
ce->ce_gid != htonl(st->st_gid))
changed |= OWNER_CHANGED;
- /* We consider only the owner x bit to be relevant for "mode changes" */
- if (0100 & (ntohl(ce->ce_mode) ^ st->st_mode))
- changed |= MODE_CHANGED;
if (ce->ce_dev != htonl(st->st_dev) ||
ce->ce_ino != htonl(st->st_ino))
changed |= INODE_CHANGED;
--- a/update-cache.c
+++ b/update-cache.c
@@ -64,7 +64,7 @@ static int add_file_to_cache_1(char *pat
struct stat st;
int fd;
unsigned int len;
- char target[1024];
+ char *target;
if (lstat(path, &st) < 0) {
if (errno == ENOENT || errno == ENOTDIR) {
@@ -90,11 +90,14 @@ static int add_file_to_cache_1(char *pat
return -1;
break;
case S_IFLNK:
- len = readlink(path, target, sizeof(target));
- if (len == -1 || len+1 > sizeof(target))
+ target = xmalloc(st.st_size+1);
+ if (readlink(path, target, st.st_size+1) != st.st_size) {
+ free(target);
return -1;
- if (write_sha1_file(target, len, "blob", ce->sha1))
+ }
+ if (write_sha1_file(target, st.st_size, "blob", ce->sha1))
return -1;
+ free(target);
break;
default:
return -1;
@@ -163,6 +166,32 @@ static int compare_data(struct cache_ent
return match;
}
+static int compare_link(struct cache_entry *ce, unsigned long expected_size)
+{
+ int match = -1;
+ char *target;
+ void *buffer;
+ unsigned long size;
+ char type[10];
+ int len;
+ target = xmalloc(expected_size);
+ len = readlink(ce->name, target, expected_size);
+ if (len != expected_size ) {
+ free(target);
+ return -1;
+ }
+ buffer = read_sha1_file(ce->sha1, type, &size);
+ if (!buffer) {
+ free(target);
+ return -1;
+ }
+ if (size == expected_size)
+ match = memcmp(buffer, target, size);
+ free(buffer);
+ free(target);
+ return match;
+}
+
/*
* "refresh" does not calculate a new sha1 file or bring the
* cache up-to-date for mode/content changes. But what it
@@ -194,8 +223,18 @@ static struct cache_entry *refresh_entry
if (changed & (MODE_CHANGED | TYPE_CHANGED))
return ERR_PTR(-EINVAL);
- if (compare_data(ce, st.st_size))
+ switch (st.st_mode & S_IFMT) {
+ case S_IFREG:
+ if (compare_data(ce, st.st_size))
+ return ERR_PTR(-EINVAL);
+ break;
+ case S_IFLNK:
+ if (compare_link(ce, st.st_size))
+ return ERR_PTR(-EINVAL);
+ break;
+ default:
return ERR_PTR(-EINVAL);
+ }
cache_changed = 1;
size = ce_size(ce);
^ permalink raw reply
* [PATCH] Add #include <limits.h> so that git compiles under Solaris
From: Thomas Glanzmann @ 2005-05-06 13:36 UTC (permalink / raw)
To: GIT
[PATCH] Add #include <limits.h> so that git compiles under Solaris
--- a/diff-tree-helper.c
+++ b/diff-tree-helper.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
+#include <limits.h>
#include "cache.h"
#include "strbuf.h"
#include "diff.h"
--- a/diff.c
+++ b/diff.c
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
+#include <limits.h>
#include "cache.h"
#include "diff.h"
--- a/local-pull.c
+++ b/local-pull.c
@@ -5,6 +5,7 @@
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
+#include <limits.h>
#include "cache.h"
#include "commit.h"
#include <errno.h>
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -7,6 +7,7 @@
* creation etc.
*/
#include <stdarg.h>
+#include <limits.h>
#include "cache.h"
const char *sha1_file_directory = NULL;
^ permalink raw reply
* Version of dirdiff to display diffs between git trees
From: Paul Mackerras @ 2005-05-06 13:18 UTC (permalink / raw)
To: git
I have adapted my "dirdiff" program to be able to display differences
between git trees (without checking them out). It can display the
differences between up to 5 trees, each of which can be either a git
tree (identified by a tree id, a commit id or a tag) or the working
directory.
The main window summarizes which files have changed. Double-clicking
on a file name pops up a diff viewer window which displays the
differences between the different versions of the file in a
color-coded unidiff format. I find it useful to copy .git/HEAD to
.git/OLD_HEAD before doing an update on my linux-2.6 repository, and
then after the update do
girdiff OLD_HEAD HEAD
to see what has changed. With the file list I can easily skip over
files that I'm not interested in and then use the diff viewer to look
at changes to files that I do care about.
I have called this version "girdiff" to distinguish it from my normal
dirdiff releases. It is available at:
http://ozlabs.org/~paulus/girdiff
If invoked as girdiff, or if invoked as dirdiff and the -g flag is
given, it will interpret its arguments as git trees rather than
directory or file names. As a special case, the working directory is
indicated by ".".
This is still under development and there are probably bugs - let me
know if you find any.
Paul.
^ permalink raw reply
* Re: visualization tool?
From: Thomas Glanzmann @ 2005-05-06 12:49 UTC (permalink / raw)
To: git
In-Reply-To: <m3ll6sjznk.fsf@defiant.localdomain>
Hello,
someone has ported http://oandrieu.nerim.net/monotone-viz/ to git:
http://grahame.angrygoats.net/viewmtn/revision.psp?id=4998dc296128aaae1bee97460e9e0863fb1e6c1c
Thomas
^ permalink raw reply
* Re: Please rename cg-X* to something else
From: Mads Martin Joergensen @ 2005-05-06 12:42 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Pavel Roskin, git
In-Reply-To: <427A9ECB.8070409@zytor.com>
* H. Peter Anvin <hpa@zytor.com> [May 06. 2005 00:32]:
>
> $prefix/libexec/cogito rather...
These days FHS dictates $prefix/lib/cogito.
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply
* visualization tool?
From: Krzysztof Halasa @ 2005-05-06 12:40 UTC (permalink / raw)
To: git
Hi,
Do we have anything (making sense) that can visualize a git tree?
I know gitweb.pl but it doesn't do what I want: which is displaying
a tree, displaying diffs between specific parents and childs etc.
Somebody mentioned some monotone (IIRC) util hacked for git - does
that make sense?
If there is none, I'm of course going to write one right now. I was
thinking about *HTML output (so it could be used over Internet with
standard protocol and tools), but the language is missing graphical
operations, right?
--
Krzysztof Halasa
^ permalink raw reply
* Locking the repository
From: Thomas Glanzmann @ 2005-05-06 12:31 UTC (permalink / raw)
To: GIT
Hello,
I need a way to lock a repository for certain actions. What can I use to
obtain this? Is there a way to use rsync for that? It should also be
NFS-safe. Are there are any classic unix tools that I can use for this?
Thomas
^ permalink raw reply
* [ISSUE RESOLVED] Problems with threeway diff, checkout-cache and permissions of two blobs
From: Thomas Glanzmann @ 2005-05-06 11:17 UTC (permalink / raw)
To: GIT
Hello,
[ *** ISSUE RESOLVED: Doesn't happen with GIT HEAD *** ]
The following issue is resolved. Just if someone hits the same problem:
I did a merge with two conflicts, which can AFAIK automatically be
resolved. However if I call 'git-checkout-cache -f -a' it fails on me:
(faui01) [~/work/mutt/git/mutt-tg] git pull ../mutt-cstatus
head => 8aa9f8e95f17213a583d28bbc80d15bba01a375d
remote => b54cf35a50e50a8e1bf09f79b714d0f18c8f3c92
base => e8f4a291a81f0a8fb24555f0e36e4b75e2d3f4c8
curs_main.c: unmerged (ff55f1869b953acb2ec816569470e4adb3421c1d)
curs_main.c: unmerged (b5c5275ead8882ed37205b92b2bc88f7799c2ac8)
curs_main.c: unmerged (335c5c978ac580b95168916deb297fb254592079)
protos.h: unmerged (3cda50538b733826e37cd35734e68755173f080c)
protos.h: unmerged (011d63023a7f1d718f90d87a4933c6f50d0fb1de)
protos.h: unmerged (66324e580002ebd6c9d974c4873cc215b6478029)
fatal: write-tree: not able to write tree
Threewaydiff invloved.
<<
This is the error I get from git-checkout-cache the first time:
fatal: internal error: ce_mode is 644
git-checkout-cache failed: child exit value: 1 at /home/cip/adm/sithglan/work/git/yagf/git line 942.
(faui01) [~/work/mutt/git/mutt-tg] git-ls-tree HEAD | grep ^0 | grep blob
000644 blob d43160b921f037dc45dba6cf80dd22520ac17c7e curs_main.c
000644 blob 210fe03ed3004c45b9548c7f7d1e011bb216c468 protos.h
Note ^ while every else this is '1' for files.
(faui01) [~/work/mutt/git/mutt-tg] rm -rf *
(faui01) [~/work/mutt/git/mutt-tg] git-read-tree HEAD
(faui01) [~/work/mutt/git/mutt-tg] git-checkout-cache -f -a
error: checkout-cache: unknown file mode for curs_main.c
Thomas
^ permalink raw reply
* Re: How do I...
From: Thomas Glanzmann @ 2005-05-06 10:03 UTC (permalink / raw)
To: git
In-Reply-To: <20050506095904.GC11506@cip.informatik.uni-erlangen.de>
Hello,
> git-diff-tree <child> <parent>
of course this is: git-diff-tree <parent> <child>
Thomas
^ 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