So I am having a strange issue in using the git command to fetch the most up to date kernel version. Specifically, when the kernel jumps from one release candidate to another, I am not picking that up using git pull from a bash script. For example I use the following.
Present Kernel Source Files are downloaded to the folder ~/linux
Change to folder ~/linux and run the command: **git pull https://github.com/torvalds/linux.git
**
The git pull command does not seem to advance to kernel-3.1-rc8 from kernel-3.1rc7 and I wonder if the difference might be a released rc# as opposed to the next release being worked on, but its got me confused. When I seem to be stuck as say kernel-3.1-rc6, I removed the entire source folder and ran the commands and then I got kernel-3.1-rc7. Tonight, I was stuck on one PC at kernel-3.1-rc7 even as another I started over came up with kernel-3.1-rc8. So, I actually switched to the ~/linux folder and ran **git pull **with no location and it fetched rc8. But I am unable to repeat that feat, but just get an error message. I basically don’t understand what goes on when we advance to the next release candidate and how to get it without removing it all and starting over. I am running git show-ref from the ~/linux folder to determine the kernel versions I have in my source folders. Here is an example of how I am using it all:
Humm . . . I don’t seem to be seeing the same behavior. My git kernel source was at v3.1-rc6, from which I did a git pull and it grabbed both new tags:
What exactly happened when you did a git pull from your 3.1-rc7? You mentioned there was an error message - did git give and exit status? Also did you try running a git pull just manually (not with with the script)?
Well basically it just seems stuck at rc7. Since I started afresh on another PC, I saw it came up with rc8. So, I am not sure what has to be done to get to rc8. Now consider that doing it manually may work while attempting to automate it might not. I am just not really sure. It is starting to get late here tonight, but I do wish to continue looking at this on Thursday and thanks so much for your input on this problem LewsTherinTelemon.
So there does not seem to be many comments here. Is that due to no one having an answer or understanding the problem or is this a case where if you have to ask, you should not be trying to fix the problem? Humm… Well, here is the most recent sequence in attempt to get git to work automatically.
We assume the git linux source folder and files already exists.
cd ~/linux
git checkout remotes/origin/HEAD
git pull https://github.com/torvalds/linux.git
git pull
Is there anything more that is needed. Anything here not needed. Any comments? Is it raining in Spain right now? Anything relevant would be helpful.
git show-ref
git show-ref |tail -1
e7f2a88548df497544d4fafca79836bbd8b6342e refs/tags/v3.1-rc8
git show-ref |tail -1 |cut -f1 -d " "
e7f2a88548df497544d4fafca79836bbd8b6342e
git checkout e7f2a88548df497544d4fafca79836bbd8b6342e
Previous HEAD position was 47ea91b... Resource: fix wrong resource
window calculation
HEAD is now at a102a9e... Linux 3.1-rc8
So its possible my present source folder has a problem and should be removed, but when I run through your commands, all which match yours until the last one where here is what I get:
james@Linux-Master:~/linux> git checkout e7f2a88548df497544d4fafca79836bbd8b6342e
error: Your local changes to the following files would be overwritten by checkout:
Documentation/networking/scaling.txt
arch/powerpc/platforms/powermac/pci.c
arch/s390/include/asm/elf.h
arch/s390/mm/pgtable.c
arch/sparc/include/asm/spitfire.h
arch/sparc/include/asm/xor_64.h
arch/sparc/kernel/cpu.c
arch/sparc/kernel/cpumap.c
arch/sparc/kernel/head_64.S
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_64.c
arch/sparc/kernel/setup_32.c
arch/sparc/kernel/setup_64.c
arch/sparc/mm/init_64.c
block/blk-core.c
block/blk-sysfs.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sdvo.c
drivers/infiniband/hw/cxgb3/iwch_cm.c
drivers/media/video/omap/omap_vout.c
drivers/media/video/omap3isp/ispccdc.c
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/uvc/uvc_entity.c
drivers/media/video/uvc/uvc_video.c
drivers/media/video/uvc/uvcvideo.h
drivers/media/video/v4l2-dev.c
drivers/media/video/v4l2-device.c
drivers/net/bnx2x/bnx2x_dcb.c
drivers/net/bnx2x/bnx2x_main.c
drivers/net/bnx2x/bnx2x_reg.h
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/l2t.c
drivers/net/cxgb3/l2t.h
drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-hcmd.c
drivers/net/wireless/iwlegacy/iwl-tx.c
drivers/net/wireless/iwlegacy/iwl3945-base.c
drivers/net/wireless/iwlegacy/iwl4965-base.c
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/rtlwifi/usb.c
drivers/s390/cio/cio.c
drivers/scsi/3w-9xxx.c
drivers/scsi/Makefile
drivers/scsi/aacraid/commsup.c
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
drivers/scsi/libsas/sas_expander.c
include/trace/events/writeback.h
init/main.c
kernel/resource.c
net/batman-adv/soft-interface.c
net/ceph/ceph_common.c
net/ceph/messenger.c
net/ceph/osd_client.c
net/ceph/osdmap.c
net/ipv6/ip6mr.c
net/ipv6/route.c
net/wireless/nl80211.c
net/xfrm/xfrm_policy.c
Please, commit your changes or stash them before you can switch branches.
Aborting
I did look to see that e7f2a88548df497544d4fafca79836bbd8b6342e does match yours and used mine next just to make sure. But the final command seems to always fail.