Skip to content

Conversation

@vt-alt
Copy link
Contributor

@vt-alt vt-alt commented Sep 28, 2020

New tool to change files modification time to their last commit date.

Commands.md Outdated
Change files modification time to their last commit date.
```bash
## git utimes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## git utimes
$ git utimes

bin/git-utimes Outdated
else
# `-n` should be limited or parallelization will not give effect,
# because all args will go into single worker.
NPROC=$(nproc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vt-alt
Copy link
Contributor Author

vt-alt commented Sep 29, 2020

@vt-alt
Copy link
Contributor Author

vt-alt commented Nov 8, 2020

Ping! I fixed issues @SuperSandro2000 mentioned. Whats next?

Commands.md Outdated
Change files modification time to their last commit date.
```bash
$ git utimes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to show the difference before / after running this command.

if [ "$1" = --touch ]; then
# Internal use option only just to parallelize things.
shift
for f; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for is to support multiple arguments. Why not? This should reduce number of execs. Are you against of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: s/execs/forks/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vt-alt
I got it, it is OK.

bin/git-utimes Outdated
touch -d "$t" "$f"
fi
done
exit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exit is redundant.

bin/git-utimes Outdated
# Change files modification time to their last commit date
#
# Copyright (c) 2020 Vitaly Chikunov <[email protected]>.
# SPDX-License-Identifier: MIT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add the Copyright and License. We already have and only have a LICENSE file.

if [ "$1" = --touch ]; then
# Internal use option only just to parallelize things.
shift
for f; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for is to support multiple arguments. Why not? This should reduce number of execs. Are you against of it?

@vt-alt
Copy link
Contributor Author

vt-alt commented Nov 8, 2020

Force-pushed changes you requested - extended example in Commands.md, removed guard exit, removed license plate.

@vt-alt
Copy link
Contributor Author

vt-alt commented Nov 28, 2020

Almost three weeks passed since all requested changes are applied. Is there anything to add?

@spacewander
Copy link
Collaborator

@vt-alt
Sorry for my delay!

@spacewander spacewander merged commit e6caa93 into tj:master Nov 29, 2020
@vt-alt
Copy link
Contributor Author

vt-alt commented Nov 29, 2020

@spacewander Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants