[PATCH] x86_64: ignore machine checks from boot time
tree a4a017f686f101b5817f6c1abbc84518335d497e parent cf7bee5a0bf270a4eace0be39329d6ac0136cc47 author Andi Kleen [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:07 -0700 committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:37 -0700 [PATCH] x86_64: ignore machine checks from boot time Don't log machine check events left over from boot. Too many BIOSes leave bogus events in there. This unfortunately also makes it impossible to log events that caused a reboot. For people with non broken BIOS there is mce=bootlog Signed-off-by: Andi Kleen [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] Documentation/x86_64/boot-options.txt |5 + arch/x86_64/kernel/mce.c | 16 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt @@ -6,6 +6,11 @@ only the AMD64 specific ones are listed Machine check mce=off disable machine check + mce=bootlog Enable logging of machine checks left over from booting. + Disabled by default because some BIOS leave bogus ones. + If your BIOS doesn't do that it's a good idea to enable though + to make sure you log even machine check events that result + in a reboot. nomce (for compatibility with i386): same as mce=off diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -36,6 +36,7 @@ static unsigned long bank[NR_BANKS] = { static unsigned long console_logged; static int notify_user; static int rip_msr; +static int mce_bootlog; /* * Lockless MCE logging infrastructure. @@ -197,10 +198,11 @@ void do_machine_check(struct pt_regs * r rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr); mce_get_rip(m, regs); - if (error_code != -1) + if (error_code = 0) rdtscll(m.tsc); wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0); - mce_log(m); + if (error_code != -2) + mce_log(m); /* Did this bank cause the exception? */ /* Assume that the bank with uncorrectable errors did it, @@ -315,7 +317,7 @@ static void mce_init(void *dummy) /* Log the machine checks left over from the previous reset. This also clears all registers */ - do_machine_check(NULL, -1); + do_machine_check(NULL, mce_bootlog ? -1 : -2); set_in_cr4(X86_CR4_MCE); @@ -476,11 +478,17 @@ static int __init mcheck_disable(char *s } /* mce=off disables machine check. Note you can reenable it later - using sysfs */ + using sysfs. + mce=bootlog Log MCEs from before booting. Disabled by default to work + around buggy BIOS that leave bogus MCEs. */ static int __init mcheck_enable(char *str) { + if (*str == '=') + str++; if (!strcmp(str, off)) mce_dont_init = 1; + else if (!strcmp(str, bootlog)) + mce_bootlog = 1; else printk(mce= argument %s ignored. Please use /sys, str); return 0; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ppc32: 8xx: convert fec driver to use work_struct
tree 6bdc59e8f55e86862d71d650e023f6d766ab920c parent 68b47139ea94ab6d05e89c654db8daa99e9a232c author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:28 -0700 committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:38 -0700 [PATCH] ppc32: 8xx: convert fec driver to use work_struct 8xx: convert fec driver to use work_struct Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] arch/ppc/8xx_io/fec.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c @@ -173,7 +173,7 @@ struct fec_enet_private { uintphy_status; uintphy_speed; phy_info_t *phy; - struct tq_struct phy_task; + struct work_struct phy_task; uintsequence_done; @@ -1263,8 +1263,9 @@ static void mii_display_status(struct ne printk(.\n); } -static void mii_display_config(struct net_device *dev) +static void mii_display_config(void *priv) { + struct net_device *dev = (struct net_device *)priv; struct fec_enet_private *fep = dev-priv; volatile uint *s = (fep-phy_status); @@ -1294,8 +1295,9 @@ static void mii_display_config(struct ne fep-sequence_done = 1; } -static void mii_relink(struct net_device *dev) +static void mii_relink(void *priv) { + struct net_device *dev = (struct net_device *)priv; struct fec_enet_private *fep = dev-priv; int duplex; @@ -1323,18 +1325,16 @@ static void mii_queue_relink(uint mii_re { struct fec_enet_private *fep = dev-priv; - fep-phy_task.routine = (void *)mii_relink; - fep-phy_task.data = dev; - schedule_task(fep-phy_task); + INIT_WORK(fep-phy_task, mii_relink, (void *)dev); + schedule_work(fep-phy_task); } static void mii_queue_config(uint mii_reg, struct net_device *dev) { struct fec_enet_private *fep = dev-priv; - fep-phy_task.routine = (void *)mii_display_config; - fep-phy_task.data = dev; - schedule_task(fep-phy_task); + INIT_WORK(fep-phy_task, mii_display_config, (void *)dev); + schedule_work(fep-phy_task); } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ppc32: 8xx: fec: fix interrupt handler prototypes
tree 0957806533b81aba75fd2926a9acac9421af13b5 parent fc007ddd609ccfce1cd392e65eed05aba8db32ce author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:36 -0700 committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700 [PATCH] ppc32: 8xx: fec: fix interrupt handler prototypes 8xx: fec: fix interrupt handler prototypes Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] arch/ppc/8xx_io/fec.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c @@ -199,7 +199,8 @@ static int fec_enet_start_xmit(struct sk #ifdef CONFIG_USE_MDIO static void fec_enet_mii(struct net_device *dev); #endif /* CONFIG_USE_MDIO */ -static void fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs); +static irqreturn_t fec_enet_interrupt(int irq, void * dev_id, + struct pt_regs * regs); #ifdef CONFIG_FEC_PACKETHOOK static void fec_enet_tx(struct net_device *dev, __u32 regval); static void fec_enet_rx(struct net_device *dev, __u32 regval); @@ -471,7 +472,7 @@ fec_timeout(struct net_device *dev) /* The interrupt handler. * This is called from the MPC core interrupt. */ -static void +static irqreturn_t fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; @@ -525,6 +526,7 @@ printk(%s[%d] %s: unexpected FEC_ENET_M } } + return IRQ_RETVAL(IRQ_HANDLED); } @@ -1403,11 +1405,11 @@ mii_discover_phy(uint mii_reg, struct ne /* This interrupt occurs when the PHY detects a link change. */ -static void +static #ifdef CONFIG_RPXCLASSIC -mii_link_interrupt(void *dev_id) +void mii_link_interrupt(void *dev_id) #else -mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) +irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) #endif { #ifdef CONFIG_USE_MDIO @@ -1440,6 +1442,9 @@ mii_link_interrupt(int irq, void * dev_i printk(%s[%d] %s: unexpected Link interrupt\n, __FILE__,__LINE__,__FUNCTION__); #endif /* CONFIG_USE_MDIO */ +#ifndef CONFIG_RPXCLASSIC + return IRQ_RETVAL(IRQ_HANDLED); +#endif /* CONFIG_RPXCLASSIC */ } static int - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ppc32: 8xx fix CPM ethernet description
tree 68245a74f6d80f3501084d84d3041e0fab83b72b parent fbccb3d7f56654dbc407f757c884f22d26264e42 author Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:40 -0700 committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700 [PATCH] ppc32: 8xx fix CPM ethernet description 8xx: fix CPM Ethernet description Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Aristeu Sergio Rozanski Filho [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] arch/ppc/8xx_io/Kconfig |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ppc/8xx_io/Kconfig b/arch/ppc/8xx_io/Kconfig --- a/arch/ppc/8xx_io/Kconfig +++ b/arch/ppc/8xx_io/Kconfig @@ -71,7 +71,7 @@ config ENET_BIG_BUFFERS bool Use Big CPM Ethernet Buffers depends on NET_ETHERNET help - Allocate large buffers for MPC8xx Etherenet. Increases throughput + Allocate large buffers for MPC8xx Ethernet. Increases throughput and decreases the likelihood of dropped packets, but costs memory. config HTDMSOUND - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Move the fix to align node_end_pfns to a proper location
tree 80fbfdcae56d07e7bcf27c3927e383ad3e35e378 parent 079da354db3473b56eb938ca53a2cb0804ea9c8c author Ravikiran G Thirumalai [EMAIL PROTECTED] Sun, 07 Aug 2005 23:42:50 -0700 committer Linus Torvalds [EMAIL PROTECTED] Mon, 08 Aug 2005 00:00:39 -0700 [PATCH] Move the fix to align node_end_pfns to a proper location Move the fix to align node_end_pfns to a proper location. The earlier fix made the node_remap_start_vaddr to get misaligned causing remap_numa_kva to barf again :-/ Signed-off-by: Ravikiran Thirumalai [EMAIL PROTECTED] Signed-off-by: Shai Fultheim [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] arch/i386/mm/discontig.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -243,14 +243,6 @@ static unsigned long calculate_numa_rema /* now the roundup is correct, convert to PAGE_SIZE pages */ size = size * PTRS_PER_PTE; - if (node_end_pfn[nid] (PTRS_PER_PTE-1)) { - /* -* Adjust size if node_end_pfn is not on a proper -* pmd boundary. remap_numa_kva will barf otherwise. -*/ - size += node_end_pfn[nid] (PTRS_PER_PTE-1); - } - /* * Validate the region we are allocating only contains valid * pages. @@ -270,6 +262,17 @@ static unsigned long calculate_numa_rema reserve_pages += size; printk(Shrinking node %d from %ld pages to %ld pages\n, nid, node_end_pfn[nid], node_end_pfn[nid] - size); + + if (node_end_pfn[nid] (PTRS_PER_PTE-1)) { + /* +* Align node_end_pfn[] and node_remap_start_pfn[] to +* pmd boundary. remap_numa_kva will barf otherwise. +*/ + printk(Shrinking node %d further by %ld pages for proper alignment\n, + nid, node_end_pfn[nid] (PTRS_PER_PTE-1)); + size += node_end_pfn[nid] (PTRS_PER_PTE-1); + } + node_end_pfn[nid] -= size; node_remap_start_pfn[nid] = node_end_pfn[nid]; } - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] VIA VT8235 PCI quirk
tree 1ab80c4bb980fec383047e8e07a0fb8fa77b5994 parent db6778db7eb1d974e1ae0da326530f09c13585ac author Ivan Kokshaysky [EMAIL PROTECTED] Mon, 08 Aug 2005 12:55:54 +0400 committer Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 01:46:24 -0700 [PATCH] VIA VT8235 PCI quirk Like many other southbridges from different manufacturers, VIA VT8235 chip has two non-standard BARs for power management and SMBus registers (see the datasheet at http://www.via.com.tw). This new quirk routine fixes boot problem with 2.6.13-rc2/rc6 kernels on Targa Visionary 811 Athlon64 laptop, as reported by Mikael Pettersson [EMAIL PROTECTED]. Signed-off-by: Ivan Kokshaysky [EMAIL PROTECTED] Signed-off-by: Linus Torvalds [EMAIL PROTECTED] drivers/pci/quirks.c | 19 +++ 1 files changed, 19 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -373,6 +373,25 @@ static void __devinit quirk_vt82c686_acp } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi ); +/* + * VIA VT8235 ISA Bridge: Two IO regions pointed to by words at + * 0x88 (128 bytes of power management registers) + * 0xd0 (16 bytes of SMB registers) + */ +static void __devinit quirk_vt8235_acpi(struct pci_dev *dev) +{ + u16 pm, smb; + + pci_read_config_word(dev, 0x88, pm); + pm = PCI_BASE_ADDRESS_IO_MASK; + quirk_io_region(dev, pm, 128, PCI_BRIDGE_RESOURCES); + + pci_read_config_word(dev, 0xd0, smb); + smb = PCI_BASE_ADDRESS_IO_MASK; + quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 1); +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_8235, quirk_vt8235_acpi); + #ifdef CONFIG_X86_IO_APIC - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[TG3]: Save initial PCI state before registering the netdevice.
tree 790200fcdef86e91224903394023b964a3a52e47 parent 6fc0b4a7a73a81e74d0004732df358f4f9975be2 author David S. Miller [EMAIL PROTECTED] Sat, 06 Aug 2005 20:35:48 -0700 committer David S. Miller [EMAIL PROTECTED] Sat, 06 Aug 2005 20:35:48 -0700 [TG3]: Save initial PCI state before registering the netdevice. Else on SMP systems it is possible for hotplug to execute, invoke tg3_open(), and end up loading the uninitialized PCI register save area into the card. Signed-off-by: David S. Miller [EMAIL PROTECTED] drivers/net/tg3.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -66,8 +66,8 @@ #define DRV_MODULE_NAMEtg3 #define PFX DRV_MODULE_NAME: -#define DRV_MODULE_VERSION 3.34 -#define DRV_MODULE_RELDATE July 25, 2005 +#define DRV_MODULE_VERSION 3.35 +#define DRV_MODULE_RELDATE August 6, 2005 #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE0 @@ -10421,6 +10421,12 @@ static int __devinit tg3_init_one(struct tg3_init_coal(tp); + /* Now that we have fully setup the chip, save away a snapshot +* of the PCI config space. We need to restore this after +* GRC_MISC_CFG core clock resets and some resume events. +*/ + pci_save_state(tp-pdev); + err = register_netdev(dev); if (err) { printk(KERN_ERR PFX Cannot register net device, @@ -10430,12 +10436,6 @@ static int __devinit tg3_init_one(struct pci_set_drvdata(pdev, dev); - /* Now that we have fully setup the chip, save away a snapshot -* of the PCI config space. We need to restore this after -* GRC_MISC_CFG core clock resets and some resume events. -*/ - pci_save_state(tp-pdev); - printk(KERN_INFO %s: Tigon3 [partno(%s) rev %04x PHY(%s)] (PCI%s:%s:%s) %sBaseT Ethernet , dev-name, tp-board_part_number, - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Revert [PATCH] PCI: restore BAR values...
tree 893613626de4794a7b13fe6793bdebc79420c433 parent 138b9dd1fd7b44176af4f3b672060c790b0eaf55 author Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 08:46:09 -0700 committer Linus Torvalds [EMAIL PROTECTED] Tue, 09 Aug 2005 08:46:09 -0700 Revert [PATCH] PCI: restore BAR values... Revert commit fec59a711eef002d4ef9eb8de09dd0a26986eb77, which is breaking sparc64 that doesn't have a working pci_update_resource. We'll re-do this after 2.6.13 when we'll do it all properly. arch/sparc64/kernel/pci.c |6 drivers/pci/pci.c | 59 +++--- drivers/pci/setup-res.c |2 - include/linux/pci.h |3 -- 4 files changed, 5 insertions(+), 65 deletions(-) diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -413,12 +413,6 @@ static int pci_assign_bus_resource(const return -EBUSY; } -void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) -{ - /* Not implemented for sparc64... */ - BUG(); -} - int pci_assign_resource(struct pci_dev *pdev, int resource) { struct pcidev_cookie *pcp = pdev-sysdata; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -222,37 +222,6 @@ pci_find_parent_resource(const struct pc } /** - * pci_restore_bars - restore a devices BAR values (e.g. after wake-up) - * @dev: PCI device to have its BARs restored - * - * Restore the BAR values for a given device, so as to make it - * accessible by its driver. - */ -void -pci_restore_bars(struct pci_dev *dev) -{ - int i, numres; - - switch (dev-hdr_type) { - case PCI_HEADER_TYPE_NORMAL: - numres = 6; - break; - case PCI_HEADER_TYPE_BRIDGE: - numres = 2; - break; - case PCI_HEADER_TYPE_CARDBUS: - numres = 1; - break; - default: - /* Should never get here, but just in case... */ - return; - } - - for (i = 0; i numres; i ++) - pci_update_resource(dev, dev-resource[i], i); -} - -/** * pci_set_power_state - Set the power state of a PCI device * @dev: PCI device to be suspended * @state: PCI power state (D0, D1, D2, D3hot, D3cold) we're entering @@ -270,7 +239,7 @@ int (*platform_pci_set_power_state)(stru int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { - int pm, need_restore = 0; + int pm; u16 pmcsr, pmc; /* bound the state we're entering */ @@ -309,17 +278,14 @@ pci_set_power_state(struct pci_dev *dev, return -EIO; } - pci_read_config_word(dev, pm + PCI_PM_CTRL, pmcsr); - /* If we're in D3, force entire word to 0. * This doesn't affect PME_Status, disables PME_En, and * sets PowerState to 0. */ - if (dev-current_state = PCI_D3hot) { - if (!(pmcsr PCI_PM_CTRL_NO_SOFT_RESET)) - need_restore = 1; + if (dev-current_state = PCI_D3hot) pmcsr = 0; - } else { + else { + pci_read_config_word(dev, pm + PCI_PM_CTRL, pmcsr); pmcsr = ~PCI_PM_CTRL_STATE_MASK; pmcsr |= state; } @@ -342,22 +308,6 @@ pci_set_power_state(struct pci_dev *dev, platform_pci_set_power_state(dev, state); dev-current_state = state; - - /* According to section 5.4.1 of the PCI BUS POWER MANAGEMENT -* INTERFACE SPECIFICATION, REV. 1.2, a device transitioning -* from D3hot to D0 _may_ perform an internal reset, thereby -* going to D0 Uninitialized rather than D0 Initialized. -* For example, at least some versions of the 3c905B and the -* 3c556B exhibit this behaviour. -* -* At least some laptop BIOSen (e.g. the Thinkpad T21) leave -* devices in a D3hot state at boot. Consequently, we need to -* restore at least the BARs so that the device will be -* accessible to its driver. -*/ - if (need_restore) - pci_restore_bars(dev); - return 0; } @@ -855,7 +805,6 @@ struct pci_dev *isa_bridge; EXPORT_SYMBOL(isa_bridge); #endif -EXPORT_SYMBOL_GPL(pci_restore_bars); EXPORT_SYMBOL(pci_enable_device_bars); EXPORT_SYMBOL(pci_enable_device); EXPORT_SYMBOL(pci_disable_device); diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -26,7 +26,7 @@ #include pci.h -void +static void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) { struct pci_bus_region region; diff --git a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -225,7 +225,6 @@ #define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */ #define
GIT 0.99.4 preview: current status
Things are looking almost ready for a new release. The list at the end of this message shows what went into the release candidate branch since 0.99.3: Dan's commit walker updates to deal with a packed repository, Johannes fixed quite a lot of problems in the documentation, I did reference-renaming push, a couple of usability improvements from Linus, gitk updates from Paul, and Ryan added an bulk e-mailer. With help from Kalle, Horst and Chris Wright, binary packaging looks in a better shape now. I'll let this simmer for a couple more days, and plan to merge them back to the master branch on Wednesday and tag it as v0.99.4. Some of the patches I will receive before Wednesday from the list, and some of what I already have in the proposed update branch, may graduate to the master branch before that happens. Earlier, I posted my itchlist. I would of course appreciate if somebody scratches them, but at the same time would appreciate people to voice their own itches. My personal 0.99.5 itches are to enhance fetch to deal with multiple references and have local-pull to deal with a packed repository. Dan's help would be greatly appreciated on the latter one. Oh, another itch I did not list in the previous message. Is anybody interested in doing an Emacs VC back-end for GIT? BTW, I used git log v0.99.3..rc | git shortlog to prepare the attached list, but ended up hand-removing many Merge with blah entries. It may not be a bad idea to have an option to filter out the merge entries at git log time. Adding '--single-parent-only' flag to git-rev-list would be one way of doing it. Suggestions? Alecs King: Fix sparse warnings [EMAIL PROTECTED]: Object library enhancements Parallelize the pull algorithm Parallelize pulling by ssh Holger Eitzenberger: git: add git_mkstemp() git: use git_mkstemp() instead of mkstemp() for diff generation. Horst von Brand: RPM spec updates. Johannes Schindelin: git-commit-script fix for degenerated merge Assorted documentation patches Junio C Hamano: Clean t/trash upon make clean as well. Make send-pack --all and explicit ref mutually exclusive. receive-pack hooks updates. Make sure leading directories exist when pushing refs. git-send-email-script: minimum whitespace cleanup. send-pack: handle partial pushes correctly. Install sample hooks Renaming push. git-send-pack: documentation Retire check-files. Retire git-check-files documentation too. git-bisect termination condition fix. git-init-db: brown paper bag bugfix. Fix send-pack for non-commitish tags. Update get_sha1() to grok extended format. Teach rev-list since..til notation. daemon.c: squelch error message from EINTR git-applymbox: allow retrying after fixing up. Fix refname termination. Fix ref_newer() in send-pack. send-pack: allow the same source to be pushed more than once. send-pack: allow generic sha1 expression on the source side. gitk proposed fix: handle more than one SHA1 links. Redo the templates generation and installation. GIT 0.99.4 (release candidate) Fix RPM build that omitted templates and tools. Fix build rules for debian package. (revert local fix) Update Maintainer field of debian/control Kalle Valo: Fix debian doc-base Linus Torvalds: Make git-sh-setup-script do what it was supposed to do Extend git reset to take a reset point gitk parent information in commit window Nicolas Pitre: list shortlog items in commit order Paul Mackerras: Compress the graph horizontally if it gets too wide. Add forward and back buttons and make SHA1 IDs clickable links. Change cursor to a hand cursor when over a SHA1 ID link. Use lf translation rather than binary when reading commit data. Better graph line details display and expand history coverage. Petr Baudis: Fix git-merge-cache -q Ryan Anderson: Add git-send-email-script - tool to send emails from git-format-patch-script Add documentation for git-send-email-script Add new dependencies caused by git-send-email-script to debian/control Convert from using quoted-printable to just 8bit encoding on all emails. Cleanup initial comments, add copyright notices. Add --chain-reply-to to git-send-email-script, to control whether or not the git-send-email-script: Reformat readline interface and generate a better message-id. Make the SMTP server used by git-sendm-email-script configurable on the command line with --smtp-server git-send-email-script - fix 2 small bugs that snuck through an untested bout of editing. git-send-email-script - Fix loops that limit emails to unique values to be pedantically correct. Doc: update git-send-email-script documentation. Sergey Vlasov: Plug memory leaks in git-unpack-objects - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Teach git push .git/branches shorthand
Hi, On Sun, 7 Aug 2005, Junio C Hamano wrote: I hear a lot of people mention $GIT_DIR/branches/ is confusing. Maybe we should rename it to $GIT_DIR/remote/ directory? I'd prefer $GIT_DIR/remotes/. And I propose another extension: Since the files stored therein right now contain only one remote string, it should be possible to add the default head(s) to the file. Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Stash away the original head in ORIG_HEAD when resetting.
Hi, On Sun, 7 Aug 2005, Junio C Hamano wrote: $ git commit -m ORIG_HEAD Since there are not many users of git-commit's *-m* flag right now: Is it necessary to confuse CVS people, who expect to be able to write git commit -m I did this and that I do not want to be too intrusive, but I think up to now there is just the mailbox tools which use this feature, and users of git-reset. Thoughts? Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Stash away the original head in ORIG_HEAD when resetting.
Hi, On Mon, 8 Aug 2005, Johannes Schindelin wrote: Hi, On Sun, 7 Aug 2005, Junio C Hamano wrote: $ git commit -m ORIG_HEAD Since there are not many users of git-commit's *-m* flag right now: Is it necessary to confuse CVS people, who expect to be able to write git commit -m I did this and that I do not want to be too intrusive, but I think up to now there is just the mailbox tools which use this feature, and users of git-reset. Thoughts? Sorry, forgot -rebase and -cherry. Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Make curl fail on server error
Some http servers return an HTML error page and git reads it as normal data. Adding -f option makes curl fail silently. Signed-off-by: Catalin Marinas [EMAIL PROTECTED] --- git-clone-dumb-http |2 +- git-fetch-script |2 +- git-ls-remote-script |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git-clone-dumb-http b/git-clone-dumb-http --- a/git-clone-dumb-http +++ b/git-clone-dumb-http @@ -14,7 +14,7 @@ if [ -n $GIT_SSL_NO_VERIFY ]; then fi http_fetch () { # $1 = Remote, $2 = Local - curl -ns $curl_extra_args $1 $2 + curl -nsf $curl_extra_args $1 $2 } cd $D diff --git a/git-fetch-script b/git-fetch-script --- a/git-fetch-script +++ b/git-fetch-script @@ -15,7 +15,7 @@ http://* | https://*) fi _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40=$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40 - head=$(curl -ns $curl_extra_args $merge_repo/$merge_head) + head=$(curl -nsf $curl_extra_args $merge_repo/$merge_head) expr $head : $_x40\$ /dev/null || { echo 2 Failed to fetch $merge_head from $merge_repo exit 1 diff --git a/git-ls-remote-script b/git-ls-remote-script --- a/git-ls-remote-script +++ b/git-ls-remote-script @@ -46,7 +46,7 @@ http://* | https://* ) if [ -n $GIT_SSL_NO_VERIFY ]; then curl_extra_args=-k fi - curl -ns $curl_extra_args $peek_repo/info/refs || exit 1 + curl -nsf $curl_extra_args $peek_repo/info/refs || exit 1 ;; rsync://* ) - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Teach git push .git/branches shorthand
Hi, On Mon, 8 Aug 2005, Josef Weidendorfer wrote: IMHO, $GIT_DIR/branches/ is really confusing. Hmmm... in $GIT_DIR/branches/ there are named references to remote (named) references. Not necessarily. The following is perfectly valid: echo rsync://rsync.kernel.org/pub/scm/git/git.git .git/branches/x It does not contain a named reference, just a host. Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Teach git push .git/branches shorthand
On Monday 08 August 2005 11:55, Johannes Schindelin wrote: Hi, On Mon, 8 Aug 2005, Josef Weidendorfer wrote: IMHO, $GIT_DIR/branches/ is really confusing. Hmmm... in $GIT_DIR/branches/ there are named references to remote (named) references. Not necessarily. The following is perfectly valid: echo rsync://rsync.kernel.org/pub/scm/git/git.git .git/branches/x It does not contain a named reference, just a host. Not really. Your example defaults to the master head. It is perfectly valid (at least cogito usage), to have the reference appended as an anchor: echo rsync://rsync.kernel.org/pub/scm/git/git.git#pu .git/branches/pu For lightweight remote tag, even a SHA1 as anchor should be possible. Josef Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: use of temporary refs in resolve
Junio C Hamano [EMAIL PROTECTED] wrote: Catalin Marinas [EMAIL PROTECTED] writes: Is FETCH_HEAD going to be preserved by the git-fetch-script operation? It should be, unless, git-pull-script removes it or it is changed to do the fetch as well. I am not quite sure what is being asked (especially operation; I take it you meant surgery or butchering), so my answer may be missing the point. OK, I wasn't that clear. Currently git-fetch-script stores the fetched head in the FETCH_HEAD file and git-pull-script uses this file to do the merging (by passing its content to git-resolve-script). Anyway, I can easily change StGIT to only use git-pull-script directly, without the intermediate fetch. I would like to update fetch to deal with multiple references, and if the user tells it to fetch N references, the FETCH_HEAD file would contain N lines, one line for each SHA1 object name. Initially I will not allow pull to take more than one reference because I will need to make resolve capable of resolving more than two parents (i.e. octopus merge) before that happens. But once that is done, then pull will accept N references and call fetch with these N references, then fetch leaves N lines in FETCH_HEAD, and those N SHA1 object names along with the current head would be given to resolve to create an (N+1)-head king ghidorah. I do not know how well this would go, but at least that is the current plan. It might be hard to deal with conflicts resulted from merging N 2 heads at the same time. I suspect it would call 'merge' (diff3) for every new head but it might not be that obvious which head merging failed (it depends on how you implement it). A way of continuing the merge for the rest of the fetched heads after a failure needs to be available. -- Catalin - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Request for help from binary packaging people.
On Mon, 08 Aug 2005 10:38:44 -0700 Junio C Hamano wrote: For RPM, from my lack of RPM expertise (and RPM capable environment until recently), I have not updated the Prereq: field in git-core.spec.in at all. That Prereq: should be Requires: instead. Prereq: also enforces installation ordering between packages; it is required when the package has some installation scripts (%pre, %post) - in this case all packages which are needed to execute these scripts must be listed in Prereq:. In case of git-core there are no such scripts (at least for now), so Requires: should be used - then the package manager will be free to install packages in any order as long as all dependencies will be satisfied in the end. I would appreciate somebody to sanity check the list of dependencies. The dependency list Debian side has is more up-to-date and I am reasonably sure it is accurate. It lists patch, diff, and rcs (for the merge command) as the essential dependency (aside from the shared libraries like libc), and libmail-sendmail-perl, rsync, curl, ssh, and libemail-valid-perl as the recommended dependency. I do not even know if RPM has the notion of such multi-tier dependencies, but the latter list is meant to mean you could live without these, but to exercise this package fully you may want them (in our case of git-core, you could live without the networking if you do not do multi-user, multi-repository). RPM does not have Suggests and Recommends like dpkg - all RPM dependencies are strict. Because of this limitation, a single RPM package is often split into several binary subpackages. If RPM spec file has a way to say something like that, I would like to see these packages (probably their names are different between Debian and RPM) listed on the recommended dependency list; otherwise I would want to see them added to the main Prereq: list. Not only the names of packages are different between Debian and RPM - the names of similar RPM packages are different between different RPM-based distributions. :( E.g., in ALT Linux distributions /usr/bin/ssh is contained in the openssh-clients package; SuSE 9.3 seems to have it in the package named openssh. There are lots of such differences. Most modern RPM-based distributions have some mechanism to find dependencies automatically (e.g., by scanning all Perl scripts in the package for use statements). But these mechanisms are incompatible between different distributions too. Different distributions also have different RPM packaging conventions, different RPM macros, etc etc... So the best thing you can really do is to provide an RPM package for some distribution you choose, which would then be used as a basis for packages on other distributions. pgpeX0VOZP2hi.pgp Description: PGP signature
[PATCH 0/4] Plug some more memory leaks in git
Hello! This set of patches fixes some more memory leaks which I have found in git. Especially the write_sha1_to_fd() leak was noticeable when running git-ssh-push. -- Sergey Vlasov pgpHMTIIDB3N1.pgp Description: PGP signature
[PATCH 1/4] Plug memory leak in read_object_with_reference()
[PATCH] Plug memory leak in read_object_with_reference() When following a reference, read_object_with_reference() did not free the intermediate object data. Signed-off-by: Sergey Vlasov [EMAIL PROTECTED] --- sha1_file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) f7d16d6b83698fd7858ad28340b3e87780322261 diff --git a/sha1_file.c b/sha1_file.c --- a/sha1_file.c +++ b/sha1_file.c @@ -1165,6 +1165,7 @@ void *read_object_with_reference(const u free(buffer); return NULL; } + free(buffer); /* Now we have the ID of the referred-to object in * actual_sha1. Check again. */ } - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] Plug memory leak in sha1close()
[PATCH] Plug memory leak in sha1close() sha1create() and sha1fd() malloc the returned struct sha1file; sha1close() should free it. Signed-off-by: Sergey Vlasov [EMAIL PROTECTED] --- csum-file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) 2207ae4977cbaa84636487ca24bad9d1116f54e0 diff --git a/csum-file.c b/csum-file.c --- a/csum-file.c +++ b/csum-file.c @@ -45,6 +45,7 @@ int sha1close(struct sha1file *f, unsign sha1flush(f, 20); if (close(f-fd)) die(%s: sha1 file error on close (%s), f-name, strerror(errno)); + free(f); return 0; } - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] Plug memory leak in git-pack-objects
[PATCH] Plug memory leak in git-pack-objects find_deltas() should free its temporary objects before returning. Signed-off-by: Sergey Vlasov [EMAIL PROTECTED] --- pack-objects.c |4 1 files changed, 4 insertions(+), 0 deletions(-) 8b38f80b97affd0d9808b8f276a9e2e04bf03464 diff --git a/pack-objects.c b/pack-objects.c --- a/pack-objects.c +++ b/pack-objects.c @@ -382,6 +382,10 @@ static void find_deltas(struct object_en if (idx = window) idx = 0; } + + for (i = 0; i window; ++i) + free(array[i].data); + free(array); } int main(int argc, char **argv) - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Request for help from binary packaging people.
* Junio C Hamano ([EMAIL PROTECTED]) wrote: For RPM, from my lack of RPM expertise (and RPM capable environment until recently), I have not updated the Prereq: field in git-core.spec.in at all. I would appreciate somebody to sanity check the list of dependencies. The dependency list Debian side has is more up-to-date and I am reasonably sure it is accurate. It lists patch, diff, and rcs (for the merge command) as the essential dependency (aside from the shared libraries like libc), and libmail-sendmail-perl, rsync, curl, ssh, and libemail-valid-perl as the recommended dependency. I do not even know if RPM has the notion of such multi-tier dependencies, but the latter list is meant to mean you could live without these, but to exercise this package fully you may want them (in our case of git-core, you could live without the networking if you do not do multi-user, multi-repository). If RPM spec file has a way to say something like that, I would like to see these packages (probably their names are different between Debian and RPM) listed on the recommended dependency list; otherwise I would want to see them added to the main Prereq: list. I'd say the proper rpm method would be with subpackages with their own prereqs. Also, rpm is able to determine the perl dependencies automatically (of course, ditto for shared libraries). Now, the only issue is this package is unlikely to install because of the Mail/Sendmail.pm and Email/Valid.pm requirements. We can add specific package requirements for those since they are less common. Here's the actual install dependency list: $ rpm -qp /home/chrisw/rpms/RPMS/i386/git-core-0.99.4-1.i386.rpm --requires /bin/sh /usr/bin/env /usr/bin/perl diffutils libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2.3) libc.so.6(GLIBC_2.3) libcrypto.so.4 libcurl.so.3 libssl.so.4 libz.so.1 mktemp = 1.5 perl(Data::Dumper) perl(Email::Valid) perl(File::Basename) perl(File::Path) perl(File::Spec) perl(File::Temp) perl(Getopt::Long) perl(Getopt::Std) perl(IO::Pipe) perl(IO::Socket) perl(Mail::Sendmail) perl(POSIX) perl(Term::ReadLine) perl(Time::Local) perl(strict) perl(warnings) rcs rpmlib(CompressedFileNames) = 3.0.4-1 rpmlib(PayloadFilesHavePrefix) = 4.0-1 rpmlib(VersionedDependencies) = 3.0.3-1 rsync sh-utils - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] git_mkstemp() fix
Hi, attached is a bugfix for the newly introduced git_mkstemp() function. /holger git_mkstemp() bugfix --- commit 8cccfa75e0095afd2dd4ec354f2786068c9e7a2f tree 354e00b03039e0c42284442c9764dcd3bf8f608f parent d59a6043a8a7aed97c684fb4f14fe5221df1fcaf author Holger Eitzenberger [EMAIL PROTECTED] Mon, 08 Aug 2005 23:29:28 +0200 committer Holger Eitzenberger [EMAIL PROTECTED] Mon, 08 Aug 2005 23:29:28 +0200 path.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/path.c b/path.c --- a/path.c +++ b/path.c @@ -68,8 +68,13 @@ int git_mkstemp(char *path, size_t len, if ((env = getenv(TMPDIR)) == NULL) { strcpy(pch, /tmp/); len -= 5; - } else - len -= snprintf(pch, len, %s/, env); + pch += 5; + } else { + size_t n = snprintf(pch, len, %s/, env); + + len -= n; + pch += n; + } safe_strncpy(pch, template, len);
Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards
Pavel Roskin [EMAIL PROTECTED] writes: Quoting GNU Coding Standards (info standards): If there are C compiler options that _must_ be used for proper compilation of certain files, do not include them in `CFLAGS'. Users expect to be able to specify `CFLAGS' freely themselves. Quoting Documentation/CodingStyle: This is a short document describing the preferred coding style for the linux kernel. Coding style is very personal, and I won't _force_ my views on anybody, but this is what goes for anything that I have to be able to maintain, and I'd prefer it for most other things too. Please at least consider the points made here. First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture. This was only a tongue-in-cheek comment ;-). Seriously, I do not intend to discarded this patch, but I am currently not taking Makefile patches unless they fix real breakage. I do want to revisit Makefile issues after 0.99.4, along with the changes Pasky sent several days ago. Please remind me about them after Wednesday. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git revert (Re: pci_update_resource() getting called on sparc64)
Linus Torvalds [EMAIL PROTECTED] writes: On Mon, 8 Aug 2005, Junio C Hamano wrote: Totally untested. I acquired your habit of coding in my e-mail client ;-). Looks good. Although I also have this advanced testing habit of just reading the email and if it looks sane it tested out ok ;) Heh, I immediately spotted two bugs after I sent it out, one mine, another yours. * dereferencing potential tag to get to the underlying commit was a good idea of mine, poorly executed. It should rev-parse $rev^0, not $commit^0. * git commit does not take commit message from stdin. I think we should do something like this: diff --git a/git-commit-script b/git-commit-script --- a/git-commit-script +++ b/git-commit-script @@ -92,11 +92,13 @@ then rm .editmsg exit 1 fi -case $use_commit in -'') +if test -t 0 $use_commit = +then ${VISUAL:-${EDITOR:-vi}} .editmsg - ;; -esac +else + echo 2 (reading commit message from standard input) + cat .editmsg +fi grep -v '^#' .editmsg | git-stripspace .cmitmsg [ -s .cmitmsg ] tree=$(git-write-tree) - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
A simple script to do the reverse of git-push
Hi list, I mentioned in another mail that I needed the opposite of git-push, namely getting all heads, and if they are strict parents of the local refs, just update them. Well, Junio pointed out that it's easy using the available tools, and he was right. The result is attached (and tested...). This script makes it easy to work with a central repository, multiple heads and users, in a CVS style: to start your day, you call the attached script, and after you have committed something, you can do a push on the repository. Sometimes, the push fails, then you have to pull that branch in order to merge it before trying a push again. BTW, if you are lazy, like me, you just pull from Junio once in a while and do a make test. Turns out there is a missing dependency though: peek-remote.o: cache.h which in my case lead to a git-peek-remote program which was unable to peek any ref. Ciao, Dscho #!/bin/sh . git-sh-setup-script || die Not a git archive . git-parse-remote $@ repo=$_remote_repo git-ls-remote-script --heads $repo | while read sha1 refname; do shortname=$(basename $refname) if [ -e $GIT_DIR/$refname ]; then if [ $sha1 = $(cat $GIT_DIR/$refname) ]; then echo $shortname up to date. 12 continue fi fi git-cat-file commit $sha1 /dev/null 21 || git-fetch-script $repo $shortname if [ ! -e $GIT_DIR/$refname ]; then echo Got new head $shortname 12 echo $sha1 $GIT_DIR/$refname else origsha1=$(cat $GIT_DIR/$refname) if [ -z $(git-rev-list $origsha1 ^$sha1) ]; then echo Updated head $shortname 12 echo $sha1 $GIT_DIR/$refname else saveref=$GIT_DIR/FETCH_HEAD_$shortname echo Error: $shortname not a child of remote head 12 echo Saved remote head to $saveref 12 echo $sha1 $saveref fi fi done
git-commit-script, was Re: git revert (Re: pci_update_resource() getting called on sparc64)
Hi, On Mon, 8 Aug 2005, Junio C Hamano wrote: * git commit does not take commit message from stdin. I think we should do something like this: [...] And could we rename the *-m* flag at the same time? Because I often catch myself typing git commit -m Some_commit_message Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Request for help from binary packaging people.
Chris Wright [EMAIL PROTECTED] writes: ... Also, rpm is able to determine the perl dependencies automatically (of course, ditto for shared libraries). I take it to mean that we do not have to explicitly list perl module dependencies. If that is the case then I presume that the current dependency list is fine. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Request for help from binary packaging people.
* Junio C Hamano ([EMAIL PROTECTED]) wrote: Chris Wright [EMAIL PROTECTED] writes: ... Also, rpm is able to determine the perl dependencies automatically (of course, ditto for shared libraries). I take it to mean that we do not have to explicitly list perl module dependencies. If that is the case then I presume that the current dependency list is fine. That's correct. The only benefit to itemzing the package level dependency in this case is just for an error message that tells you which package you're missing rather than the low-level perl module. thanks, -chris - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git revert (Re: pci_update_resource() getting called on sparc64)
Linus Torvalds [EMAIL PROTECTED] writes: Or if you want to be more CVS-like, use -F, and accept - for stdin? Yes my vote goes: -m message -c from this commit, literally. -C from this commit, but let me edit the log further. -F from this file. -F - stdin But I like test -t 0 regardless. Very few editors are ok with non-tty stdin, although I could imagine some disturbed individual having ed as their editor and expecting to be able to pipe commands into it or something. I am a disturbed individual who always works in Emacs and run git commit in the compilation buffer, setting EDITOR to emacsclient. Admittably the compilation buffer uses pty, so test -t 0 would succeed, though. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git-commit-script, was Re: git revert (Re: pci_update_resource() getting called on sparc64)
Linus Torvalds [EMAIL PROTECTED] writes: Most of us don't use 300bps terminals any more, so typing a few extra characters is probably ok. Again you are right. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards
On Mon, Aug 08, 2005 at 01:53:24PM -0700, Junio C Hamano wrote: I do want to revisit Makefile issues after 0.99.4, along with the changes Pasky sent several days ago. Please remind me about them after Wednesday. We should discuss (or just do) a reorganization of how we lay out the source tree. There's probably a few too many files in the top directory, from all the porcelain we've built on the plumbing. (heh) I haven't really given a lot of thought to this yet, but I was thinking of something along these lines: Rename tools/ to mail-tools/, push git-send-email-script into that. Create a porcelain directory for things like git-bisect-script Create a core directory for things like git-commit-script Create a src (?) directory for *.[ch] Maybe move documentation into the same directory as the scripts they belong to. Then we can argue over where the leftover things fall. If we can get the directory structure to make sense and start putting new things into the right spots, the exact location of where *current* things end up is probably not so important. I consider this post 1.0 material, personally. -- Ryan Anderson sometimes Pug Majere - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards
Hi, On Mon, 8 Aug 2005, Ryan Anderson wrote: [...] We should discuss (or just do) a reorganization of how we lay out the source tree. [...] I, for one, like the layout. There are not yet enough files to merit a hierarchy, and what's more: I can add the source-directory to my PATH and be done by compiling every time I pull. But you're right in any case, it is post 1.0 discussion material. Ciao, Dscho - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git revert (Re: pci_update_resource() getting called on sparc64)
Hi, On Mon, 8 Aug 2005, Junio C Hamano wrote: Linus Torvalds [EMAIL PROTECTED] writes: Or if you want to be more CVS-like, use -F, and accept - for stdin? Yes my vote goes: -m message -c from this commit, literally. -C from this commit, but let me edit the log further. -F from this file. -F - stdin The royal penguin speaketh, and the little blue penguin gets a fish: [PATCH] git commit usage is more like cvs's Teach git-commit-script about different ways to provide a commit message, including the famous -m flag from CVS. --- git-commit-script | 48 ++-- 1 files changed, 34 insertions(+), 14 deletions(-) 457d879496cb5f742ed6bccc9a435f414b0fd2a7 diff --git a/git-commit-script b/git-commit-script --- a/git-commit-script +++ b/git-commit-script @@ -6,20 +6,41 @@ . git-sh-setup-script || die Not a git archive usage () { - die 'git commit [--all] [-m existing-commit] [path...]' + die 'git commit [options] [path...] +Options: + --all automatically do a git-update-cache on all modified + files + -m messageuse this message in the commit + -c commit use the same message as in the given commit + -C commit as -c, but let me edit it + -F file take the message from file + -F -take the message from stdin' } files=() +call_editor=true +rm -f .editmsg || die Could not write edit message while case $# in 0) break ;; esac do case $1 in +-m|-c|-C|-F) + [ $# -ne 1 ] || usage;; +esac + +case $1 in -m) shift -case $# in - 0) usage ;; - *) use_commit=`git-rev-parse --verify $1` || - exit ;; - esac - ;; + call_editor= + echo $1 .editmsg;; +-c) shift + call_editor= + use_commit=`git-rev-parse --verify $1` || + exit ;; +-C) shift + use_commit=`git-rev-parse --verify $1` || + exit ;; +-F) shift + call_editor= + cat $1 .editmsg;; --all) files=($(git-diff-files --name-only))\ ;; @@ -42,7 +63,7 @@ if [ ! -r $GIT_DIR/HEAD ]; then echo # git-ls-files | sed 's/^/# New file: /' echo # - ) .editmsg + ) .editmsg PARENTS= else if [ -f $GIT_DIR/MERGE_HEAD ]; then @@ -83,7 +104,7 @@ else export GIT_AUTHOR_DATE git-cat-file commit $use_commit | sed -e '1,/^$/d' - fi .editmsg + fi .editmsg git-status-script .editmsg fi if [ $? != 0 -a ! -f $GIT_DIR/MERGE_HEAD ] @@ -92,11 +113,10 @@ then rm .editmsg exit 1 fi -case $use_commit in -'') - ${VISUAL:-${EDITOR:-vi}} .editmsg - ;; -esac + +[ -z $use_commit -o $call_editor = true ] +${VISUAL:-${EDITOR:-vi}} .editmsg + grep -v '^#' .editmsg | git-stripspace .cmitmsg [ -s .cmitmsg ] tree=$(git-write-tree) - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
git tag can't take piped input?
Apparently I was under a rock sleeping when git-tag-script changed to no longer take input from stdin. So my script which did: TAG=$(echo $TAG_MSG | git-tag-script $RELEASE) echo $TAG .git/refs/tags/$RELEASE Is broken in two ways. First it's no longer building an annotated tag, second it creaets a zero length file .git/refs/tags/$RELEASE. Second issue is trivial to fix in my script. First one needs some change in the tag script. Below is a simple patch for a stab at fixing. thanks, -chris -- Allow users to create a tag message by passing message on command line instead of requiring an $EDITOR session. Signed-off-by: Chris Wright [EMAIL PROTECTED] --- diff --git a/git-tag-script b/git-tag-script --- a/git-tag-script +++ b/git-tag-script @@ -4,13 +4,14 @@ . git-sh-setup-script || die Not a git archive usage () { -echo 2 Usage: git-tag-script [-a | -s] [-f] tagname +echo 2 Usage: git-tag-script [-a | -s] [-f] [-m tag message] tagname exit 1 } annotate= signed= force= +message= while case $# in 0) break ;; esac do case $1 in @@ -24,6 +25,11 @@ do -f) force=1 ;; +-m) + annotate=1 + shift + message=$1 + ;; -*) usage ;; @@ -48,10 +54,14 @@ tagger=$(git-var GIT_COMMITTER_IDENT) || trap 'rm -f .tmp-tag* .tagmsg .editmsg' 0 if [ $annotate ]; then -( echo # - echo # Write a tag message - echo # ) .editmsg -${VISUAL:-${EDITOR:-vi}} .editmsg || exit +if [ -z $message ]; then +( echo # + echo # Write a tag message + echo # ) .editmsg +${VISUAL:-${EDITOR:-vi}} .editmsg || exit +else +echo $message .editmsg +fi grep -v '^#' .editmsg | git-stripspace .tagmsg - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git revert (Re: pci_update_resource() getting called on sparc64)
[PATCH] Adapt git-cherry and git-rebase-script to latest changes of git commit Teach git-cherry and git-rebase-script to use the -c option, since -m means something different to git-commit-script now. Signed-off-by: Johannes Schindelin [EMAIL PROTECTED] --- git-cherry|2 +- git-rebase-script |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 34d6840882e65109a17fa02bf2cefec269fd7637 diff --git a/git-cherry b/git-cherry --- a/git-cherry +++ b/git-cherry @@ -23,7 +23,7 @@ The output is intended to be used as: while read commit do GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p $commit - git-commit-script -m $commit + git-commit-script -c $commit done ' diff --git a/git-rebase-script b/git-rebase-script --- a/git-rebase-script +++ b/git-rebase-script @@ -37,7 +37,7 @@ do esac S=`cat $GIT_DIR/HEAD` GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p $commit - git-commit-script -m $commit || { + git-commit-script -c $commit || { echo $commit $fail git-read-tree --reset -u $S } - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Make git-rev-tree obsolete
Hi, Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and therefore it should not be removed. This patch changes git-changes-script over to git-rev-list: --- git-changes-script.orig Tue Aug 9 02:21:36 2005 +++ git-changes-script Tue Aug 9 02:20:53 2005 @@ -85,14 +85,14 @@ base=$(cat .git/HEAD) || exit 1 fi -git-rev-tree $base | sort -rn ${tmpfile}.base +git-rev-list $base ${tmpfile}.base if [ -n $remote ]; then [ -d $remote/.git ] || exit 1 if [ -z $tobase ]; then tobase=$(cat $remote/.git/HEAD) || exit 1 fi pushd $remote /dev/null - git-rev-tree $tobase | sort -rn ${tmpfile}.remote + git-rev-list $tobase ${tmpfile}.remote diff -u ${tmpfile}.base ${tmpfile}.remote | grep ^${diffsearch}[^${diffsearch}] | cut -c 1- ${tmpfile}.diff rm -f ${tmpfile}.base ${tmpfile}.remote mv ${tmpfile}.diff ${tmpfile}.base @@ -103,7 +103,7 @@ [ -s ${tmpfile}.base ] || exit 0 -cat ${tmpfile}.base | while read time commit parents; do +cat ${tmpfile}.base | while read commit; do showcommit $commit echo -e \n-- - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Teach git push .git/branches shorthand
Johannes Schindelin [EMAIL PROTECTED] writes: I'd prefer $GIT_DIR/remotes/. And I propose another extension: Since the files stored therein right now contain only one remote string, it should be possible to add the default head(s) to the file. That makes sense. Currently my arrangement is: $ cd .git/branches grep . public-* public-master:http://www.kernel.org/pub/scm/git/git.git/ public-pu:http://www.kernel.org/pub/scm/git/git.git/#pu public-rc:http://www.kernel.org/pub/scm/git/git.git/#rc and in order to get the references on the public server to make sure people are seeing what I want them to see, I say: $ for h in master pu rc do echo $h git fetch public-$h git-rev-parse $h public-$h done Instead, I should be able to say: $ cat .git/remotes/public http://www.kernel.org/pub/scm/git/git.git/#pu:public-pu,rc:public-rc to mean that the following two are equivalent: $ git fetch public $ git fetch public pu:public-pu rc:public-rc that is, fetch pu there and store it in refs/heads/public-pu (same for rc). When I want to fetch only pu from there: $ git fetch public pu:public-pu or even $ git fetch public pu should work. If I happen to want to fetch pu one-shot but not want to update my local refs/heads/public-pu, then I should be able to say $ git fetch public pu: Another thing I need to worry about is that I would want to use this remotes information for pushing as well, but probably the reference mappings are different when fetching and pushing. With something like this: $ cat .git/remotes/ko kernel.org:/pub/scm/git/git.git/#master:ko-master,pu:ko-pu,rc:ko-rc $ git fetch ko rc I would fetch the remote ref rc and store it in refs/heads/ko-rc, which is fine, but after that I would do my work in the local repository, merge things up and update my local rc (not ko-rc, which to me is a reference only branch), and eventually when pushing I would want to store my rc (again not ko-rc) in rc over there. This means the reference mapping in these two shorthand notations should be flexible enough to allow me to do: $ git fetch ko rc ;# get rc from there store it under ko-rc here which is equivalent to $ git fetch ko rc:ko-rc and $ git push ko rc ;# push rc here to rc there which is equivalent to $ git push ko rc:rc Maybe its time to do a file format that is a bit more flexible. For example: $ cat .git/remotes/ko URL: kernel.org:/pub/scm/git/git.git/ Fetch-Reference: master:ko-master pu:ko-pu rc:ko-rc Push-Reference: master pu rc Note that I do not mean Push-Reference can not do the rename. I could have written master:master but I did not because I do _not_ want renaming push in this example. People who do not need different mappings for fetch/push should be able to say: $ cat .git/remotes/public URL: http://www.kernel.org/pub/scm/git/git.git/ Reference: pu:public-pu rc:public-rc Another thing I should mention is that Fetch-Reference mapping is remote:local, while Push-Reference is local:remote. This is only because I feel always using src:dst is easy to remember, is the way it works for the command line refs for git push already, and is the way I plan to enhance fetch to grok. My current thinking is Reference should take remote:local because fetching/pulling is probably more common than pushing, but I need to think a bit more about it. Johannes, sorry for doing my design work in an e-mail buffer to you ;-). - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: use of temporary refs in resolve
Catalin Marinas [EMAIL PROTECTED] writes: OK, I wasn't that clear. Currently git-fetch-script stores the fetched head in the FETCH_HEAD file and git-pull-script uses this file to do the merging (by passing its content to git-resolve-script). Correct. I was not planning to change that arrangement. Anyway, I can easily change StGIT to only use git-pull-script directly, without the intermediate fetch. If you are happy then I should not complain ;-), and I am certainly not complaining, but I still have this feeling that I do not get what you are getting at. You can change it to directly use pull without intermediate fetch, in order to cope with what? Could you explain how you currently do things, and what changes I will be making would break the way you currently do things please? I need to know which detail of the current implementation behaviour people rely on to avoid breaking things. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Teach git push .git/branches shorthand
Josef Weidendorfer [EMAIL PROTECTED] writes: My point being that I still can say git pull x some_non_default_head with a file x in .git/branches. Is this currently possible? Not right now, but that is the plan. My understanding of .git/branches was that Cogito uses this as mapping of remote branches/heads to local branches/refs, and not to store shortcuts for remote git repositories. IMHO, the above usage is a kind of type mismatch, as the x already contains the branch. You can look at it this way: x which already contains the branch can specify the default branch if command line did not say anything, but the command line can override it. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Make git-rev-tree obsolete
Johannes Schindelin [EMAIL PROTECTED] writes: Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and therefore it should not be removed. This patch changes git-changes-script over to git-rev-list: Just to make things clear, Junio remarked that Cogito also seems to use it as well, so git-rev-tree is not going away. - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Make git-rev-tree obsolete
On Mon, Aug 08, 2005 at 07:49:26PM -0700, Junio C Hamano wrote: Johannes Schindelin [EMAIL PROTECTED] writes: Junio remarked that Jeff's git-changes-script still uses git-rev-tree, and therefore it should not be removed. This patch changes git-changes-script over to git-rev-list: Just to make things clear, Junio remarked that Cogito also seems to use it as well, so git-rev-tree is not going away. git-changes-script is basically an old Cogito script, as you can see from looking at the source code. I only use it for cd /repos/misc-2.6 git-changes-script -L ../linux-2.6 i.e. where there are two separate trees, rather than separate branches that I normally work with. Jeff - To unsubscribe from this list: send the line unsubscribe git in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html