Re: [git-users] Git Notes - Search Functionality

2013-02-27 Thread Konstantin Khomoutov
On Tue, 26 Feb 2013 17:22:23 -0800 (PST)
krishna chaitanya kurnala kkc...@gmail.com wrote:

I working on Git Notes. *I want to know if there is an easy way to 
 obtain a list of all namespaces with notes objects in a specific
 git repository.* We can easily create, edit, merge git notes with
 commands if we know the namespaces and/or the sha. But, for example,
 *Has anyone tried to search for a string in a git notes objects* for
 that project etc? The closest i can think of is using some options
 with git logs, for example, git log --show-notes=*  --format=%H %N
 etc.

I fail to parse your question (there's no mention of namespace
anywhere in the git-notes manual page) but anyway it seems your
question is better suited for the main Git list (which is
git at vger.kernel.org [1]) as it appears to be about Git internals.
Be sure to not post HTML to that list as it will be rejected by the
list management software.

1. http://vger.kernel.org/vger-lists.html#git

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] File modified after git clone

2013-02-27 Thread José Guilherme Vanz
I opened the modified file with a hexa viewer and the end of the lines
are 0D0A ( CRLF ).

In my project on the file .gitattributes is:*.java text
*.scala text
*.xml text
*.properties text
*.properties.default text
*.sh text
*.pig text
*.py text
*.md text

PS: My file is a java source



On 27 February 2013 00:24, Dale R. Worley wor...@alum.mit.edu wrote:

  From: José Guilherme Vanz guilherme@gmail.com
 
  For a better explanation. This modified file is shown like all its lines
  have been deleted and included again...

 That symptom means that the file formerly had LF line endings and was
 replaced by the version with CR-LF line endings (or vice-versa).
 Carefully extract both versions, and examine them with a program that
 shows you the line endings.

 Dale

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.





-- 
Att. José Guilherme Vanz
br.linkedin.com/pub/josé-guilherme-vanz/51/b27/58b/http://br.linkedin.com/pub/jos%C3%A9-guilherme-vanz/51/b27/58b/
http://blog.pt-br.libreoffice.org/
https://groups.google.com/d/forum/openqg

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Interlocking

2013-02-27 Thread Konstantin Khomoutov
On Tue, 26 Feb 2013 22:25:58 -0500
wor...@alum.mit.edu (Dale R. Worley) wrote:

 Is Git properly interlocked for multi-user use?
 
 By that I mean, if two processes on one computer simultaneously
 execute Git commands on the same directory, does Git ensure that the
 repository is not damaged, and the commands act reasonably (which
 might be simply failing)?

Depends on what you call the same directory.
Git commands also fall into different categories depending on what they
do.

Git protectes certain (all? most? -- I don't really know) accesses to
its *repository* ensuring that concurrent accesses to the repository
are properly serialized.  If this wasn't true, pushing to and pulling
from remote repositories would fail miserably.

On the other hand, *the work tree* -- the area where the checkout is
kept and from which you `git add` modifications etc -- is not protected
in any way because it's not really under the Git's control.

What remains, are commands manipulating the index.
I do not really know if Git ensures concurrent commands manipulating
its contents are serialized or not.  I'd study the source code or ask
the devs on the main Git list.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Interlocking

2013-02-27 Thread Dale R. Worley
 From: Konstantin Khomoutov flatw...@users.sourceforge.net

 Depends on what you call the same directory.
 Git commands also fall into different categories depending on what they
 do.

I'm particularly interested in what happens if a process executes git
gc --aggressive.  Are there dangers if another process executes Git
command simultaneously?

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] File modified after git clone

2013-02-27 Thread Dale R. Worley
 From: José Guilherme Vanz guilherme@gmail.com
 
 I opened the modified file with a hexa viewer and the end of the lines
 are 0D0A ( CRLF ).

Now extract the *previous* version of the file, the one that Git
thinks is so different, and look at its ends of lines.

Dale

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] git: Command not found.

