cranequinier: (65x70)
[personal profile] cranequinier
Это пост для программистов. Вдруг кто чего подскажет.

Делаю новый репозиторий для глубоко приватных C++-ных исходников. Собираюсь его бесплатно хостить на Bitbucket, и доступаться к нему из пары-тройки мест на планете через SourceTree. Выбираю между Git и Mercurial. И вот меня скрутило - исходники, люди и процессы такие, что надо сохранять дату файлов на диске, хоть ты тресни. А оне оба - и Git и Mercurial - по-умолчанию ставят дату последнего слива с сервера. При этом Mercurial довольно просто фиксится примочкой TimestampMod Extension, и начинает даты файлов уважеть, а Git если и фиксится вообще, то как-то через задницу как и всё в Git. Поэтому я слегка скрипя сердцем склоняюсь к Mercurial, хотя знаю его похуже и вообще он какой-то умирающий.

Может я какую-то фигню делаю, а надо хостить где-то ещё, на своём хостинге, использовать SVN и переходить на Жабу? Вправьте мне скорее мозги... Ну чего вообще интересного есть в мире code hosting-а...

P.S. Мечта, конечно, fossil, но его считай что нету.

Date: 2015-02-12 05:43 am (UTC)
From: [identity profile] cranequinier.livejournal.com
> setting the timestamps of the files to the time when they were last updated by a commit, is usually idiotic. It breaks "make",

Не буду тут повторять все те добрые слова, которые сказаны в И-нете в адрес авторов VCS, ориентированной не на голову, а на make. Тысячи их.

> Ну и там дальше собственно скрипт на перле, который вешать как hook.

Эээ... В какое место вешать? Где хотя бы минимальный хелп? И что будет в Виндах с бросающимися в глаза в этом скрипте юниксными командами?

Date: 2015-02-12 11:23 pm (UTC)
From: [identity profile] onanim.wordpress.com (from livejournal.com)
http: //git-scm. com /book/en/v2/ Customizing-Git-Git-Hooks

man githooks

Думается, post-merge надо попробовать.

"post-merge
This hook is invoked by git merge, which happens when a git pull is
done on a local repository. The hook takes a single parameter, a status
flag specifying whether or not the merge being done was a squash merge.
This hook cannot affect the outcome of git merge and is not executed,
if the merge failed due to conflicts.

This hook can be used in conjunction with a corresponding pre-commit
hook to save and restore any form of metadata associated with the
working tree (eg: permissions/ownership, ACLS, etc). See
contrib/hooks/setgitperms.perl for an example of how to do this."

(Но с вендой это будет забавная мастурбация, да-с (у нее вообще понятие mod time имеется? видимо, вместо перла какой-нибудь VBS юзать)... но если уж хочется непременно git - нет ничего невыполнимого).

Date: 2015-02-12 11:37 pm (UTC)
From: [identity profile] onanim.wordpress.com (from livejournal.com)
(подумав) или, возможно, post-checkout.
"post-checkout
This hook is invoked when a git checkout is run after having updated
the worktree. The hook is given three parameters: the ref of the
previous HEAD, the ref of the new HEAD (which may or may not have
changed), and a flag indicating whether the checkout was a branch
checkout (changing branches, flag=1) or a file checkout (retrieving a
file from the index, flag=0). This hook cannot affect the outcome of
git checkout."

Whatever works.

Profile

cranequinier: (Default)
cranequinier

March 2020

S M T W T F S
1234567
891011121314
15161718192021
22 232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 2nd, 2025 08:39 pm
Powered by Dreamwidth Studios