Re: [git patch] add and use include/linux/magic.h

From: Jeff Garzik
Date: Sun Sep 24 2006 - 20:28:42 EST

Linus Torvalds wrote:

On Sun, 24 Sep 2006, Jeff Garzik wrote:
Along the lines of linux/poison.h, do a similar thing with filesystem
superblock (and later perhaps, other) magic numbers. This permits
us to delete several headers which -only- included the superblock
magic number, and it integrates well with dwmw2's header_check /
header_install stuff.

Ok, I'm a little worried that somebody might want its own magic number, but not have its namespace poisoned by other peoples magic numbers (think some user-level program like "e2fsck"), but I guess it's unlikely to be a real problem.

Yeah, especially given that the namespace has separate prefixed for separate filesystems.

One more thing: your "please pull" looks fine, but if you were to also add the "--summary" argument to the diffstat generation, I'd have seen:

Please pull from 'magic' branch of magic

to receive the following updates:

fs/affs/affs.h | 1 -
fs/affs/super.c | 1 +
include/linux/smb.h | 3 +--
include/linux/usbdevice_fs.h | 3 +--
30 files changed, 67 insertions(+), 85 deletions(-)

followed by:

delete mode 100644 include/linux/affs_fs.h
delete mode 100644 include/linux/hpfs_fs.h
create mode 100644 include/linux/magic.h
delete mode 100644 include/linux/openprom_fs.h

which is nice. You see which files actually disappear or appear (or are renamed). Ok?

Right now I just pipe 'git diff master..branch' to diffstat.

I've attached the script I use, it's pretty basic.

Since I'm using the normal diffstat, "just add --summary" won't work. What is the full command line you were looking for?




REPO=`basename $PWD`

echo "Please pull from '$BRANCH' branch of" > $TEXT_OUT
echo "$REPO.git $BRANCH" \
echo "" >> $TEXT_OUT
echo "to receive the following updates:" >> $TEXT_OUT
echo "" >> $TEXT_OUT

git diff master..$BRANCH | diffstat -p1 >> $TEXT_OUT
echo "" >> $TEXT_OUT
git log --no-merges master..$BRANCH | git shortlog >> $TEXT_OUT
git diff master..$BRANCH >> $TEXT_OUT