2013-02-27 Thread banacan99
I have a clone of a local repository on my computer, and when I try to 
issue any git command from Terminal I get this git: Command not found.. 
 That seems to indicate that git is not in the directory containing the 
clone, but it is.  In fact I have used GITX (the graphical interface for 
Mac) to make 10 commits to this clone, so I know it exists.  Plus, I can 
see the .git directory within the directory containing the clone.  And I 
have an exclude file in .git  info to exclude tracking images, etc.

Can someone explain why I can't access this clone through Terminal? 

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] git: Command not found.

2013-02-27 Thread Ryan Hodson

 I have a clone of a local repository on my computer, and when I try to
 issue any git command from Terminal I get this git: Command not found..
  That seems to indicate that git is not in the directory containing the
 clone, but it is.


Actually, this is indicating that the git program can't be found on your
computer. It sounds like you have in fact installed Git, so this probably
means you haven't added it to your PATH environment variable. Try running
the following in your Terminal:

export PATH=/usr/local/git/bin:$PATH

Then try running your git command again. You'll probably want to add this
like to your ~/.bash_profile so you don't have to worry about doing it
every time you need the Git command line.

Hope that helps,
Ryan

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Gergely Polonkai
If you are familiar with symlinks under Linux, you can think of submodules
as such. You add a reference to another git repository, check it out to a
subdirectory, and you are done. The Git book has a chapter on it:

http://git-scm.com/book/en/Git-Tools-Submodules


On 27 February 2013 23:21, Ben McCann benjamin.j.mcc...@gmail.com wrote:

 Anyone have any experience using subtree?

 Thanks!
 -Ben


 On Monday, February 25, 2013 8:21:50 PM UTC-8, Ben McCann wrote:

 I'm fairly new to git and am trying to determine if git subtree would be
 helpful for managing our company's codebase, which has several repos some
 of which depend on each other. All the examples I've seen make sense to me
 as a one-time operation to merge separate repos into one monolithic one or
 to split one monolithic repo into separate repos. I'm having a harder time
 understanding how this fits into a larger picture and what the workflow for
 working with subtree would be.

 If I have a bunch of repos on GitHub and some depend on each other, how
 would I set them up to work with subtree? Would GitHub continue to host
 them as is, host a merged monolithic repo, or host both a monolithic repo
 and the splitted out repo? The exact answer probably varies, but I imagine
 there's basic workflow that would satisfy 80% of users.  If I have GitHub
 host both monolithic and splitted out repos, it seems unclear as to how I
 keep those repos in sync and make sure all the developers in our company
 push their changes to both repos.

 Thanks,
 Ben

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Ben McCann
Hmm, I just assumed I should use subtree because pretty much every single
thing I've ever read that references them says that subtree
is preferable to submodules in nearly every way. Are submodules better in
this case for some reason?


On Wed, Feb 27, 2013 at 2:29 PM, Gergely Polonkai gerg...@polonkai.euwrote:

 If you are familiar with symlinks under Linux, you can think of submodules
 as such. You add a reference to another git repository, check it out to a
 subdirectory, and you are done. The Git book has a chapter on it:

 http://git-scm.com/book/en/Git-Tools-Submodules


 On 27 February 2013 23:21, Ben McCann benjamin.j.mcc...@gmail.com wrote:

 Anyone have any experience using subtree?

 Thanks!
 -Ben


 On Monday, February 25, 2013 8:21:50 PM UTC-8, Ben McCann wrote:

 I'm fairly new to git and am trying to determine if git subtree would be
 helpful for managing our company's codebase, which has several repos some
 of which depend on each other. All the examples I've seen make sense to me
 as a one-time operation to merge separate repos into one monolithic one or
 to split one monolithic repo into separate repos. I'm having a harder time
 understanding how this fits into a larger picture and what the workflow for
 working with subtree would be.

 If I have a bunch of repos on GitHub and some depend on each other, how
 would I set them up to work with subtree? Would GitHub continue to host
 them as is, host a merged monolithic repo, or host both a monolithic repo
 and the splitted out repo? The exact answer probably varies, but I imagine
 there's basic workflow that would satisfy 80% of users.  If I have GitHub
 host both monolithic and splitted out repos, it seems unclear as to how I
 keep those repos in sync and make sure all the developers in our company
 push their changes to both repos.

 Thanks,
 Ben

  --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.




  --
 You received this message because you are subscribed to a topic in the
 Google Groups Git for human beings group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/git-users/GnE7-hfT6z4/unsubscribe?hl=en-US
 .
 To unsubscribe from this group and all its topics, send an email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
