File: t-push-file-with-branch-name.sh

package info (click to toggle)
git-lfs 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,808 kB
  • sloc: sh: 21,256; makefile: 507; ruby: 417
file content (21 lines) | stat: -rwxr-xr-x 447 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

. "$(dirname "$0")/testlib.sh"

begin_test "push a file with the same name as a branch"
(
  set -e

  reponame="$(basename "$0" ".sh")"
  setup_remote_repo "$reponame"
  clone_repo "$reponame" repo

  git lfs track "main"
  echo "main" > main
  git add .gitattributes main
  git commit -m "add main"

  git lfs push --all origin main 2>&1 | tee push.log
  grep "Uploading LFS objects: 100% (1/1), [0-9] B" push.log
)
end_test