Suggestion: group files in GIT

2015-06-08 Thread Konrád Lőrinczi
I would like to group some files, so I can list group files together,
list group changes together, filter by group for staging, also order
by group.
It seems, there is no such feature in GIT I would need, so I send it
as suggestion.

We can call this feature as "Group files" or "Label files" (labeling
is used in Gmail, so this may be also a naming alternative).


Example file list I would like to group together into [group1]:
theme/header.php
theme/footer.php
theme/body.php
lib/theme.php

They are in different directories, but mostly belongs together, so if
I group them, then I can work easier with them.


- I could select a file group for staging, so only the changes in the
group would be added to stage. Changed files in the group:
[group1]/theme/header.php
[group1]/lib/theme.php


- I could list files filtered by a group. Files filtered by [group1]:
[group1]/theme/header.php
[group1]/theme/footer.php
[group1]/theme/body.php
[group1]/lib/theme.php


- I could order file list to list group files first, then directory files.
[group1]/theme/header.php
[group1]/theme/footer.php
[group1]/theme/body.php
[group1]/lib/theme.php
other/files.php


I listed just a few basic cases, when grouping/labeling could be
useful, but there may be more.


Please consider implementing this feature into GIT.


Thanks,
Konrad Lorinczi
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Konrád Lőrinczi
I wrote a search & replace perl script, which recursively searches
files and replaces text in them. After replace, it restores original
modification time (mtime) of file.

Interesting, that git status doesn't show replaced changes, if the
mtime is same as original.

Is there a way to force git status to show changes, even if the file
dates are the same?


I tried to set core to:
trustctime = false
checkStat = minimal
Unfortunately the change is still not detected :(
It seems isn't a way to force fallback to file checking and completely
ignore file modification date :(


Any idea?


Thanks,
Konrad Lorinczi
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Git doesn't detect change, if file modification time is restored to original one

2015-07-23 Thread Konrád Lőrinczi
Based on [1] I found some solutions which makes the changed files
appear again as changed:
a) touch -m --date=01/01/1980 .git/index
So it is a touch, but only a single one, instead of touching all the
files in the work dir.

b) git read-tree HEAD
Also working well.


I accept these solutions as workarounds, but the real solution would be:
Dev suggestions:
1) Add a --force-reread option to git status, so user can force reread tree.
git status --force-reread

2) Add status.force-reread (true or false) option to .git/config so
user can set this variable permanently for a repo.
status.force-reread = false (should be default)


Could be possible to implement 1) and 2) features to next git release?


Thanks,
Konrad Lorinczi


[1] https://github.com/msysgit/git/issues/312

2015-07-23 9:58 GMT+02:00 Sebastian Schuberth :
> On 7/23/2015 9:29, Konrád Lőrinczi wrote:
>
>> Interesting, that git status doesn't show replaced changes, if the
>> mtime is same as original.
>
> See the somewhat related FAQ entry at [1] and also the lengthy discussion at 
> [2] about a similar issue. That said, deleting the .git/index file should 
> make these files appear as modified.
>
> [1] 
> https://git.wiki.kernel.org/index.php/Git_FAQ#Why_isn.27t_Git_preserving_modification_time_on_files.3F
> [2] https://github.com/msysgit/git/issues/312
>
> Regards,
> Sebastian
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html