about.me/benmccann

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Ryan Hodson
Hi Ben,

To expand on Gergely's reply a bit, it sounds like what you're looking for
is `git submodule`, not `git subtree`. Submodules were designed to solve
exactly the problem you're facing.

Each submodule is essentially its own independent Git repository. If you
have RepoA that relies on RepoB, you would add RepoB as a submodule to
RepoA. Then you can pull in upstream commits from RepoB as you would with a
normal Git workflow and access them from RepoA. There are a few extra `git
submodule` commands you would need to learn to keep things in sync.

If I have GitHub host both monolithic and splitted out repos, it seems
 unclear as to how I keep those repos in sync and make sure all the
 developers in our company push their changes to both repos.


This sounds like a dangerous idea. I would use submodules instead.

Ryan

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Gergely Polonkai
Sorry, I wasn't totally clear. Forgive me as I'm in the middle of a bad flu
:)

As Ryan says, hosting both the monolithic stuff AND the modules can be
dangerous, unless the modules are actually independent. The Symfony
project, for example, hosts the whole framework in a large github repo, and
maintains a read only version of most of its modules in separate repos.
This seems to be a good use-case for subtree. For your scenario, I would
suggest submodules.


On 27 February 2013 23:41, Ryan Hodson hodson.r...@gmail.com wrote:

 Hi Ben,

 To expand on Gergely's reply a bit, it sounds like what you're looking for
 is `git submodule`, not `git subtree`. Submodules were designed to solve
 exactly the problem you're facing.

 Each submodule is essentially its own independent Git repository. If you
 have RepoA that relies on RepoB, you would add RepoB as a submodule to
 RepoA. Then you can pull in upstream commits from RepoB as you would with a
 normal Git workflow and access them from RepoA. There are a few extra `git
 submodule` commands you would need to learn to keep things in sync.

 If I have GitHub host both monolithic and splitted out repos, it seems
 unclear as to how I keep those repos in sync and make sure all the
 developers in our company push their changes to both repos.


 This sounds like a dangerous idea. I would use submodules instead.

 Ryan

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Ben McCann
Hmm, that's interesting to hear. I'd read a couple articles that led me to
believe I shouldn't consider submodules at all (e.g. these two on HN: Git
Subtree merged into mainline githttp://news.ycombinator.com/item?id=3926683
, Why your company shouldn't use Git
submoduleshttp://news.ycombinator.com/item?id=3904932),
but they do seem easier to setup and maintain in this case as far as I can
tell as a complete beginner, so I guess I'll have to look into them.

Thanks for the help!
-Ben


On Wed, Feb 27, 2013 at 2:53 PM, Gergely Polonkai gerg...@polonkai.euwrote:

 Sorry, I wasn't totally clear. Forgive me as I'm in the middle of a bad
 flu :)

 As Ryan says, hosting both the monolithic stuff AND the modules can be
 dangerous, unless the modules are actually independent. The Symfony
 project, for example, hosts the whole framework in a large github repo, and
 maintains a read only version of most of its modules in separate repos.
 This seems to be a good use-case for subtree. For your scenario, I would
 suggest submodules.


 On 27 February 2013 23:41, Ryan Hodson hodson.r...@gmail.com wrote:

 Hi Ben,

 To expand on Gergely's reply a bit, it sounds like what you're looking
 for is `git submodule`, not `git subtree`. Submodules were designed to
 solve exactly the problem you're facing.

 Each submodule is essentially its own independent Git repository. If you
 have RepoA that relies on RepoB, you would add RepoB as a submodule to
 RepoA. Then you can pull in upstream commits from RepoB as you would with a
 normal Git workflow and access them from RepoA. There are a few extra `git
 submodule` commands you would need to learn to keep things in sync.

 If I have GitHub host both monolithic and splitted out repos, it seems
 unclear as to how I keep those repos in sync and make sure all the
 developers in our company push their changes to both repos.


 This sounds like a dangerous idea. I would use submodules instead.

 Ryan

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.




  --
 You received this message because you are subscribed to a topic in the
 Google Groups Git for human beings group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/git-users/GnE7-hfT6z4/unsubscribe?hl=en-US
 .
 To unsubscribe from this group and all its topics, send an email to
 git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
