✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server.blackpussy.asia ​🇻​♯➤ 5.14.0-611.20.1.el9_7.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 163.245.207.76 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗞 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ mail,mb_send_mail
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /usr/share/doc/rsync/support//git-set-file-times
#!/usr/bin/env python3

import os, re, argparse, subprocess
from datetime import datetime

NULL_COMMIT_RE = re.compile(r'\0\0commit [a-f0-9]{40}$|\0$')

def main():
    if not args.git_dir:
        cmd = 'git rev-parse --show-toplevel 2>/dev/null || echo .'
        top_dir = subprocess.check_output(cmd, shell=True, encoding='utf-8').strip()
        args.git_dir = os.path.join(top_dir, '.git')
        if not args.prefix:
            os.chdir(top_dir)

    git = [ 'git', '--git-dir=' + args.git_dir ]

    if args.tree:
        cmd = git + 'ls-tree -z -r --name-only'.split() + [ args.tree ]
    else:
        cmd = git + 'ls-files -z'.split()

    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, encoding='utf-8')
    out = proc.communicate()[0]
    ls = set(out.split('\0'))
    ls.discard('')

    if not args.tree:
        # All modified files keep their current mtime.
        proc = subprocess.Popen(git + 'status -z --no-renames'.split(), stdout=subprocess.PIPE, encoding='utf-8')
        out = proc.communicate()[0]
        for fn in out.split('\0'):
            if fn == '' or (fn[0] != 'M' and fn[1] != 'M'):
                continue
            fn = fn[3:]
            if args.list:
                mtime = os.lstat(fn).st_mtime
                print_line(fn, mtime, mtime)
            ls.discard(fn)

    cmd = git + 'log -r --name-only --format=%x00commit%x20%H%n%x00commit_time%x20%ct%n --no-renames -z'.split()
    if args.tree:
        cmd.append(args.tree)
    cmd += ['--'] + args.files

    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, encoding='utf-8')
    for line in proc.stdout:
        line = line.strip()
        m = re.match(r'^\0commit_time (\d+)$', line)
        if m:
            commit_time = int(m[1])
        elif NULL_COMMIT_RE.search(line):
            line = NULL_COMMIT_RE.sub('', line)
            files = set(fn for fn in line.split('\0') if fn in ls)
            if not files:
                continue
            for fn in files:
                if args.prefix:
                    fn = args.prefix + fn
                mtime = os.lstat(fn).st_mtime
                if args.list:
                    print_line(fn, mtime, commit_time)
                elif mtime != commit_time:
                    if not args.quiet:
                        print(f"Setting {fn}")
                    os.utime(fn, (commit_time, commit_time), follow_symlinks = False)
            ls -= files
            if not ls:
                break
    proc.communicate()


def print_line(fn, mtime, commit_time):
    if args.list > 1:
        ts = str(commit_time).rjust(10)
    else:
        ts = datetime.utcfromtimestamp(commit_time).strftime("%Y-%m-%d %H:%M:%S")
    chg = '.' if mtime == commit_time else '*'
    print(chg, ts, fn)


if __name__ == '__main__':
    parser = argparse.ArgumentParser(description="Set the times of the files in the current git checkout to their last-changed time.", add_help=False)
    parser.add_argument('--git-dir', metavar='GIT_DIR', help="The git dir to query (defaults to affecting the current git checkout).")
    parser.add_argument('--tree', metavar='TREE-ISH', help="The tree-ish to query (defaults to the current branch).")
    parser.add_argument('--prefix', metavar='PREFIX_STR', help="Prepend the PREFIX_STR to each filename we tweak (defaults to the top of current checkout).")
    parser.add_argument('--quiet', '-q', action='store_true', help="Don't output the changed-file information.")
    parser.add_argument('--list', '-l', action='count', help="List files & times instead of changing them. Repeat for Unix timestamp instead of human readable.")
    parser.add_argument('files', metavar='FILE', nargs='*', help="Specify a subset of checked-out files to tweak.")
    parser.add_argument("--help", "-h", action="help", help="Output this help message and exit.")
    args = parser.parse_args()
    main()

# vim: sw=4 et

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]

Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
19 Jun 2026 4.57 AM
root / root
0755
Makefile
0.078 KB
11 Jan 2005 6.37 PM
root / root
0644
atomic-rsync
5.068 KB
30 Dec 2021 8.29 PM
root / root
0644
cvs2includes
1.188 KB
17 Jun 2020 1.27 AM
root / root
0644
deny-rsync
0.981 KB
17 Jun 2020 1.27 AM
root / root
0644
file-attr-restore
4.82 KB
17 Jun 2020 1.27 AM
root / root
0644
files-to-excludes
0.525 KB
17 Jun 2020 1.27 AM
root / root
0644
git-set-file-times
3.811 KB
11 Apr 2022 3.57 PM
root / root
0644
instant-rsyncd
2.726 KB
17 Jun 2020 1.27 AM
root / root
0644
logfilter
1.078 KB
17 Jun 2020 1.27 AM
root / root
0644
lsh
3.029 KB
28 Dec 2021 1.57 AM
root / root
0644
lsh.sh
1.082 KB
9 Jan 2022 10.03 PM
root / root
0644
mapfrom
0.618 KB
17 Jun 2020 1.27 AM
root / root
0644
mapto
0.61 KB
17 Jun 2020 1.27 AM
root / root
0644
mnt-excl
1.805 KB
17 Jun 2020 1.27 AM
root / root
0644
munge-symlinks
2.556 KB
21 Dec 2021 12.41 AM
root / root
0644
nameconvert
1.491 KB
6 Aug 2020 4.32 AM
root / root
0644
rrsync
12.321 KB
10 Jan 2022 1.47 AM
root / root
0644
rrsync.1.md
4.28 KB
7 May 2022 12.42 AM
root / root
0644
rsync-no-vanished
0.579 KB
13 Nov 2021 6.39 PM
root / root
0644
rsync-slash-strip
0.751 KB
13 Nov 2021 6.39 PM
root / root
0644
rsyncstats
8.487 KB
17 Jun 2020 1.27 AM
root / root
0644
savetransfer.c
4.453 KB
18 Dec 2006 7.24 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF