Re: Git issues with submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramkumar, not actually sure what you mean?

For me `git diff --name-only HEAD --` ignores changes to submodules
hash changes. Also apparently it became a known TODO for phabricator
developers [1].

Jeff, kinda trying to match yes. Just don't want changes to submodules
hash to be included.

So, after all is it expected behavior of ls-files or not and if not
shall i report it as a separate thread? :)

[1] https://secure.phabricator.com/rARCe62b23e67deacc24469525cc5dea2b297a5073fb


On Fri, Nov 22, 2013 at 9:11 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Fri, Nov 22, 2013 at 06:38:47PM +0530, Ramkumar Ramachandra wrote:
>
>> >> Does Arcanist use `git ls-files -m` to check?
>> >
>> > Yes, Arcanist uses `git ls-files -m` to check whether there're local
>> > modifications. We might also contact phab developers asking to change
>> > it to `git diff --name-only HEAD --`.  Is there a preferable way to
>> > get list of modified files and are this command intended to output the
>> > same results?
>>
>> I just checked it out: it uses `git ls-files -m` to get the list of
>> unstaged changes; `git diff --name-only HEAD --` will list staged
>> changes as well.
>
> That diff command compares the working tree and HEAD; if you are trying
> to match `ls-files -m`, you probably wanted just `git diff --name-only`
> to compare the working tree and the index. Although in a script you'd
> probably want to use the plumbing `git diff-files` instead.
>
> -Peff



-- 
With best regards, Sergey Sharybin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]