about.me/benmccann

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] Re: git subtree workflow

2013-02-27 Thread Ryan Hodson
Ben,

That second article is a bit preachy. The `git submodule` command exists
for a reason, and I would trust it over any of the 3rd-party alternatives.
That said, it can be a bit finicky to work with at times. The key to
remember is that the parent project always points to a *snapshot* (i.e., a
commit) of the submodule repository, not a branch. This has a couple of
potentially annoying side effects:

1. Upstream commits from the submodule will not automatically be reflected
in the parent repository. You have to manually go in and update the commit
reference in the parent project. However, the advantage of this behavior is
that you can check out or revert to a previous commit in the parent project
and get its *exact* state, which is not possible if each commit references
a *branch* in the submodule.

2. As noted in that second article, the submodule will typically be in a
detached head state, which means you need to be careful about committing
changes directly in a submodule (this is not a problem if you are only
working on the submodule repos in isolation and using `git submodule` to
pull upstream changes into the parent project).

The official docs cover all of this in much more detail.

Ryan

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] git: Command not found.

2013-02-27 Thread Evgeny Goldin
I'd try downloading and installing Mac OS Git client -
http://git-scm.com/download/mac.
Or run sudo find / -name git to see where it's located if you believe it
is installed already.
On my Mac which git tells me /usr/local/git/bin/git.


On Wed, Feb 27, 2013 at 9:51 PM, John McKown
john.archie.mck...@gmail.comwrote:

 The command git is not in any of the directories in the $PATH
 environment variable. I don't use MacOSX much at all, so I don't know
 how to set up this for a Terminal session. This might help:
 http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
 I think you can use Finder to determine which subdirectory contains
 the git command.

 On Wed, Feb 27, 2013 at 2:42 PM,  banaca...@gmail.com wrote:
  I have a clone of a local repository on my computer, and when I try to
 issue
  any git command from Terminal I get this git: Command not found..  That
  seems to indicate that git is not in the directory containing the clone,
 but
  it is.  In fact I have used GITX (the graphical interface for Mac) to
 make
  10 commits to this clone, so I know it exists.  Plus, I can see the .git
  directory within the directory containing the clone.  And I have an
 exclude
  file in .git  info to exclude tracking images, etc.
 
  Can someone explain why I can't access this clone through Terminal?
 
  --
  You received this message because you are subscribed to the Google Groups
  Git for human beings group.
  To unsubscribe from this group and stop receiving emails from it, send an
  email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 



 --
 This is a test of the Emergency Broadcast System. If this had been an
 actual emergency, do you really think we'd stick around to tell you?

 Maranatha! 
 John McKown

 --
 You received this message because you are subscribed to the Google Groups
 Git for human beings group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[git-users] Re: File modified after git clone

2013-02-27 Thread Blind
If people who push to your project use different OS, you may find the 
configurations core.autocrlf and core.safecrlf as interesting. (usually 
setting both to false works well)

27 февруари 2013, сряда, 04:31:01 UTC+2, José Guilherme Vanz написа:

 After clone a github repository in my PC, a file is showing like a 
 modified file. But the last modification in this file was done 8 months 
 ago. How is possible? I tried execute git checkout -- . but the file 
 continues like a modified file.

 Anybody have a tip/solution for the problem?


-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.