git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Is there any plan to support partial checkout or submoudule improvement?

From
Ffranky <yinping@kooxoo.com>
Date
Oct 16, 2007, 09:56 UTC
Message-ID
<20071016095622.CE14F7E6F@mail.kooxoo.com>
In-Reply-To
<8c5c35580710160142x1f699208gfc226072a27e997a@mail.gmail.com>
Show 8 quoted lines
> Well, there is always
> 
> $ git archive --remote=<repo> <revspec> <path> | tar -x
> 
> This is effectively a partial checkout of an arbitrary revision from a
> remote repo.
> 
> --

That's actually "a single command", but a little complex. And there still are some problems with this single command

1. each time is full checkout (not incremental), so bad performance for
large bin directory
2. I can't know deployment version easily and I can't use "git-log" to see
the log and to decide which version to back to when necessary.
I just find an ugly resolution:
1. git-clone host:project.git project
Cloned project is as follows (src, bin are subdir instead of submodule)
project
    src
    bin
    .git
2. cd project && rm -rf src
3. when project.git changed, then
   git-fetch && git-checkout origin/master bin

Unfortulately, it's annoying when I run git-status which complains "deleted: src ". And "git-log" will not show the newest log since git-checkout doesn't update the index file

So, the alternative for the 3rd step is
	git-pull && rm src
It's so ugly!

Suggestion 1: how about adding a paths option for git-status just like git-diff and git-log Suggestion 2: how about changes the default paths for "git-diff", "git-log" and so on from the "top dir with .git" to "the current dir"? So when I'm in bin directory and run "git-log", it will only report log or diff in bin directory. franky

Previous: Lars HjemliNext: Lars Hjemli
Message 5 of 11 in “Is there any plan to support partial checkout or submoudule improvement?”
  1. frankyOct 16, 2007
  2. Lars HjemliOct 16, 2007
  3. frankyOct 16, 2007
  4. Lars HjemliOct 16, 2007
  5. frankyOct 16, 2007
  6. Lars HjemliOct 16, 2007
  7. frankyOct 16, 2007
  8. Johannes SchindelinOct 16, 2007
  9. frankyOct 16, 2007
  10. Jan HudecOct 16, 2007
  11. frankyOct 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.